Systemd circular dependency

Bug #2122345 reported by Gauthier Jolly
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
azure-proxy-agent (Ubuntu)
Fix Released
Undecided
Gauthier Jolly
Jammy
Fix Committed
Undecided
Gauthier Jolly
Noble
Fix Committed
Undecided
Gauthier Jolly
Plucky
Fix Committed
Undecided
Gauthier Jolly

Bug Description

[ 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

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package azure-proxy-agent - 1.0.30-0ubuntu5

---------------
azure-proxy-agent (1.0.30-0ubuntu5) questing; urgency=medium

  * d/p/fix-systemd-deps-cycle.patch: fix dependency cycle in the unit file.
    Use DefaultDependencies=no to remove the dependency on basic.target
    (LP: #2122345).

 -- Gauthier Jolly <email address hidden> Mon, 08 Sep 2025 10:26:17 +0200

Changed in azure-proxy-agent (Ubuntu):
status: New → Fix Released
Gauthier Jolly (gjolly)
Changed in azure-proxy-agent (Ubuntu Jammy):
status: New → In Progress
Changed in azure-proxy-agent (Ubuntu Noble):
status: New → In Progress
Changed in azure-proxy-agent (Ubuntu Plucky):
status: New → In Progress
Changed in azure-proxy-agent (Ubuntu Jammy):
assignee: nobody → Gauthier Jolly (gjolly)
Changed in azure-proxy-agent (Ubuntu Noble):
assignee: nobody → Gauthier Jolly (gjolly)
Changed in azure-proxy-agent (Ubuntu Plucky):
assignee: nobody → Gauthier Jolly (gjolly)
Changed in azure-proxy-agent (Ubuntu):
assignee: nobody → Gauthier Jolly (gjolly)
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Please update the bug description with the SRU template.

Gauthier Jolly (gjolly)
description: updated
Revision history for this message
Andreas Hasenack (ahasenack) wrote : Please test proposed package

Hello Gauthier, or anyone else affected,

Accepted azure-proxy-agent into plucky-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/azure-proxy-agent/1.0.30-0ubuntu4~25.04.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-plucky to verification-done-plucky. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-plucky. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in azure-proxy-agent (Ubuntu Plucky):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-plucky
Changed in azure-proxy-agent (Ubuntu Noble):
status: In Progress → Fix Committed
tags: added: verification-needed-noble
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Hello Gauthier, or anyone else affected,

Accepted azure-proxy-agent into noble-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/azure-proxy-agent/1.0.30-0ubuntu4~24.04.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-noble to verification-done-noble. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-noble. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in azure-proxy-agent (Ubuntu Jammy):
status: In Progress → Fix Committed
tags: added: verification-needed-jammy
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Hello Gauthier, or anyone else affected,

Accepted azure-proxy-agent into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/azure-proxy-agent/1.0.30-0ubuntu4~22.04.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Miriam España Acebal (mirespace) wrote :

During the verification steps, we identified a bug [1] in the devel (Questing) that affects these uploads. Therefore, I have marked them as blocked while we implement the fix.

[1] https://bugs.launchpad.net/ubuntu/+source/azure-proxy-agent/+bug/2125930

tags: added: block-proposed block-proposed-jammy block-proposed-noble block-proposed-plucky
Revision history for this message
Julian Andres Klode (juliank) wrote :

Hello Gauthier, or anyone else affected,

Accepted azure-proxy-agent into plucky-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/azure-proxy-agent/1.0.30-0ubuntu6~25.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-plucky to verification-done-plucky. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-plucky. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Julian Andres Klode (juliank) wrote :

Hello Gauthier, or anyone else affected,

Accepted azure-proxy-agent into noble-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/azure-proxy-agent/1.0.30-0ubuntu6~24.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-noble to verification-done-noble. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-noble. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Julian Andres Klode (juliank) wrote :

Hello Gauthier, or anyone else affected,

Accepted azure-proxy-agent into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/azure-proxy-agent/1.0.30-0ubuntu6~22.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

tags: removed: block-proposed block-proposed-jammy block-proposed-noble block-proposed-plucky
Revision history for this message
Julian Andres Klode (juliank) wrote :

Removing the block-proposed-* tags as the fixed versions have been accepted

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.