relabel /etc when creating upgrade disk images
AbandonedPublic

Authored by adamwill on Sep 9 2015, 4:37 AM.

Details

Summary

While working on changing the upgrade tests to use dnf, I found
that upgrades were failing seemingly because /etc/machine-id
was mislabelled (the upgrade process would succeed but there
were lots of errors caused by failed reads of that file, and
the upgraded system would fail to boot). restorecon'ing /etc
while we're doing stuff to the image seems to fix it.

Test Plan

Try the upgrade tests (PR coming soon, I hope) with disk
images created without this fix, then images created with this fix.
Also you can just boot a VM with the images and check the context of
/etc/machine-id (and look out for the error messages).

Diff Detail

Repository
rOPENQA fedora_openqa
Branch
etc-selinux
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 181
Build 181: arc lint + arc unit
adamwill retitled this revision from to relabel /etc when creating upgrade disk images.Sep 9 2015, 4:37 AM
adamwill updated this object.
adamwill edited the test plan for this revision. (Show Details)
adamwill added reviewers: garretraziel, jskladan.
jskladan accepted this revision.Sep 9 2015, 7:44 AM
This revision is now accepted and ready to land.Sep 9 2015, 7:44 AM

seems this may actually be a consequence of a virt-builder bug, so holding fire for now.

Yes, this is OK, but I don't think that this should be necessary, because whole system should be relabeled - it seems like there is a bug in virt-builder that is preventing it. As soon as https://bugzilla.redhat.com/show_bug.cgi?id=1261377 gets fixed, this won't be necessary.

adamwill abandoned this revision.Sep 10 2015, 2:38 PM

The problem indeed seems to be fixed by the virt-builder update, so no need for this.