OpenNebula / addon-context-linux

Linux VM Contextualization
Apache License 2.0
56 stars 73 forks source link

Udev deadlock on ubuntu during contextualization (re)configure #239

Closed ospalax closed 3 years ago

ospalax commented 3 years ago

When one-context reconfigure is started (e.g. after attaching new NIC to the VM) then udevadm settle is triggered and it will deadlock with the udevadm service until it is killed off by timeout:

sr0: Spawned process '/usr/sbin/service one-context-reconfigure start' [1466] timed out after 2min 59s, killing
sr0: Worker [1436] processing SEQNUM=2590 killed
Worker [1436] terminated by signal 9 (KILL)
sr0: Worker [1436] failed

This is the udevadm service which triggered one-context upon emerging of the new NIC:

/lib/systemd/systemd-udevd
 \_ /lib/systemd/systemd-udevd
 \_ /lib/systemd/systemd-udevd
     \_ systemctl start one-context-reconfigure.service

And here we are waiting for over two minutes (udevadm settle):

bash /usr/sbin/one-context-run
 \_ bash /usr/sbin/one-contextd all reconfigure
     \_ bash /usr/sbin/one-contextd all reconfigure
         \_ bash /etc/one-context.d/loc-05-grow-rootfs reconfigure
             \_ bash /etc/one-context.d/loc-05-grow-rootfs reconfigure
                 \_ /bin/sh /bin/growpart /dev/sda 1
                     \_ udevadm settle