Nova fails to launch any instances after the compute host is rebooted
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack-Ansible |
Fix Released
|
Undecided
|
Paulo Matias |
Bug Description
In Ubuntu 16.04, with stable/newton, Nova fails to launch any instances after the compute host is rebooted. The log displays the following stacktrace:
2016-10-25 15:21:21.426 6385 WARNING nova.virt.
2016-10-25 15:21:21.429 6385 ERROR os_vif [req-52a13b73-
2016-10-25 15:21:21.429 6385 ERROR os_vif Traceback (most recent call last):
2016-10-25 15:21:21.429 6385 ERROR os_vif File "/openstack/
2016-10-25 15:21:21.429 6385 ERROR os_vif plugin.plug(vif, instance_info)
2016-10-25 15:21:21.429 6385 ERROR os_vif File "/openstack/
2016-10-25 15:21:21.429 6385 ERROR os_vif linux_net.
2016-10-25 15:21:21.429 6385 ERROR os_vif File "/openstack/
2016-10-25 15:21:21.429 6385 ERROR os_vif do_log=False, semaphores=
2016-10-25 15:21:21.429 6385 ERROR os_vif File "/usr/lib/
2016-10-25 15:21:21.429 6385 ERROR os_vif return self.gen.next()
2016-10-25 15:21:21.429 6385 ERROR os_vif File "/openstack/
2016-10-25 15:21:21.429 6385 ERROR os_vif ext_lock.
2016-10-25 15:21:21.429 6385 ERROR os_vif File "/openstack/
2016-10-25 15:21:21.429 6385 ERROR os_vif self._do_open()
2016-10-25 15:21:21.429 6385 ERROR os_vif File "/openstack/
2016-10-25 15:21:21.429 6385 ERROR os_vif self.lockfile = open(self.path, 'a')
2016-10-25 15:21:21.429 6385 ERROR os_vif IOError: [Errno 13] Permission denied: '/var/lock/
2016-10-25 15:21:21.429 6385 ERROR os_vif
2016-10-25 15:21:21.430 6385 ERROR nova.compute.
If one checks the owner/group of /var/lock/nova, it's root:root, and permissions are 0755. After manually setting the owner to /var/lock/nova, then instances can be launched.
This issue seems not to affect Ubuntu 14.04 according to tests by cloudnull.
After running the playbooks, /var/lock/nova permissions are set correctly: https:/ /github. com/openstack/ openstack- ansible- os_nova/ blob/0d075aad35 4b4fd707810ac4d e1b3e734a2ebb8a /tasks/ nova_pre_ install. yml#L72
However, when the host reboots, these permissions are lost.
We need to get the directory defined as the lock_path (https:/ /github. com/openstack/ openstack- ansible- os_nova/ blob/fa5fbc12f6 1d1c443780d4ef3 347b4e7369744b6 /templates/ nova.conf. j2#L245) to be created correctly by https:/ /github. com/openstack/ openstack- ansible- os_nova/ blob/2bb50693c9 87f7c33fc43dcf3 8a6dfecde6d9031 /templates/ nova-systemd- tempfiles. j2