include etc/ as well #69

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
Collaborator

mvo5 commented Oct 5, 2016

Trivial branch that ensures that /etc files created by snap prepare-image also end up in the image.

Sorry for the super short pull-request, the recent feature freeze of snapd made us very busy. The background of this PR is that snap prepare-image may now create files in /etc as well. However the current ubuntu-image will not put these files into /etc on the image because it currently only looks for /var. I think ideally ubuntu-image should just include all subdirs (that are not /boot or /home) in the writable partition under the system-data/ dir (just like its doing for /var now). However this was a short term fix.

Note that this fix is important because we change the way that cloud-init is disabled/enabled. Prepare-image now puts a /etc/cloud/cloud-init.disabled file into the image. So without this change images generated by ubuntu-image will start cloud init and casue 5 min boot delays.

Contributor

warsaw commented Oct 10, 2016

We're clearly making assumptions about what lives under the image/ directory in the unpack dir and where those contents should go. I'm not a fan of baking such assumptions into the code, because we'll just keep ending up in situations like this.

You suggest moving everything under image/ that's not boot/ or home/ but that's still baking in assumptions. We can do that, but 1) we should document that probably in the gadget.yaml spec or 2) extend the gadget.yaml spec to describe exactly what goes where.

Contributor

warsaw commented Oct 10, 2016

Contributor

warsaw commented Oct 11, 2016

Superseded by #72

@warsaw warsaw closed this Oct 11, 2016

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