** Description changed:

+ [ Impact ]
+ 
+  * A systemd dependency cycle causes either cloud-init or the azure-
+ proxy-agent service to be disabled automatically to resolve the
+ conflict.
+ 
+  * On VM images, this behavior causes a catastrophic failure as cloud-
+ init is responsible for setting up networking, users, and sshd.
+ 
+ [ Test Plan ]
+ 
+  * As described in this SRU exception:
+ https://documentation.ubuntu.com/sru/en/latest/reference/exception-
+ Azure-Proxy-Agent-Updates. The agent will be installed on a live image
+ (before first boot) and CPC will run their test suites on Azure to
+ verify that the VM behaves as expected and that no regression is
+ introduced.
+ 
+  * The Microsoft team responsible for this agent will also use their own
+ tests to verify the new version.
+ 
+ [ Where problems could occur ]
+ 
+  * Setting DefaultDependencies=no removes basic dependencies that
+ systemd adds by default to a service. If the agent doesn't explicitly
+ specify all its actual dependencies, it might fail to start in certain
+ conditions.
+ 
+ [ Original Description ]
+ 
  The agent sets Before=network-pre.target but doesn't set 
DefaultDependencies=no which is dangerous as it means that the service has to 
run after basic.target but while the networking is not configured. It's not 
always a problem but if another service depends on basic.target (default) and 
expects networking to be available (for example by specifying 
After=systemd-networkd-wait-online.service), a dependency cycle will appear.
  On Ubuntu 22.04 and Ubuntu 24.04. This causing cloud-init to be disabled 
(thus provisioning to fail) if the azure-proxy-agent is pre-installed on a VM 
image:
  
  Sep 03 16:27:16 ubuntu systemd[1]: sysinit.target: Found ordering cycle on 
cloud-init.service/start
  Sep 03 16:27:16 ubuntu systemd[1]: sysinit.target: Found dependency on 
systemd-networkd-wait-online.service/start
  Sep 03 16:27:16 ubuntu systemd[1]: sysinit.target: Found dependency on 
systemd-networkd.service/start
  Sep 03 16:27:16 ubuntu systemd[1]: sysinit.target: Found dependency on 
network-pre.target/start
  Sep 03 16:27:16 ubuntu systemd[1]: sysinit.target: Found dependency on 
azure-proxy-agent.service/start
  Sep 03 16:27:16 ubuntu systemd[1]: sysinit.target: Found dependency on 
basic.target/start
  Sep 03 16:27:16 ubuntu systemd[1]: sysinit.target: Found dependency on 
sysinit.target/start
  Sep 03 16:27:16 ubuntu systemd[1]: sysinit.target: Job 
cloud-init.service/start deleted to break ordering cycle starting with 
sysinit.target/start

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2122345

Title:
  Systemd circular dependency

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/azure-proxy-agent/+bug/2122345/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to