As part of the change here [1], a few calls to edit files as root were moved to a privsep class that encompasses all those edits.
A typo creeped in, causing a failure when creating a VM with VIF type IVS:
I'll open a fix PR as well. And add a check that file exists before editing - apparently that's not true for this particular case and wasn't carried over from existing code.
Note: only affects stable/queens branch. Later releases has proper calling to os-vif-bigswitch and this code has been cleaned up from Nova.
As part of the change here [1], a few calls to edit files as root were moved to a privsep class that encompasses all those edits.
A typo creeped in, causing a failure when creating a VM with VIF type IVS:
log excerpt for failure: manager [req-e2560c77- 8950-4dc6- 8f4f-44254b184b bb 17bbd148d3f34a4 2bede6bdb8fcc84 aa 62daca4c6dff406 685f3fcf754cb82 c4 - default default] [instance: a631eff3- 9d68-4e06- a7ce-4338e29e8e 2d] Instance failed to spawn: IOError: [Errno 2] No such file or directory manager [instance: a631eff3- 9d68-4e06- a7ce-4338e29e8e 2d] Traceback (most recent call last): manager [instance: a631eff3- 9d68-4e06- a7ce-4338e29e8e 2d] File "/usr/lib/ python2. 7/site- packages/ nova/compute/ manager. py", line 2236, in _build_resources manager [instance: a631eff3- 9d68-4e06- a7ce-4338e29e8e 2d] yield resources manager [instance: a631eff3- 9d68-4e06- a7ce-4338e29e8e 2d] File "/usr/lib/ python2. 7/site- packages/ nova/compute/ manager. py", line 2016, in _build_ and_run_ instance manager [instance: a631eff3- 9d68-4e06- a7ce-4338e29e8e 2d] block_device_ info=block_ device_ info) manager [instance: a631eff3- 9d68-4e06- a7ce-4338e29e8e 2d] File "/usr/lib/ python2. 7/site- packages/ nova/virt/ libvirt/ driver. py", line 3100, in spawn manager [instance: a631eff3- 9d68-4e06- a7ce-4338e29e8e 2d] destroy_ disks_on_ failure= True) manager [instance: a631eff3- 9d68-4e06- a7ce-4338e29e8e 2d] File "/usr/lib/ python2. 7/site- packages/ nova/virt/ libvirt/ driver. py", line 5590, in _create_ domain_ and_network manager [instance: a631eff3- 9d68-4e06- a7ce-4338e29e8e 2d] destroy_ disks_on_ failure) manager [instance: a631eff3- 9d68-4e06- a7ce-4338e29e8e 2d] File "/usr/lib/ python2. 7/site- packages/ oslo_utils/ excutils. py", line 220, in __exit__ manager [instance: a631eff3- 9d68-4e06- a7ce-4338e29e8e 2d] self.force_ reraise( ) manager [instance: a631eff3- 9d68-4e06- a7ce-4338e29e8e 2d] File "/usr/lib/ python2. 7/site- packages/ oslo_utils/ excutils. py", line 196, in force_reraise manager [instance: a631eff3- 9d68-4e06- a7ce-4338e29e8e 2d] six.reraise( self.type_ , self.value, self.tb) manager [instance: a631eff3- 9d68-4e06- a7ce-4338e29e8e 2d] File "/usr/lib/ python2. 7/site- packages/ nova/virt/ libvirt/ driver. py", line 5549, in _create_ domain_ and_network manager [instance: a631eff3- 9d68-4e06- a7ce-4338e29e8e 2d] self.plug_ vifs(instance, network_info) manager [instance: a631eff3- 9d68-4e06- a7ce-4338e29e8e 2d] File "/usr/lib/ python2. 7/site- packages/ nova/virt/ libvirt/ driver. py", line 829, in plug_vifs manager [instance: a631eff3- 9d68-4e06- a7ce-4338e29e8e 2d] self.vif_ driver. plug(instance, vif) manager [instance: a631eff3- 9d68-4e06- a7ce-4338e29e8e 2d] File "/usr/lib/ python2. 7/site- packages/ nova/virt/ libvirt/ vif.py" , line 896, in plug manager [instance: a631eff3- 9d68-4e06- a7ce-4338e29e8e 2d] func(instance, vif) manager [instance: a631eff3- 9d68-4e06- a7ce-4338e29e8e 2d] File "/usr/lib/ python2. 7/site- packages/ nova/virt/ libvirt/ vif.py" , line 722, in plug_ivs manager [instance: a631eff3- 9d68-4e06- a7ce-4338e29e8e 2d] self.plug_ ivs_hybrid( instance, vif) manager [instance: a631eff3- 9d68-4e06- a7ce-4338e29e8e 2d] File "/usr/lib/ python2. 7/site- packages/ nova/virt/ libvirt/ vif.py" , line 703, in plug_ivs_hybrid manager [instance: a631eff3- 9d68-4e06- a7ce-4338e29e8e 2d] nova.privsep. libvirt. disable_ ipv6(br_ name) manager [instance: a631eff3- 9d68-4e06- a7ce-4338e29e8e 2d] File "/usr/lib/ python2. 7/site- packages/ oslo_privsep/ priv_context. py", line 207, in _wrap manager [instance: a631eff3- 9d68-4e06- a7ce-4338e29e8e 2d] return self.channel. remote_ call(name, args, kwargs) manager [instance: a631eff3- 9d68-4e06- a7ce-4338e29e8e 2d] File "/usr/lib/ python2. 7/site- packages/ oslo_privsep/ daemon. py", line 202, in remote_call manager [instance: a631eff3- 9d68-4e06- a7ce-4338e29e8e 2d] raise exc_type( *result[ 2]) manager [instance: a631eff3- 9d68-4e06- a7ce-4338e29e8e 2d] IOError: [Errno 2] No such file or directory manager [instance: a631eff3- 9d68-4e06- a7ce-4338e29e8e 2d]
2018-09-24 14:21:47.167 1 ERROR nova.compute.
2018-09-24 14:21:47.167 1 ERROR nova.compute.
2018-09-24 14:21:47.167 1 ERROR nova.compute.
2018-09-24 14:21:47.167 1 ERROR nova.compute.
2018-09-24 14:21:47.167 1 ERROR nova.compute.
2018-09-24 14:21:47.167 1 ERROR nova.compute.
2018-09-24 14:21:47.167 1 ERROR nova.compute.
2018-09-24 14:21:47.167 1 ERROR nova.compute.
2018-09-24 14:21:47.167 1 ERROR nova.compute.
2018-09-24 14:21:47.167 1 ERROR nova.compute.
2018-09-24 14:21:47.167 1 ERROR nova.compute.
2018-09-24 14:21:47.167 1 ERROR nova.compute.
2018-09-24 14:21:47.167 1 ERROR nova.compute.
2018-09-24 14:21:47.167 1 ERROR nova.compute.
2018-09-24 14:21:47.167 1 ERROR nova.compute.
2018-09-24 14:21:47.167 1 ERROR nova.compute.
2018-09-24 14:21:47.167 1 ERROR nova.compute.
2018-09-24 14:21:47.167 1 ERROR nova.compute.
2018-09-24 14:21:47.167 1 ERROR nova.compute.
2018-09-24 14:21:47.167 1 ERROR nova.compute.
2018-09-24 14:21:47.167 1 ERROR nova.compute.
2018-09-24 14:21:47.167 1 ERROR nova.compute.
2018-09-24 14:21:47.167 1 ERROR nova.compute.
2018-09-24 14:21:47.167 1 ERROR nova.compute.
2018-09-24 14:21:47.167 1 ERROR nova.compute.
2018-09-24 14:21:47.167 1 ERROR nova.compute.
2018-09-24 14:21:47.167 1 ERROR nova.compute.
2018-09-24 14:21:47.167 1 ERROR nova.compute.
2018-09-24 14:21:47.167 1 ERROR nova.compute.
2018-09-24 14:21:47.167 1 ERROR nova.compute.
I'll open a fix PR as well. And add a check that file exists before editing - apparently that's not true for this particular case and wasn't carried over from existing code.
Note: only affects stable/queens branch. Later releases has proper calling to os-vif-bigswitch and this code has been cleaned up from Nova.
[1] https:/ /review. openstack. org/#/c/ 489438/