snap prepare-image should not overwrite /etc/cloud/cloud.cfg in final image
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
1. % lsb_release -rd
Description: Ubuntu 16.04.1 LTS
Release: 16.04
2. % apt-cache policy snapd
snapd:
Installed: 2.16
Candidate: 2.16
Version table:
*** 2.16 100
100 /var/lib/
2.15.2ubuntu1 500
500 http://
2.0.2 500
500 http://
3. snap prepare-image copies 'cloud.conf' file to /etc/cloud/
Using the config dot dir prevents clobbering the default cloud-init config file that's present in images that use cloud-init.
4. snap prepare-image clobbers /etc/cloud/
how would these unaware users actually do this ?
the dir is empty by default in all supported core snaps we have and i dont think we will start shipping any readonly bits there by hardcoding them into the ubuntu-core snap build system.
the way to have a different config is either to have your own gadget and use it with --extra-snaps when running ubuntu-image or to modify the image manually (definitely not suggested though) *after* you built it (so the ubuntu-image copy function would not come into play anyway).