vmware / vmware/photon

Circular dependency in cloud-init units

Open
#1,583 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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.

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.