Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Circular dependency in cloud-init units #1583

Open
wduncanfraser opened this issue Jan 7, 2025 · 3 comments
Open

Circular dependency in cloud-init units #1583

wduncanfraser opened this issue Jan 7, 2025 · 3 comments
Labels

Comments

@wduncanfraser
Copy link

Describe the bug

Using photonOS 5 (tested against most recent updates as of today) in VMware vSphere 8, we're seeing a dependency cycle in cloud-init that is causing VMs to randomly fail configuration/customization.

Screenshot 2025-01-07 at 17 51 47

Reproduction steps

  1. Configure photon OS cloud-init for VMware datasource
  2. Use vSphere cloud-init based customizations when cloning

Expected behavior

Deployments consistently work. Instead, deployments randomly fail due to systemd detecting dependency cycles related to cloud-init.

Additional context

Logs show detection of circular dependencies, resulting in cloud-init and other services being disabled.
Screenshot 2025-01-07 at 17 54 20
Screenshot 2025-01-07 at 17 54 36

It looks like the dependency cycle is created by sockets.target inherently depending on cloud-init-hotplugd.socket, which then depends on cloud-config.

@dcasota
Copy link
Contributor

dcasota commented Jan 8, 2025

@wduncanfraser
Copy link
Author

There was an upstream cloud-init fix canonical/cloud-init#5722 mentioned at https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/2081124

Thanks for pointing out this upstream fix!

I pulled these changes into the cloud-init-hotplugd.socket systemd unit in my VM template, and after about 20 test provisions have not seen this issue occur again.

It looks like once this version of cloud-init is pulled into photon, this bug should be resolved.

@dcasota
Copy link
Contributor

dcasota commented Jan 8, 2025

This is the year of SRP. That groundwork unleashes many automation benefits.
This upstream fix is strange because it hasn‘t been included in the November 2024 version. SRP has static link connectivity for that if I understood the code right.
Glad it helped. Back to the Photon OS team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants