← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1294597] Re: libvirt vif plug_ovs_hybrid should roll back ip link set when fail

 

** Changed in: nova
       Status: Incomplete => Invalid

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1294597

Title:
  libvirt vif plug_ovs_hybrid should roll back ip link set when fail

Status in OpenStack Compute (Nova):
  Invalid

Bug description:
  This problem is about [ plug_ovs_hybrid ] in libvirt/vif.py.
  In this function, there is not try..catch to roll back "ip link set".

  if not linux_net.device_exists(v2_name):
      linux_net._create_veth_pair(v1_name, v2_name)
      utils.execute('ip', 'link', 'set', br_name, 'up', run_as_root=True)
             <--- this action should roll back when create fail
      utils.execute('brctl', 'addif', br_name, v1_name, run_as_root=True)
      linux_net.create_ovs_vif_port(self.get_bridge_name(vif),
                                    v2_name, iface_id, vif['address'],
                                    instance['uuid'])

  In below case, it will result that instance will lost it's virtual interface(resume_guests_state_on_host_boot = True) :
  1. Create a instance (name vm1) with network, wait until active.
  2. Reset the Host OS, and wait until it is ready.
  3. Before creating openvswitch bridge, start nova-compute service at the first time.
     The init_host function in nova compute manager will call plug_ovs_hybrid, and finally raise a exception at create_ovs_vif_port.
     As a result, the nova-compute service will stop, and do not roll back the "ip link set" of the instance(vm1).
  4. Start openvswitch service, and create bridge for openstack.
  5. Restart nova-compute service, and then recreat instances, include vm1.
     When creating vm1, because of do not roll back "ip link set", if will return false, and vm1 will lost it's virtual interface.

  I think we should roll back ip link set, or set instance status to
  ERROR.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1294597/+subscriptions


References