Please revise files in /etc/cloud tree

Bug #1849557 reported by Mathieu Trudel-Lapierre
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init (Ubuntu)
Triaged
Low
Unassigned

Bug Description

On a typical install of an Ubuntu system, and in particular on a Ubuntu Core system, there are various files under /etc/cloud.

Most of these files (especially on UC) appear to be default files that are unmodified, and are furthermore bind-mounted such that they may be writable (Ubuntu Core-specific).

Please revise the files in /etc/cloud. If the files are defaults that are otherwise used unmodified on systems, they probably should live in a tree under /usr/share, which is the commonly used location for system defaults and other architecture-independent files.

tags: added: writable-etc
Paride Legovini (paride)
Changed in cloud-init (Ubuntu):
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Ryan Harper (raharper) wrote :

# find /etc/cloud
/etc/cloud
/etc/cloud/cloud.cfg.d
/etc/cloud/cloud.cfg.d/05_logging.cfg
/etc/cloud/cloud.cfg.d/README
/etc/cloud/cloud.cfg.d/90_dpkg.cfg
/etc/cloud/build.info
/etc/cloud/cloud.cfg
/etc/cloud/templates
/etc/cloud/templates/chef_client.rb.tmpl
/etc/cloud/templates/ntp.conf.sles.tmpl
/etc/cloud/templates/hosts.freebsd.tmpl
/etc/cloud/templates/timesyncd.conf.tmpl
/etc/cloud/templates/chrony.conf.fedora.tmpl
/etc/cloud/templates/chrony.conf.sles.tmpl
/etc/cloud/templates/ntp.conf.fedora.tmpl
/etc/cloud/templates/hosts.redhat.tmpl
/etc/cloud/templates/hosts.debian.tmpl
/etc/cloud/templates/chrony.conf.opensuse.tmpl
/etc/cloud/templates/sources.list.ubuntu.tmpl
/etc/cloud/templates/chrony.conf.ubuntu.tmpl
/etc/cloud/templates/ntp.conf.debian.tmpl
/etc/cloud/templates/hosts.suse.tmpl
/etc/cloud/templates/chrony.conf.rhel.tmpl
/etc/cloud/templates/ntp.conf.opensuse.tmpl
/etc/cloud/templates/ntp.conf.rhel.tmpl
/etc/cloud/templates/sources.list.debian.tmpl
/etc/cloud/templates/chrony.conf.debian.tmpl
/etc/cloud/templates/ntp.conf.ubuntu.tmpl
/etc/cloud/templates/resolv.conf.tmpl

templates could go to /usr/share, the rest are expected to be writable, save build.info; but that's part of the image build rather than cloud-init owned/generated files.

Revision history for this message
Scott Moser (smoser) wrote :

The intent of the template files is that they *can* be user editable.
For example:
# head /etc/cloud/templates/sources.list.ubuntu.tmpl
## template:jinja
## Note, this file is written by cloud-init on first boot of an instance
## modifications made here will not survive a re-bundle.
## if you wish to make changes you can:
## a.) add 'apt_preserve_sources_list: true' to /etc/cloud/cloud.cfg
## or do the same in user-data
## b.) add sources in /etc/apt/sources.list.d
## c.) make changes to template file /etc/cloud/templates/sources.list.tmpl

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to

Perhaps the behavior could be changed to be like systemd, with files in /etc/ masking files in /usr .

then the files could be shipped in /usr/ and the user still able to mask them by adding files in /etc.

Revision history for this message
Dan Watkins (oddbloke) wrote :

I agree with Scott that putting them in /usr with overrides from /etc is the best path forward.

tags: added: id-5cf575c4e6712e6048974772
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.