Update cloud-init configuration #5

Merged
merged 4 commits into from May 10, 2017

Conversation

Projects
None yet
3 participants
Contributor

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
Update cloud-init configuration
- 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
@@ -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
@ogra1

ogra1 Apr 6, 2017

Contributor

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

@ogra1

ogra1 Apr 6, 2017

Contributor

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

@ogra1

ogra1 Apr 6, 2017

Contributor

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

config/etc/system-image/writable-paths
@@ -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
@ogra1

ogra1 Apr 6, 2017

Contributor

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

@raharper

raharper Apr 17, 2017

Contributor

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;

@raharper

raharper Apr 17, 2017

Contributor

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.

Contributor

raharper commented Apr 6, 2017

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.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment