[systemd-devel] udevadm settle hangs due to veths in seperate network namespaces
Daniel P. Berrange
berrange at redhat.com
Fri Jul 12 08:00:23 PDT 2013
On Fri, Jul 12, 2013 at 02:51:10PM +0100, Daniel P. Berrange wrote:
> We're hitting a problem in libvirt where 'udevadm settle' will get stuck
> in a loop until it eventually times out. Eventually we realized this
> happens when we have any LXC containers active with veth devices in a
> separate network namespace.
Incidentally, I recall reading something by (iirc) Lennart saying that
apps really should use 'udevadm settle' at all. Libvirt uses it in a
couple of places, all related to code which obtains lists of storage
devices
- After adding a disk partition in parted, we use it to wait for
the /dev/sdXXNNN device nodes to all show up
- After logging into an iscsi target with iscsiadm, we use it to
wait for all the /dev/sdXXX devices nodes associated with the
iSCSI target to appear.
- After triggering a SCSI HBA rescan via sysfs, we use it to wait
for all the /dev/sdXXX devices nodes associated with the SCI HBA
to appear
- After creating an NPIV virtual HBA via sysfs, we use it to wait
for all the /dev/sdXXX devices nodes associated with the vHBA
to appear
- After activating an LVM volume group, we use it to wait for all
the /dev/VGNAME/XXXX device nodes to appear
- After deleting an LVM volume we use it to wait for the device
node to be removed
- After adding an LVM volume we use it to wait for the device
node to be added
You can see a pattern there - after doing some action related to
storage, we need to synchronize wrt the creation/deletion of device
nodes in /dev, otherwise we miss out LUNs when we scan for the list
of device nodes associated with a HBA/VolGroup/etc. Any suggestions
for alternative techniques / approaches here ?
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
More information about the systemd-devel
mailing list