snap prepare-image should not overwrite /etc/cloud/cloud.cfg in final image

Bug #1633263 reported by Ryan Harper
6
This bug affects 1 person
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/dpkg/status
     2.15.2ubuntu1 500
        500 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
     2.0.2 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages

3. snap prepare-image copies 'cloud.conf' file to /etc/cloud/cloud.cfg.d/90_snap_prepare.cfg
  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/cloud.cfg; un-aware users will find that they need to know the contents of what cloud.cfg should look like and carry that with their gadget rather than just the few changes they might want to make (like override which datasources to search or which config modules to run).

Revision history for this message
Oliver Grawert (ogra) wrote :

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).

Revision history for this message
Michael Vogt (mvo) wrote :

I think this got discussed since this bug got opened and we agreed on the behaviour. Please reopen if I misremember.

Changed in snapd (Ubuntu):
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.