This only applies to the format, not the device. Thus this needs to be popped off before passing the rest of the kwargs along. This was found by kickstart_tests in anaconda. --- blivet/blivet.py | 1 + blivet/devices/btrfs.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/blivet/blivet.py b/blivet/blivet.py index 3cdf629..d27e072 100644 --- a/blivet/blivet.py +++ b/blivet/blivet.py @@ -1013,6 +1013,7 @@ class Blivet(object): fmt_args["subvolspec"] = name kwargs.pop("metaDataLevel", None) kwargs.pop("dataLevel", None) + kwargs.pop("createOptions", None) else: dev_class = BTRFSVolumeDevice # set up the volume label, using hostname if necessary diff --git a/blivet/devices/btrfs.py b/blivet/devices/btrfs.py index d336f91..788ff83 100644 --- a/blivet/devices/btrfs.py +++ b/blivet/devices/btrfs.py @@ -179,6 +179,7 @@ class BTRFSVolumeDevice(BTRFSDevice, ContainerDevice, RaidDevice): # unrecognized keyword error in superclass constructor dataLevel = kwargs.pop("dataLevel", None) metaDataLevel = kwargs.pop("metaDataLevel", None) + createOptions = kwargs.pop("createOptions", None)
super(BTRFSVolumeDevice, self).__init__(*args, **kwargs)
@@ -207,7 +208,8 @@ class BTRFSVolumeDevice(BTRFSDevice, ContainerDevice, RaidDevice): volUUID=self.uuid, device=self.path, subvolspec=self.vol_id, - mountopts="subvolid=%d" % self.vol_id) + mountopts="subvolid=%d" % self.vol_id, + createOptions=createOptions) self.originalFormat = copy.deepcopy(self.format)
self._defaultSubVolumeID = None
This only applies to the format, not the device. Thus this needs to be popped off before passing the rest of the kwargs along. This was found by kickstart_tests in anaconda.
blivet/blivet.py | 1 + blivet/devices/btrfs.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-)
Note: this probably applies to rhel7-branch, too.
- Chris
On Fri, 2015-07-17 at 15:37 -0400, Chris Lumens wrote:
This only applies to the format, not the device. Thus this needs to be popped off before passing the rest of the kwargs along. This was found by kickstart_tests in anaconda.
blivet/blivet.py | 1 + blivet/devices/btrfs.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-)
Note: this probably applies to rhel7-branch, too.
Looks okay to me for both branches.
anaconda-patches@lists.fedorahosted.org