Skip to content
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

Merged
merged 5 commits into from
May 13, 2020

Conversation

mvo5
Copy link
Contributor

@mvo5 mvo5 commented May 7, 2020

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.

mvo5 added a commit to mvo5/core20 that referenced this pull request May 7, 2020
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.
@mvo5 mvo5 removed the ⛔ Blocked label May 8, 2020
@mvo5
Copy link
Contributor Author

mvo5 commented May 8, 2020

This should work now

Copy link
Contributor

@stolowski stolowski left a 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/")
}

Copy link
Contributor

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.

@mvo5 mvo5 merged commit 36ddcb6 into snapcore:master May 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants