-
Notifications
You must be signed in to change notification settings - Fork 562
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
sysconfig: use new _writable_defaults dir to create cloud config #8612
Conversation
This commit move /etc/cloud from a synced dir to a persistent dir. Synced dirs have strange semantics, e.g. the user cannot remove a file that is also present in the core20 snap in the dir without it coming back on the next reboot. Hence we want to avoid any synced dirs. This requires the following prereqs: snapcore#46 snapcore/snapd#8612 first.
This commit creates the cloud configuration during install using the new _writable_defaults mechanism from: snapcore/core20#46 This allows us to remove the "synced" setting from the writable-path for the /etc/cloud dir.
48954c1
to
205ba81
Compare
This should work now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
func ubuntuDataCloudDir(rootdir string) string { | ||
return filepath.Join(rootdir, writableDefaultsDir, "etc/cloud/") | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a more generic helper in #8533 per Samuele's comment under my PR, we can tweak this later depending on which PR lands first.
This commit creates the cloud configuration during install using
the new _writable_defaults mechanism from:
snapcore/core20#46
This allows us to remove the "synced" setting from the writable-path
for the /etc/cloud dir.
Marked blocked until the new initramfs with the _writable_defaults changes
is available.
Note that the updated spread test should fail as long as the initrd does not
support _writable_defaults so this should only become green when it's actually
ready.