Problem: I used to be able to provision VMware virtual machines up until about a couple of weeks ago (only changes here were patching the Foreman server but not updating Foreman itself. I also did install the foreman_webhooks plugin but don’t see how this could affect). I would use cloud-init on Rocky Linux 8 images and it would work just fine.
Lately, however, something stopped working. I would provision a host. The userdata open-vm-tools provisioning template works fine. But when cloud-init runs on the host, it fails. The weird part is that if I do a rm -rf /var/lib/cloud/instances
and reboot the machine, then it runs properly but not sure why if the config is the same.
I upgraded to 3.6.1 to see if this helps resolve the issue but no dice.
Expected outcome: Expecting cloud-init to run properly and then phone back home to Foreman
Foreman and Proxy versions: was tried on 3.5.3 as well as 3.6.1
Foreman and Proxy plugin versions:
Distribution and version: Foreman server runs on Rocky Linux 8.8 as well as the hosts I’m provisioning.
Other relevant data:
Here’s the relevant portion of the cloud-init.log file
2023-07-11 15:28:41,627 - subp.py[DEBUG]: Running command ['/var/lib/cloud/instance/scripts/runcmd'] with allowed return codes [0] (shell=False, capture=False)
2023-07-11 15:28:58,306 - util.py[DEBUG]: Cloud-init 22.1-8.el8.0.2 received SIGTERM, exiting...
Filename: /usr/lib64/python3.6/subprocess.py
Function: _try_wait
Line number: 1424
Filename: /usr/lib64/python3.6/subprocess.py
Function: wait
Line number: 1477
Filename: /usr/lib64/python3.6/subprocess.py
Function: communicate
Line number: 855
2023-07-11 15:28:58,306 - handlers.py[DEBUG]: finish: modules-final/config-scripts-user: FAIL: running config-scripts-user with frequency once-per-instance
2023-07-11 15:28:58,306 - util.py[DEBUG]: Reading from /proc/uptime (quiet=False)
2023-07-11 15:28:58,306 - util.py[DEBUG]: Read 12 bytes from /proc/uptime
2023-07-11 15:28:58,306 - util.py[DEBUG]: cloud-init mode 'modules' took 16.734 seconds (16.74)
2023-07-11 15:28:58,306 - handlers.py[DEBUG]: finish: modules-final: FAIL: running modules for final