[PATCH blivet v2] disable LVM metadata backup during image installs (#1066004)
wwoods at redhat.com
Tue Sep 23 22:13:59 UTC 2014
This is version two of this patchset, with all Anne's changes incorporated.
It's intended for master and rhel7 (the bug in question is a RHEL7 bug).
The first patch refactors devicelibs.lvm to move _getConfigArgs into lvm(),
which now works just like its analogue in mdraid.py.
The second patch factors out LVMAsRootTestCaseBase from LVMAsRootTestCase so
I can add a new test case in patch 3. (It also fixes a buglet in tearDown.)
The third patch adds flags.lvm_metadata_backup, which (if set) directs lvm()
to disable its automatic backup/archive of metadata. It also adds a
(new, separate) test case for that functionality.
The last patch was the real goal: if *anaconda* is doing an image install,
then we disable flags.lvm_metadata_backup so we don't get LVM writing junk
all over /etc/lvm during image builds.
(This happens in update_from_anaconda_flags because I don't want to change
behavior for anything other than anaconda; all other callers get the default
behavior unless they request otherwise.)
blivet/devicelibs/lvm.py | 125 +++++++++++++++++++-------------------
blivet/flags.py | 9 +++
tests/devicelibs_test/lvm_test.py | 49 ++++++++++++---
3 files changed, 113 insertions(+), 70 deletions(-)
The code's a little more verbose than the first version of the patchset, but
I think it's improved by Anne's suggestions, so I'm willing to take the
minor hit to my lifetime code-contribution stats.
Thanks for your time and consideration, kind reviewers!
More information about the anaconda-patches