[master 1/1] If the parent volume has a label, use it in subvol's kickstart (#1072060)
mulkieran
installerbot-noreply at redhat.com
Tue Apr 28 13:25:00 UTC 2015
From: mulhern <amulhern at redhat.com>
Resolves: rhbz#1072060
The LABEL= entry identifies the parent of the specified subvolume by its
label. If the parent volume does not have a label, then no entry is made
that identifies the parent volume and the generated kickstart
file will be rejected by ksvalidator.
Signed-off-by: mulhern <amulhern at redhat.com>
---
blivet/devices/btrfs.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/blivet/devices/btrfs.py b/blivet/devices/btrfs.py
index a7c67d9..ced4275 100644
--- a/blivet/devices/btrfs.py
+++ b/blivet/devices/btrfs.py
@@ -587,6 +587,14 @@ def populateKSData(self, data):
data.name = self.name
data.preexist = self.exists
+ # Identify the volume this subvolume belongs to by means of its
+ # label. If the volume has no label, do nothing.
+ # Note that doing nothing will create an invalid kickstart.
+ # See rhbz#1072060
+ label = self.parents[0].format.label
+ if label:
+ data.devices = ["LABEL=%s" % label]
+
class BTRFSSnapShotDevice(BTRFSSubVolumeDevice):
""" A btrfs snapshot pseudo-device.
--
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/18f29d89805a1b55e0d269623921bc9344ee37a1
More information about the anaconda-patches
mailing list