Skip to content

Compute-Init: wait for cloud-init before NFS mount #635

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

Merged
merged 2 commits into from
Apr 1, 2025

Conversation

JohnGarbutt
Copy link
Member

We are seeing issues where compute-init hits:

TASK [Check if hostvars exist]
FAILED! => {"changed": false, "msg": "Permission denied"}

We have found we are ignoring errors on the mount. Its possible the mount will fail if the host networking has not be setup.

Lets wait to make sure we can talk to NFS before attempting the NFS mount, mostly checking because the host networking stack might not yet be setup correctly.

We could do "cloud-init status --wait" and block on cloud-init having finished, however we don't really depend on all parts of cloud-init being complete.
Equally, we could think about ansible-init systemd unit file depending on cloud-init or the network being available, but there are cases where we do not want that.

We are seeing issues where compute-init hits:

TASK [Check if hostvars exist]
FAILED! => {"changed": false, "msg": "Permission denied"}

We have found we are ignoring errors on the mount.
Its possible the mount will fail if the host networking
has not be setup.

Lets wait to make sure we can talk to NFS before attempting
the NFS mount, mostly checking because the host networking
stack might not yet be setup correctly.

We could do "cloud-init status --wait" and block on cloud-init
having finished, however we don't really depend on all parts
of cloud-init being complete.
Equally, we could think about ansible-init systemd unit file
depending on cloud-init or the network being available, but
there are cases where we do not want that.
@JohnGarbutt JohnGarbutt requested a review from a team as a code owner March 31, 2025 16:24
@bertiethorpe
Copy link
Member

Copy link
Collaborator

@sjpb sjpb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bertiethorpe bertiethorpe merged commit 8113fbe into main Apr 1, 2025
7 checks passed
@bertiethorpe bertiethorpe deleted the bugfix/wait-for-nfs-cloud-init branch April 1, 2025 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants