[BUG] WALinuxAgent service should start after the cloud-config service
See original GitHub issueCurrently (On Canonical UbuntuServer 18.04-LTS) the WALinuxAgent service and cloud-init run in parallel on start-up causing issues with contention of the package repository.
I believe that WALinuxAgent should start after the cloud-config service to ensure that:
- Packages that extensions may depend on can be installed by cloud-init; (EG: https://github.com/microsoft/azure-pipelines-agent/issues/2866 for an example)
- Updates or packages installed by WALinuxAgent, or by Extensions, do not contend for the distribution’s package manager, causing locks and failures
Distro and WALinuxAgent details:
- Distro and Version: [e.g. Ubuntu 18.04 latest image]
- WALinuxAgent version
WALinuxAgent-2.2.45 running on ubuntu 18.04
Python: 3.6.9
Goal state agent: 2.2.48.1
Additional context My current situation when starting an Ubuntu 18.04 VM, with the Log Analytics extension is that:
- WALinuxAgent starts, installs the Log Analytics agent (through extension) then;
- Shortly after (~2 seconds or so) cloud-init starts with the following configuration:
package_upgrade: true
package_reboot_if_required: true
- WALinuxAgent or Log Analytics agent has the package repository lock, and causes cloud-init to fail
My current solution is to modify the service behaviour by adding this override to /etc/systemd/system/walinuxagent.service.d/override.conf
from within bootcmd
using cloud-init:
[Unit]
After=cloud-config.service
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Azure: cannot start walinux agent (Transaction order is cyclic.)
When bringing up the Azure datasource in cloud-init.service, cloud-init tries 'service start walinuxagent'. That previously worked fine, and the ...
Read more >1474226 – [WALA][cloud] cloud-init dhclient-hook script has ...
9-7 that caused dhclient and NetworkManager hook scripts to run on Microsoft Azure even when the cloud-init service was not enabled at boot....
Read more >cannot start walinux agent (Transaction order is cyclic.)
Public bug reported: When bringing up the Azure datasource in cloud-init.service, cloud-init tries 'service start walinuxagent'.
Read more >Swap file is not re-created after a Linux VM restarts
Describes how to resolve the problem that prevents a swap file from being re-created after a restart of a Linux virtual machine.
Read more >Azure — cloud-init 20.4.1 documentation
If you are configuring walinuxagent yourself, you will want to ensure that you have ... Azure provides the instance metadata service (IMDS) which...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Update on this; my proposed solution doesn’t appear to work reliably.
I believe that the
walinuxagent
service needs to start aftercloud-final
to be more robust. I’m achieving that with the following in cloud-init:Good workaround but this should be fix, or allow extension sequencing for customScript extension.