Circular dependency in cloud-init units
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 3.2k
- Forks
- 692
- PR merge metrics
- No merged PRs in 30d
Description
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.
Reproduction steps
- Configure photon OS cloud-init for VMware datasource
- 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.
It looks like the dependency cycle is created by sockets.target inherently depending on cloud-init-hotplugd.socket, which then depends on cloud-config.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by examining the systemd dependency logs and the cloud-init unit relationships, especially sockets.target, cloud-init-hotplugd.socket, and cloud-config. Reproduce the VMware datasource customization on photonOS 5 and trace the dependency cycle; done means deployments complete consistently without systemd disabling cloud-init or related services.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100