← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1161557] Re: Race condition in handling of udev generated symlinks

 

** Changed in: cinder
       Status: Triaged => Incomplete

** Changed in: cinder
       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/1161557

Title:
  Race condition in handling of udev generated symlinks

Status in Cinder:
  Invalid
Status in OpenStack Compute (Nova):
  Opinion

Bug description:
  In several components in both Cinder and Nova udev provided symlinks are expected to appear immediately.
  This is not the case as udev rules run async of device plugging.
  Volume drivers in Cinder and the libvirt driver in Nova seem to be the primary culprits.

  To solve this we should wait for udevd to finish processing events, this can be done with udevadm by calling settle. This is done by simply calling "udevadm settle". Additionally it can be called with a timeout (probably a good idea).
  Excerpt from udevadm settle --help:

  Usage: udevadm settle OPTIONS
    --timeout=<seconds>     maximum time to wait for events
    --seq-start=<seqnum>    first seqnum to wait for
    --seq-end=<seqnum>      last seqnum to wait for
    --exit-if-exists=<file> stop waiting if file exists
    --quiet                 do not print list after timeout
    --help

  For more intelligent use we could wrap this in a function that can use
  the --exit-if-exists behavior.

  This will ensure the symlink actually exists before we try use it.

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