CONTEXT.device start timeout

Hello,

Try customize CentOS 7 cloud image. All works but have timout ~2 min and log in VM:

Jul 29 15:25:44 localhost kernel: work still pending
Jul 29 15:27:11 localhost systemd: Job dev-disk-by\x2dlabel-CONTEXT.device/start timed out.
Jul 29 15:27:11 localhost systemd: Timed out waiting for device dev-disk-by\x2dlabel-CONTEXT.device.
Jul 29 15:27:11 localhost systemd: Job dev-disk-by\x2dlabel-CONTEXT.device/start failed with result ‘timeout’.
Jul 29 15:27:11 localhost systemd: Starting OpenNebula pre-networking contextualization script…

P.S. On Debian some problem. Error start one-context-reconfigure-delayed on boot. Timeout 1.5-2 minutes. I use doc from http://docs.opennebula.org/5.4/operation/vm_setup/add_content.html.
P.P.S Debian 8 boot with error: ALERT! /dev/disk/vda1 does not exist. Dropping to a shell.

Find in one-context-local.service:
Wants=network-pre.target dev-disk-by\x2dlabel-CONTEXT.device
After=dev-disk-by\x2dlabel-CONTEXT.device

What is “dev-disk-by\x2dlabel-CONTEXT.device” ?

Thanks!

Any updates on this?

Hello,
I remove Wants=network-pre.target dev-disk-by\x2dlabel-CONTEXT.device and After=dev-disk-by\x2dlabel-CONTEXT.device from systemd unit and all ok.

Anton, thanks a lot for your quick reply. :slight_smile:

Hello,

What is “dev-disk-by\x2dlabel-CONTEXT.device” ?

on KVM, the contextualization is provided by the ISO. This is a service dependency to wait until the device is ready (device units are generated by the systemd for the dependency purposes). If ISO isn’t available (on VMware/EC2), the service can really wait or even fail. I have opened a bug for it, it may be better to replace both dev-disk* entries with local-fs.target.

P.S. On Debian some problem. Error start one-context-reconfigure-delayed on boot. Timeout 1.5-2 minutes. I use doc from http://docs.opennebula.org/5.4/operation/vm_setup/add_content.html2.

Delayed reconfiguration is expected to take longer time, there is a 60 seconds sleep. This is a background service, normally you shouldn’t be worried about it. But, with no ISO present, it can take even longer and misbehave. It should be fixed after changing the dependencies above.

P.P.S Debian 8 boot with error: ALERT! /dev/disk/vda1 does not exist. Dropping to a shell.

I’m not aware of such an error. I guess, you are preparing your image on KVM with device names mounts, and not UUID or label based. Such image can’t work across the environments. BTW on Debian, there is also a GRUB override in /etc/default/grub.d/99-opennebula-settings.cfg, but it shouldn’t break in a way you describe. Anyway, you can try to remove it and refresh the GRUB (via update-grub2).

Best regards,
Vlastimil Holer