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

Update cloud-init configuration #5

Merged
merged 4 commits into from May 10, 2017

Conversation

raharper
Copy link
Contributor

@raharper raharper commented Apr 5, 2017

  • Add cloud-init datasource identify policy (ds-identify.cfg). The policy
    configured requires cloud-init systemd generator to detect local
    datasource to enable cloud-init, otherwise it will remain disabled.
  • Enable cloud-init to use netplan renderer for network configurations
  • Update writable-paths to sync /etc/cloud and /etc/cloud.cfg.d which
    enables the default configuration of cloud-init in the core image to be
    merged with configuration files which are added to the writable
    partition.
  • Dropped apt_configure configuration, it wasn't correct and cloud-init
    now skips running this module if the system it's running on is
    Ubuntu Core

- Add cloud-init datasource identify policy (ds-identify.cfg). The policy
  configured requires cloud-init systemd generator to detect local
  datasource to enable cloud-init, otherwise it will remain disabled.
- Enable cloud-init to use netplan renderer for network configurations
- Update writable-paths to sync /etc/cloud and /etc/cloud.cfg.d which
  enables the default configuration of cloud-init in the core image to be
  merged with configuration files which are added to the writable
  partition.
- Dropped apt_configure configuration, it wasn't correct and cloud-init
  now skips running this module if the system it's running on is
  Ubuntu Core
@@ -19,7 +19,8 @@
/var/snap auto persistent transition none
/var/lib/bluetooth auto persistent none none
# cloud-init
/etc/cloud auto persistent none none
/etc/cloud auto synced none none
/etc/cloud/cloud.cfg.d auto synced none none
Copy link
Contributor

Choose a reason for hiding this comment

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

this is redundant, only /etc/cloud will be enough... else you end up with stacked bind mounts

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What I recall was that a writable partition with only /etc/cloud/cloud.cfg.d/XX files, didn't get copied with only the /etc/cloud sync.

Let me test again without;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

After some testing locally; it appears that's good enough. I used only the /etc/cloud synced mode and I can populate files to /etc/cloud and /etc/cloud/cloud.cfg.d/ in the writable partition and both show up correctly. I've updated this branch with the change.

@@ -23,6 +26,3 @@ grub_dpkg:

# apt_pipelining logs warning on failed write to /etc/apt/apt.conf.d
apt_pipelining: "none"

# 'apt_configure' module should not run as apt is not used.
apt_configure_enabled: False
Copy link
Contributor

Choose a reason for hiding this comment

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

are you sure dropping this will not cause errors (given there is no actual apt)

Copy link
Contributor

Choose a reason for hiding this comment

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

heh, i should have read the commit message, ignore this one ...

Copy link
Contributor

Choose a reason for hiding this comment

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

hmm, also ... is there a git add missing for the mentioned ds-identify.cfg file ?

@raharper
Copy link
Contributor Author

raharper commented Apr 6, 2017 via email

@mvo5
Copy link
Contributor

mvo5 commented Apr 18, 2017

This looks fine, thank you!

Please note that existing systems will not get an updated 10_snappy.cfg even with the "synced" setting after a refresh. I assume this is known and its irrelevant, but still wanted to mention it.

We also have a 99-snappy-disable-network-config.cfg file created via livecd-rootfs currently in the images. Not sure if this interferes with the netplan renderer.

@ogra1
Copy link
Contributor

ogra1 commented Apr 18, 2017

@mvo5 snapcore/core#30 has the code to drop 99-snappy-disable-network-config.cfg, i guess we need to land both together (once the stable release is out we should do a coordinated landing and test build)

@mvo5 mvo5 merged commit b96b3e5 into snapcore:master May 10, 2017
mvo5 pushed a commit to mvo5/core-build that referenced this pull request Jul 3, 2019
initramfs: rename create_writable -> create_writable_on_tmpfs
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.

None yet

3 participants