[rhel7-branch 1/1] If the parent volume has a label, use it in subvol's kickstart (#1072060)
mulkieran
installerbot-noreply at redhat.com
Tue Apr 21 18:45:57 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.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/blivet/devices.py b/blivet/devices.py
index 6f03262..c576a19 100644
--- a/blivet/devices.py
+++ b/blivet/devices.py
@@ -5710,6 +5710,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]
+
@classmethod
def isNameValid(cls, name):
# Override StorageDevice.isNameValid to allow /
--
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/5974302101f8814217ee61d779bff63ab6d3f00a
More information about the anaconda-patches
mailing list