cloud-init icon indicating copy to clipboard operation
cloud-init copied to clipboard

fstab entries with x-systemd.requires=cloud-init.service mean cloud-init will always run.

Open ubuntu-server-builder opened this issue 2 years ago • 1 comments

This bug was originally filed in Launchpad as LP: #1667878

Launchpad details
affected_projects = []
assignee = None
assignee_name = None
date_closed = None
date_created = 2017-02-25T03:38:02.297212+00:00
date_fix_committed = None
date_fix_released = None
id = 1667878
importance = medium
is_complete = False
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1667878
milestone = None
owner = smoser
owner_name = Scott Moser
private = False
status = confirmed
submitter = smoser
submitter_name = Scott Moser
tags = []
duplicates = []

Launchpad user Scott Moser(smoser) wrote on 2017-02-25T03:38:02.297212+00:00

when cloud-init writes mount entries into /etc/fstab, it adds: x-systemd.requires=cloud-init.service

This is because a subsequent boot of cloud-init may need to remove that entry (a new instance for example).

cloud-init has a feature where it can be disabled by: sudo touch /etc/cloud/cloud-init.disabled

The generator for cloud-init then says that the cloud-init.target does not need to run.

However, due to the (possibly stale) x-systemd.requires=cloud-init.service entries, cloud-init will still run.

I think what I'd like is a: x-systemd.after=cloud-init.service

ubuntu-server-builder avatar May 10 '23 21:05 ubuntu-server-builder

Launchpad user Scott Moser(smoser) wrote on 2017-05-18T20:35:20.942412+00:00

I don't know if it was present before or not, but there is now x-systemd.after

https://www.freedesktop.org/software/systemd/man/systemd.mount.html

ubuntu-server-builder avatar May 10 '23 21:05 ubuntu-server-builder