← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1374508] [NEW] Possible race between unrescue and detach

 

Public bug reported:

tempest.api.compute.servers.test_server_rescue_negative:ServerRescueNegativeTestJSON.test_rescued_vm_detach_volume

This test passes however it fails to properly cleanup after itself - the
detach completes but without running the necessary iscsiadm commands.

In nova.virt.libvirt.volume.LibvirtISCSIVolumeDriver.disconnect_volume
the list returned by self.connection._get_all_block_devices includes the
host_device which means that self._disconnect_from_iscsi_portal is never
run.


You can see evidence of this in /etc/iscsi/nodes as well as errors logged in /var/log/syslog

I'm guessing there is a race between the unrescue and the detach within
libvirt. In nova.virt.libvirt.driver.LibvirtDriver.detach_volume if I
put in a sleep before virt_dom.detachDeviceFlags(xml, flags) the detach
appears to work properly however if I sleep after that line it does not
appear to have any effect.

** Affects: nova
     Importance: Undecided
         Status: New

-- 
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/1374508

Title:
  Possible race between unrescue and detach

Status in OpenStack Compute (Nova):
  New

Bug description:
  tempest.api.compute.servers.test_server_rescue_negative:ServerRescueNegativeTestJSON.test_rescued_vm_detach_volume

  This test passes however it fails to properly cleanup after itself -
  the detach completes but without running the necessary iscsiadm
  commands.

  In nova.virt.libvirt.volume.LibvirtISCSIVolumeDriver.disconnect_volume
  the list returned by self.connection._get_all_block_devices includes
  the host_device which means that self._disconnect_from_iscsi_portal is
  never run.

  
  You can see evidence of this in /etc/iscsi/nodes as well as errors logged in /var/log/syslog

  I'm guessing there is a race between the unrescue and the detach
  within libvirt. In
  nova.virt.libvirt.driver.LibvirtDriver.detach_volume if I put in a
  sleep before virt_dom.detachDeviceFlags(xml, flags) the detach appears
  to work properly however if I sleep after that line it does not appear
  to have any effect.

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


Follow ups

References