When bringing up the Azure datasource in cloud-init.service, cloud-init tries 'service start walinuxagent'.
That previously worked fine, and the agent would start and then would produce the certificate files that cloud-init needed (for ssh keys and things).
Now, however we see a log like: Sep 14 14:53:18 smoser0914x [CLOUDINIT] DataSourceAzure.py[DEBUG]: Getting metadata via agent. hostname=smoser0914x cmd=['service', 'walinuxagent', 'start'] Sep 14 14:53:18 smoser0914x [CLOUDINIT] util.py[DEBUG]: Running command hostname with allowed return codes [0] (shell=False, capture=True) Sep 14 14:53:18 smoser0914x [CLOUDINIT] DataSourceAzure.py[DEBUG]: invoking agent: ['service', 'walinuxagent', 'start'] Sep 14 14:53:18 smoser0914x [CLOUDINIT] util.py[DEBUG]: Running command ['service', 'walinuxagent', 'start'] with allowed return codes [0] (shell=False, capture=True) Sep 14 14:53:18 smoser0914x [CLOUDINIT] util.py[WARNING]: agent command '['service', 'walinuxagent', 'start']' failed. Sep 14 14:53:19 smoser0914x [CLOUDINIT] util.py[DEBUG]: agent command '['service', 'walinuxagent', 'start']' failed. Traceback (most recent call last): File "/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceAzure.py", line 145, in get_metadata_from_agent invoke_agent(agent_cmd) File "/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceAzure.py", line 452, in invoke_agent util.subp(cmd, shell=(not isinstance(cmd, list))) File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 1832, in subp cmd=args) cloudinit.util.ProcessExecutionError: Unexpected error while running command. Command: ['service', 'walinuxagent', 'start'] Exit code: 1 Reason: - Stdout: '' Stderr: " Failed to start walinuxagent.service: Transaction order is cyclic. See system logs for details. See system logs and 'systemctl status walinuxagent.service' for details
I believe the relevant change is in 34a26f7f https://git.launchpad.net/cloud-init/commit/?id=34a26f7f59f2963691e36ca0476bec9fc9ccef63 That added multi-user.target to the list of After for cloud-init-final.service.
When bringing up the Azure datasource in cloud-init.service, cloud-init tries 'service start walinuxagent'.
That previously worked fine, and the agent would start and then would produce the certificate files that cloud-init needed (for ssh keys and things).
Now, however we see a log like: .py[DEBUG] : Getting metadata via agent. hostname= smoser0914x cmd=['service', 'walinuxagent', 'start'] .py[DEBUG] : invoking agent: ['service', 'walinuxagent', 'start'] python3/ dist-packages/ cloudinit/ sources/ DataSourceAzure .py", line 145, in get_metadata_ from_agent agent(agent_ cmd) python3/ dist-packages/ cloudinit/ sources/ DataSourceAzure .py", line 452, in invoke_agent python3/ dist-packages/ cloudinit/ util.py" , line 1832, in subp util.ProcessExe cutionError: Unexpected error while running command. service: Transaction order is cyclic. See system logs for details. service' for details
Sep 14 14:53:18 smoser0914x [CLOUDINIT] DataSourceAzure
Sep 14 14:53:18 smoser0914x [CLOUDINIT] util.py[DEBUG]: Running command hostname with allowed return codes [0] (shell=False, capture=True)
Sep 14 14:53:18 smoser0914x [CLOUDINIT] DataSourceAzure
Sep 14 14:53:18 smoser0914x [CLOUDINIT] util.py[DEBUG]: Running command ['service', 'walinuxagent', 'start'] with allowed return codes [0] (shell=False, capture=True)
Sep 14 14:53:18 smoser0914x [CLOUDINIT] util.py[WARNING]: agent command '['service', 'walinuxagent', 'start']' failed.
Sep 14 14:53:19 smoser0914x [CLOUDINIT] util.py[DEBUG]: agent command '['service', 'walinuxagent', 'start']' failed.
Traceback (most recent call last):
File "/usr/lib/
invoke_
File "/usr/lib/
util.subp(cmd, shell=(not isinstance(cmd, list)))
File "/usr/lib/
cmd=args)
cloudinit.
Command: ['service', 'walinuxagent', 'start']
Exit code: 1
Reason: -
Stdout: ''
Stderr: "
Failed to start walinuxagent.
See system logs and 'systemctl status walinuxagent.
I believe the relevant change is in 34a26f7f /git.launchpad. net/cloud- init/commit/ ?id=34a26f7f59f 2963691e36ca047 6bec9fc9ccef63 final.service.
https:/
That added multi-user.target to the list of After for cloud-init-