commit 1e23fb451bcc71854a87c15fe31f68959b6e8598 Author: CentOS Sources Date: Tue Feb 23 06:13:09 2021 +0000 import python-blivet-3.2.2-9.el8 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7dee816 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +SOURCES/blivet-3.2.2-tests.tar.gz +SOURCES/blivet-3.2.2.tar.gz diff --git a/.python-blivet.metadata b/.python-blivet.metadata new file mode 100644 index 0000000..5c5f71a --- /dev/null +++ b/.python-blivet.metadata @@ -0,0 +1,2 @@ +84988ad63a9a9ddd9f2075b82b36bd98261df9e9 SOURCES/blivet-3.2.2-tests.tar.gz +a89000bc2e9cfc8a1cfe09a58bf5e4e609f9b517 SOURCES/blivet-3.2.2.tar.gz diff --git a/SOURCES/0001-force-lvm-cli.plugin b/SOURCES/0001-force-lvm-cli.plugin new file mode 100644 index 0000000..2a15b22 --- /dev/null +++ b/SOURCES/0001-force-lvm-cli.plugin @@ -0,0 +1,35 @@ +From 2f90040ff66eacc9715e370cd49ffb72d8d1f36f Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Wed, 11 Jul 2018 15:36:24 +0200 +Subject: [PATCH] Force command line based libblockdev LVM plugin + +--- + blivet/__init__.py | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/blivet/__init__.py b/blivet/__init__.py +index c5a75bb..cb75917 100644 +--- a/blivet/__init__.py ++++ b/blivet/__init__.py +@@ -63,11 +63,16 @@ gi.require_version("BlockDev", "2.0") + from gi.repository import GLib + from gi.repository import BlockDev as blockdev + if arch.is_s390(): +- _REQUESTED_PLUGIN_NAMES = set(("lvm", "btrfs", "swap", "crypto", "loop", "mdraid", "mpath", "dm", "s390", "nvdimm")) ++ _REQUESTED_PLUGIN_NAMES = set(("btrfs", "swap", "crypto", "loop", "mdraid", "mpath", "dm", "s390", "nvdimm")) + else: +- _REQUESTED_PLUGIN_NAMES = set(("lvm", "btrfs", "swap", "crypto", "loop", "mdraid", "mpath", "dm", "nvdimm")) ++ _REQUESTED_PLUGIN_NAMES = set(("btrfs", "swap", "crypto", "loop", "mdraid", "mpath", "dm", "nvdimm")) + + _requested_plugins = blockdev.plugin_specs_from_names(_REQUESTED_PLUGIN_NAMES) ++# XXX force non-dbus LVM plugin ++lvm_plugin = blockdev.PluginSpec() ++lvm_plugin.name = blockdev.Plugin.LVM ++lvm_plugin.so_name = "libbd_lvm.so.2" ++_requested_plugins.append(lvm_plugin) + try: + # do not check for dependencies during libblockdev initializtion, do runtime + # checks instead +-- +1.8.3.1 + diff --git a/SOURCES/0002-remove-btrfs-plugin.patch b/SOURCES/0002-remove-btrfs-plugin.patch new file mode 100644 index 0000000..5755e9e --- /dev/null +++ b/SOURCES/0002-remove-btrfs-plugin.patch @@ -0,0 +1,28 @@ +From 6bf3378d3d2a1b6a4338df0c4dd36a783a641633 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Mon, 16 Jul 2018 14:26:11 +0200 +Subject: [PATCH] Remove btrfs from requested libblockdev plugins + +--- + blivet/__init__.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/blivet/__init__.py b/blivet/__init__.py +index cb75917..09f8b1c 100644 +--- a/blivet/__init__.py ++++ b/blivet/__init__.py +@@ -63,9 +63,9 @@ gi.require_version("BlockDev", "2.0") + from gi.repository import GLib + from gi.repository import BlockDev as blockdev + if arch.is_s390(): +- _REQUESTED_PLUGIN_NAMES = set(("btrfs", "swap", "crypto", "loop", "mdraid", "mpath", "dm", "s390", "nvdimm")) ++ _REQUESTED_PLUGIN_NAMES = set(("swap", "crypto", "loop", "mdraid", "mpath", "dm", "s390", "nvdimm")) + else: +- _REQUESTED_PLUGIN_NAMES = set(("btrfs", "swap", "crypto", "loop", "mdraid", "mpath", "dm", "nvdimm")) ++ _REQUESTED_PLUGIN_NAMES = set(("swap", "crypto", "loop", "mdraid", "mpath", "dm", "nvdimm")) + + _requested_plugins = blockdev.plugin_specs_from_names(_REQUESTED_PLUGIN_NAMES) + # XXX force non-dbus LVM plugin +-- +1.8.3.1 + diff --git a/SOURCES/0003-Skip-test_mounting-for-filesystems-that-are-not-moun.patch b/SOURCES/0003-Skip-test_mounting-for-filesystems-that-are-not-moun.patch new file mode 100644 index 0000000..0f7efc0 --- /dev/null +++ b/SOURCES/0003-Skip-test_mounting-for-filesystems-that-are-not-moun.patch @@ -0,0 +1,29 @@ +From 760f08bbf7b801acd393a6d2b7447ca6ff28d590 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Fri, 22 May 2020 12:35:11 +0200 +Subject: [PATCH] Skip test_mounting for filesystems that are not mountable + +We can have tools to create the filesystem without having kernel +module for mounting it. +--- + tests/formats_test/fstesting.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tests/formats_test/fstesting.py b/tests/formats_test/fstesting.py +index aa1b42e5..62f806f9 100644 +--- a/tests/formats_test/fstesting.py ++++ b/tests/formats_test/fstesting.py +@@ -156,8 +156,8 @@ class FSAsRoot(loopbackedtestcase.LoopBackedTestCase): + # FIXME: BTRFS fails to mount + if isinstance(an_fs, fs.BTRFS): + self.skipTest("no mounting filesystem %s" % an_fs.name) +- if not an_fs.formattable: +- self.skipTest("can not create filesystem %s" % an_fs.name) ++ if not an_fs.formattable or not an_fs.mountable: ++ self.skipTest("can not create or mount filesystem %s" % an_fs.name) + an_fs.device = self.loop_devices[0] + self.assertIsNone(an_fs.create()) + self.assertTrue(an_fs.test_mount()) +-- +2.25.4 + diff --git a/SOURCES/0004-Add-extra-sleep-after-pvremove-call.patch b/SOURCES/0004-Add-extra-sleep-after-pvremove-call.patch new file mode 100644 index 0000000..96969d0 --- /dev/null +++ b/SOURCES/0004-Add-extra-sleep-after-pvremove-call.patch @@ -0,0 +1,38 @@ +From 6a62a81d326a1121a2768735e52a8e1c5e5d6f0d Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Wed, 24 Jun 2020 14:43:47 +0200 +Subject: [PATCH] Add extra sleep after pvremove call + +To give enough time for the async pvscan to finish scanning the +partition before removing it. + +Resolves: rhbz#1640601 +--- + blivet/formats/lvmpv.py | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/blivet/formats/lvmpv.py b/blivet/formats/lvmpv.py +index e4182adb..9f53ec6b 100644 +--- a/blivet/formats/lvmpv.py ++++ b/blivet/formats/lvmpv.py +@@ -26,6 +26,7 @@ gi.require_version("BlockDev", "2.0") + from gi.repository import BlockDev as blockdev + + import os ++import time + + from ..storage_log import log_method_call + from parted import PARTITION_LVM +@@ -137,6 +138,9 @@ class LVMPhysicalVolume(DeviceFormat): + DeviceFormat._destroy(self, **kwargs) + finally: + udev.settle() ++ # LVM now has async pvscan jobs so udev.settle doesn't help and if we try to remove ++ # the partition immediately after the pvremove we get an error ++ time.sleep(5) + + @property + def destroyable(self): +-- +2.25.4 + diff --git a/SOURCES/0005-Round-down-to-nearest-MiB-value-when-writing-ks-parittion-info.ks b/SOURCES/0005-Round-down-to-nearest-MiB-value-when-writing-ks-parittion-info.ks new file mode 100644 index 0000000..5ea1723 --- /dev/null +++ b/SOURCES/0005-Round-down-to-nearest-MiB-value-when-writing-ks-parittion-info.ks @@ -0,0 +1,48 @@ +From dc964f10d24499ea7fc90fd896a8b50c9c5e2d74 Mon Sep 17 00:00:00 2001 +From: "Samantha N. Bueno" +Date: Wed, 8 Jun 2016 13:47:40 -0400 +Subject: [PATCH] Round down to nearest MiB value when writing ks parittion + info. + +On s390x in particular, some partition alignment issue is causing fractional +sizes to be reported. Pykickstart doesn't take anything except int values for +partition info, hence the call to roundToNearest. + +This change only affects the data that is written to ks.cfg. + +Resolves: rhbz#1850670 +--- + blivet/devices/partition.py | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/blivet/devices/partition.py b/blivet/devices/partition.py +index 0c56a6e7..76048aed 100644 +--- a/blivet/devices/partition.py ++++ b/blivet/devices/partition.py +@@ -35,7 +35,7 @@ + from ..storage_log import log_method_call + from .. import udev + from ..formats import DeviceFormat, get_format +-from ..size import Size, MiB ++from ..size import Size, MiB, ROUND_DOWN + + import logging + log = logging.getLogger("blivet") +@@ -967,7 +967,8 @@ def populate_ksdata(self, data): + data.resize = (self.exists and self.target_size and + self.target_size != self.current_size) + if not self.exists: +- data.size = self.req_base_size.convert_to(MiB) ++ # round this to nearest MiB before doing anything else ++ data.size = self.req_base_size.round_to_nearest(MiB, rounding=ROUND_DOWN).convert_to(spec=MiB) + data.grow = self.req_grow + if self.req_grow: + data.max_size_mb = self.req_max_size.convert_to(MiB) +@@ -980,4 +981,6 @@ def populate_ksdata(self, data): + data.on_part = self.name # by-id + + if data.resize: +- data.size = self.size.convert_to(MiB) ++ # on s390x in particular, fractional sizes are reported, which ++ # cause issues when writing to ks.cfg ++ data.size = self.size.round_to_nearest(MiB, rounding=ROUND_DOWN).convert_to(spec=MiB) diff --git a/SOURCES/0006-Blivet-RHEL-8.3-localization-update.patch b/SOURCES/0006-Blivet-RHEL-8.3-localization-update.patch new file mode 100644 index 0000000..ad1368b --- /dev/null +++ b/SOURCES/0006-Blivet-RHEL-8.3-localization-update.patch @@ -0,0 +1,438 @@ +From 44d7e9669fe55fd4b2b3a6c96f23e2d0669f8dbb Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Thu, 9 Jul 2020 13:42:31 +0200 +Subject: [PATCH] Blivet RHEL 8.3 localization update + +Resolves: rhbz#1820565 +--- + po/ja.po | 33 ++++++++++----------- + po/ko.po | 83 ++++++++++++++++++++++++----------------------------- + po/zh_CN.po | 28 +++++++++--------- + 3 files changed, 68 insertions(+), 76 deletions(-) + +diff --git a/po/ja.po b/po/ja.po +index 733e63a0..b4c864c2 100644 +--- a/po/ja.po ++++ b/po/ja.po +@@ -29,17 +29,17 @@ msgid "" + msgstr "" + "Project-Id-Version: PACKAGE VERSION\n" + "Report-Msgid-Bugs-To: \n" +-"POT-Creation-Date: 2020-05-21 12:42+0200\n" +-"PO-Revision-Date: 2018-09-21 01:08+0000\n" +-"Last-Translator: Copied by Zanata \n" +-"Language-Team: Japanese (http://www.transifex.com/projects/p/blivet/language/" +-"ja/)\n" ++"POT-Creation-Date: 2020-01-29 14:04+0100\n" ++"PO-Revision-Date: 2020-07-03 07:42+0000\n" ++"Last-Translator: Ludek Janda \n" ++"Language-Team: Japanese \n" + "Language: ja\n" + "MIME-Version: 1.0\n" + "Content-Type: text/plain; charset=UTF-8\n" + "Content-Transfer-Encoding: 8bit\n" + "Plural-Forms: nplurals=1; plural=0;\n" +-"X-Generator: Zanata 4.6.2\n" ++"X-Generator: Weblate 4.1.1\n" + + #: ../blivet/errors.py:210 + msgid "" +@@ -47,6 +47,8 @@ msgid "" + "of the UUID value which should be unique. In that case you can either " + "disconnect one of the devices or reformat it." + msgstr "" ++"これは通常、デバイスイメージを複製したことで、一意であるはずのUUID値が重複することが原因です。その場合は、いずれかのデバイスを切断するか、再フォーマッ" ++"トしてください。" + + #: ../blivet/errors.py:217 + msgid "" +@@ -54,9 +56,8 @@ msgid "" + "kernel is reporting partitions on. It is unclear what the exact problem is. " + "Please file a bug at http://bugzilla.redhat.com" + msgstr "" +-"なんらかの理由により、kernel がパーティションを報告しているディスク上でディス" +-"クラベルを見つけられませんでした。何が問題となっているかは不明です。バグを " +-"http://bugzilla.redhat.com に提出してください。" ++"なんらかの理由により、kernel がパーティションを報告しているディスク上でディスクラベルを見つけられませんでした。何が問題となっているかは不明です。" ++"バグを http://bugzilla.redhat.com に提出してください" + + #: ../blivet/errors.py:224 + msgid "" +@@ -84,7 +85,7 @@ msgstr "FCoE は使用できません" + + #: ../blivet/zfcp.py:62 + msgid "You have not specified a device number or the number is invalid" +-msgstr "デバイス番号を指定していないか番号が無効です。" ++msgstr "デバイス番号を指定していないか番号が無効です" + + #: ../blivet/zfcp.py:64 + msgid "You have not specified a worldwide port name or the name is invalid." +@@ -202,7 +203,7 @@ msgstr "iSCSI ノードが何も探索できませんでした" + + #: ../blivet/iscsi.py:550 + msgid "No new iSCSI nodes discovered" +-msgstr "新しい iSCSI ノードは見つかりませんでした。" ++msgstr "新しい iSCSI ノードは見つかりませんでした" + + #: ../blivet/iscsi.py:553 + msgid "Could not log in to any of the discovered nodes" +@@ -257,7 +258,7 @@ msgstr "要求を超えたサイズを再利用することができません" + + #: ../blivet/partitioning.py:1419 + msgid "DiskChunk requests must be of type PartitionRequest" +-msgstr "DiskChunk 要求には PartitionResquest タイプが必要です。" ++msgstr "DiskChunk 要求には PartitionResquest タイプが必要です" + + #: ../blivet/partitioning.py:1432 + msgid "partitions allocated outside disklabel limits" +@@ -265,7 +266,7 @@ msgstr "ディスクラベルの範囲外に割り当てられたパーティシ + + #: ../blivet/partitioning.py:1517 + msgid "VGChunk requests must be of type LVRequest" +-msgstr "VGChunk 要求には LVResquest タイプが必要です。" ++msgstr "VGChunk 要求には LVResquest タイプが必要です" + + #. by now we have allocated the PVs so if there isn't enough + #. space in the VG we have a real problem +@@ -368,15 +369,15 @@ msgstr "" + msgid "Cannot remove a member from existing %s array" + msgstr "既存の %s 配列からメンバーを削除できません" + +-#: ../blivet/formats/fs.py:934 ++#: ../blivet/formats/fs.py:932 + msgid "EFI System Partition" + msgstr "EFI システムパーティション" + +-#: ../blivet/formats/fs.py:1139 ++#: ../blivet/formats/fs.py:1137 + msgid "Apple Bootstrap" + msgstr "Apple ブートストラップ" + +-#: ../blivet/formats/fs.py:1175 ++#: ../blivet/formats/fs.py:1173 + msgid "Linux HFS+ ESP" + msgstr "Linux HFS+ ESP" + +diff --git a/po/ko.po b/po/ko.po +index 66789af0..747b00c5 100644 +--- a/po/ko.po ++++ b/po/ko.po +@@ -20,17 +20,17 @@ msgid "" + msgstr "" + "Project-Id-Version: PACKAGE VERSION\n" + "Report-Msgid-Bugs-To: \n" +-"POT-Creation-Date: 2020-05-21 12:42+0200\n" +-"PO-Revision-Date: 2018-09-21 01:08+0000\n" +-"Last-Translator: Copied by Zanata \n" +-"Language-Team: Korean (http://www.transifex.com/projects/p/blivet/language/" +-"ko/)\n" ++"POT-Creation-Date: 2020-01-29 14:04+0100\n" ++"PO-Revision-Date: 2020-07-03 07:42+0000\n" ++"Last-Translator: Ludek Janda \n" ++"Language-Team: Korean \n" + "Language: ko\n" + "MIME-Version: 1.0\n" + "Content-Type: text/plain; charset=UTF-8\n" + "Content-Transfer-Encoding: 8bit\n" + "Plural-Forms: nplurals=1; plural=0;\n" +-"X-Generator: Zanata 4.6.2\n" ++"X-Generator: Weblate 4.1.1\n" + + #: ../blivet/errors.py:210 + msgid "" +@@ -38,6 +38,8 @@ msgid "" + "of the UUID value which should be unique. In that case you can either " + "disconnect one of the devices or reformat it." + msgstr "" ++"이는 일반적으로 장치 이미지 복제로 인해 고유한 UUID 값이 복제되기 때문에 발생합니다. 이 경우 장치 중 하나를 분리하거나 다시 " ++"포맷할 수 있습니다." + + #: ../blivet/errors.py:217 + msgid "" +@@ -45,9 +47,8 @@ msgid "" + "kernel is reporting partitions on. It is unclear what the exact problem is. " + "Please file a bug at http://bugzilla.redhat.com" + msgstr "" +-"일부 이유로 커널이 파티션 설정을 보고하는 디스크에 디스크 레이블을 배치할 수 " +-"없습니다. 정확한 문제가 무엇인지 알 수 없습니다. http://bugzilla.redhat.com" +-"에 버그 리포트를 제출해 주십시오." ++"일부 이유로 커널이 파티션 설정을 보고하는 디스크에 디스크 레이블을 배치할 수 없습니다. 정확한 문제가 무엇인지 알 수 없습니다. " ++"http://bugzilla.redhat.com에 버그 리포트를 제출해 주십시오" + + #: ../blivet/errors.py:224 + msgid "" +@@ -78,11 +79,11 @@ msgstr "장치 번호를 지정하지 않았거나, 번호가 맞지 않습니 + + #: ../blivet/zfcp.py:64 + msgid "You have not specified a worldwide port name or the name is invalid." +-msgstr "세계 포트 이름(WWPN)을 지정하지 않았거나, 포트 번호가 맞지 않습니다" ++msgstr "세계 포트 이름(WWPN)을 지정하지 않았거나, 포트 번호가 맞지 않습니다." + + #: ../blivet/zfcp.py:66 + msgid "You have not specified a FCP LUN or the number is invalid." +-msgstr "FCP LUN을 지정하지 않았거나, 번호가 맞지 않습니다" ++msgstr "FCP LUN을 지정하지 않았거나, 번호가 맞지 않습니다." + + #: ../blivet/zfcp.py:91 + #, python-format +@@ -103,7 +104,7 @@ msgstr "WWPN %(wwpn)s을(를) zFCP 장치 %(devnum)s (%(e)s)에 추가할 수 + #: ../blivet/zfcp.py:119 + #, python-format + msgid "WWPN %(wwpn)s not found at zFCP device %(devnum)s." +-msgstr "WWPN %(wwpn)s을(를) zFCP 장치 %(devnum)s에서 찾을 수 없습니다. " ++msgstr "WWPN %(wwpn)s을(를) zFCP 장치 %(devnum)s에서 찾을 수 없습니다." + + #: ../blivet/zfcp.py:134 + #, python-format +@@ -111,8 +112,7 @@ msgid "" + "Could not add LUN %(fcplun)s to WWPN %(wwpn)s on zFCP device %(devnum)s " + "(%(e)s)." + msgstr "" +-"zFCP 장치 %(devnum)s (%(e)s)에서 LUN %(fcplun)s을(를) WWPN %(wwpn)s에 추가할 " +-"수 없습니다. " ++"zFCP 장치 %(devnum)s (%(e)s)에서 LUN %(fcplun)s을(를) WWPN %(wwpn)s에 추가할 수 없습니다." + + #: ../blivet/zfcp.py:140 + #, python-format +@@ -136,18 +136,14 @@ msgstr "" + msgid "" + "Failed LUN %(fcplun)s at WWPN %(wwpn)s on zFCP device %(devnum)s removed " + "again." +-msgstr "" +-"zFCP 장치 %(devnum)s에 있는 WWPN %(wwpn)s에서 실패한 LUN %(fcplun)s이 다시 삭" +-"제되었습니다. " ++msgstr "zFCP 장치 %(devnum)s에 있는 WWPN %(wwpn)s에서 실패한 LUN %(fcplun)s이 다시 삭제되었습니다." + + #: ../blivet/zfcp.py:218 + #, python-format + msgid "" + "Could not correctly delete SCSI device of zFCP %(devnum)s %(wwpn)s " + "%(fcplun)s (%(e)s)." +-msgstr "" +-"zFCP %(devnum)s %(wwpn)s %(fcplun)s (%(e)s)의 SCSI 장치를 올바르게 삭제할 수 " +-"없습니다. " ++msgstr "zFCP %(devnum)s %(wwpn)s %(fcplun)s (%(e)s)의 SCSI 장치를 올바르게 삭제할 수 없습니다." + + #: ../blivet/zfcp.py:227 + #, python-format +@@ -161,41 +157,40 @@ msgstr "" + #: ../blivet/zfcp.py:245 + #, python-format + msgid "Could not remove WWPN %(wwpn)s on zFCP device %(devnum)s (%(e)s)." +-msgstr "" +-"zFCP 장치 %(devnum)s (%(e)s)에서 WWPN %(wwpn)s을(를) 제거할 수 없습니다. " ++msgstr "zFCP 장치 %(devnum)s (%(e)s)에서 WWPN %(wwpn)s을(를) 제거할 수 없습니다." + + #: ../blivet/zfcp.py:271 + #, python-format + msgid "Could not set zFCP device %(devnum)s offline (%(e)s)." +-msgstr "zFCP 장치 %(devnum)s를 오프라인 (%(e)s)으로 설정할 수 없습니다. " ++msgstr "zFCP 장치 %(devnum)s를 오프라인 (%(e)s)으로 설정할 수 없습니다." + + #: ../blivet/iscsi.py:217 + msgid "Unable to change iSCSI initiator name once set" +-msgstr "iSCSI 개시자 이름이 설정되면 이를 변경할 수 없음 " ++msgstr "iSCSI 개시자 이름이 설정되면 이를 변경할 수 없음" + + #: ../blivet/iscsi.py:219 + msgid "Must provide an iSCSI initiator name" +-msgstr "iSCSI 개시자 이름을 지정하십시오 " ++msgstr "iSCSI 개시자 이름을 지정하십시오" + + #: ../blivet/iscsi.py:410 + msgid "iSCSI not available" +-msgstr "iSCSI 사용 불가능 " ++msgstr "iSCSI 사용 불가능" + + #: ../blivet/iscsi.py:412 + msgid "No initiator name set" +-msgstr "이니셰이터 이름이 설정되지 않음 " ++msgstr "이니셰이터 이름이 설정되지 않음" + + #: ../blivet/iscsi.py:530 + msgid "No iSCSI nodes discovered" +-msgstr "iSCSI 노드를 찾을 수 없음 " ++msgstr "iSCSI 노드를 찾을 수 없음" + + #: ../blivet/iscsi.py:550 + msgid "No new iSCSI nodes discovered" +-msgstr "새 iSCSI 노드를 찾을 수 없음 " ++msgstr "새 iSCSI 노드를 찾을 수 없음" + + #: ../blivet/iscsi.py:553 + msgid "Could not log in to any of the discovered nodes" +-msgstr "검색된 노드로 로그인할 수 없음 " ++msgstr "검색된 노드로 로그인할 수 없음" + + #: ../blivet/partitioning.py:454 + msgid "unable to allocate aligned partition" +@@ -265,7 +260,7 @@ msgstr "LVM 요청에 필요한 공간이 충분하지 않습니다" + #: ../blivet/deviceaction.py:194 + #, python-format + msgid "Executing %(action)s" +-msgstr "%(action)s 실행 " ++msgstr "%(action)s 실행" + + #: ../blivet/deviceaction.py:322 + msgid "create device" +@@ -286,7 +281,7 @@ msgstr "포맷 생성" + #: ../blivet/deviceaction.py:613 + #, python-format + msgid "Creating %(type)s on %(device)s" +-msgstr "%(device)s에 %(type)s 생성 " ++msgstr "%(device)s에 %(type)s 생성" + + #: ../blivet/deviceaction.py:640 + #, python-format +@@ -327,11 +322,11 @@ msgstr "컨테이너 멤버 삭제" + + #: ../blivet/deviceaction.py:1058 + msgid "configure format" +-msgstr "포맷 설정 " ++msgstr "포맷 설정" + + #: ../blivet/deviceaction.py:1114 + msgid "configure device" +-msgstr "장치 설정 " ++msgstr "장치 설정" + + #: ../blivet/devices/raid.py:58 + #, python-format +@@ -341,32 +336,28 @@ msgid "" + msgid_plural "" + "RAID level %(raid_level)s requires that device have at least %(min_members)d " + "members." +-msgstr[0] "" +-"RAID 레벨 %(raid_level)s에는 최소 %(min_members)d개의 장치 구성원이 필요합니" +-"다. " ++msgstr[0] "RAID 레벨 %(raid_level)s에는 최소 %(min_members)d개의 장치 구성원이 필요합니다." + + #: ../blivet/devices/raid.py:79 + #, python-format + msgid "" + "RAID level %(raid_level)s is an invalid value. Must be one of (%(levels)s)." +-msgstr "" +-"RAID 레벨 %(raid_level)s이/가 유효한 값이 아닙니다. (%(levels)s) 중 하나여야 " +-"합니다. " ++msgstr "RAID 레벨 %(raid_level)s이/가 유효한 값이 아닙니다. (%(levels)s) 중 하나여야 합니다." + + #: ../blivet/devices/raid.py:104 + #, python-format + msgid "Cannot remove a member from existing %s array" +-msgstr "기존 %s 어레이에서 장치 구성원을 제거할 수 없습니다 " ++msgstr "기존 %s 어레이에서 장치 구성원을 제거할 수 없습니다" + +-#: ../blivet/formats/fs.py:934 ++#: ../blivet/formats/fs.py:932 + msgid "EFI System Partition" +-msgstr "EFI 시스템 파티션 " ++msgstr "EFI 시스템 파티션" + +-#: ../blivet/formats/fs.py:1139 ++#: ../blivet/formats/fs.py:1137 + msgid "Apple Bootstrap" + msgstr "Apple 부트스트랩" + +-#: ../blivet/formats/fs.py:1175 ++#: ../blivet/formats/fs.py:1173 + msgid "Linux HFS+ ESP" + msgstr "Linux HFS+ ESP" + +@@ -384,7 +375,7 @@ msgstr "암호화됨" + + #: ../blivet/formats/luks.py:388 + msgid "DM Integrity" +-msgstr "DM 무결성 " ++msgstr "DM 무결성" + + #: ../blivet/formats/__init__.py:148 + msgid "Unknown" +diff --git a/po/zh_CN.po b/po/zh_CN.po +index 480801de..2be6d492 100644 +--- a/po/zh_CN.po ++++ b/po/zh_CN.po +@@ -20,24 +20,24 @@ msgid "" + msgstr "" + "Project-Id-Version: PACKAGE VERSION\n" + "Report-Msgid-Bugs-To: \n" +-"POT-Creation-Date: 2020-05-21 12:42+0200\n" +-"PO-Revision-Date: 2018-09-13 02:13+0000\n" +-"Last-Translator: Copied by Zanata \n" +-"Language-Team: Chinese (China) (http://www.transifex.com/projects/p/blivet/" +-"language/zh_CN/)\n" ++"POT-Creation-Date: 2020-01-29 14:04+0100\n" ++"PO-Revision-Date: 2020-07-03 07:42+0000\n" ++"Last-Translator: Ludek Janda \n" ++"Language-Team: Chinese (Simplified) \n" + "Language: zh_CN\n" + "MIME-Version: 1.0\n" + "Content-Type: text/plain; charset=UTF-8\n" + "Content-Transfer-Encoding: 8bit\n" + "Plural-Forms: nplurals=1; plural=0;\n" +-"X-Generator: Zanata 4.6.2\n" ++"X-Generator: Weblate 4.1.1\n" + + #: ../blivet/errors.py:210 + msgid "" + "This is usually caused by cloning the device image resulting in duplication " + "of the UUID value which should be unique. In that case you can either " + "disconnect one of the devices or reformat it." +-msgstr "" ++msgstr "这通常是由于克隆设备镜像导致 UUID 值重复造成的,而 UUID 值应该是唯一的。如果是这种情况,可以断开其中一个设备或重新格式化它。" + + #: ../blivet/errors.py:217 + msgid "" +@@ -45,8 +45,8 @@ msgid "" + "kernel is reporting partitions on. It is unclear what the exact problem is. " + "Please file a bug at http://bugzilla.redhat.com" + msgstr "" +-"由于某些原因无法定位内核报告中显示在其中进行分区的磁盘的磁盘标签。尚不了解具" +-"体问题所在。请在 http://bugzilla.redhat.com 提交 bug。" ++"由于某些原因无法定位内核报告中显示在其中进行分区的磁盘的磁盘标签。尚不了解具体问题所在。请在 http://bugzilla.redhat.com 提交 " ++"bug" + + #: ../blivet/errors.py:224 + msgid "" +@@ -170,7 +170,7 @@ msgstr "设定后就无法更改 iSCSI 启动程序名称" + + #: ../blivet/iscsi.py:219 + msgid "Must provide an iSCSI initiator name" +-msgstr "您必须提供一个 iSCSI 启动程序名称。" ++msgstr "您必须提供一个 iSCSI 启动程序名称" + + #: ../blivet/iscsi.py:410 + msgid "iSCSI not available" +@@ -223,7 +223,7 @@ msgstr "" + + #: ../blivet/partitioning.py:962 + msgid "Unable to allocate requested partition scheme." +-msgstr "无法分配所需分区方案" ++msgstr "无法分配所需分区方案。" + + #: ../blivet/partitioning.py:997 + msgid "not enough free space after creating extended partition" +@@ -347,15 +347,15 @@ msgstr "" + msgid "Cannot remove a member from existing %s array" + msgstr "无法从存在的 %s 阵列中删除一个成员" + +-#: ../blivet/formats/fs.py:934 ++#: ../blivet/formats/fs.py:932 + msgid "EFI System Partition" + msgstr "EFI 系统分区" + +-#: ../blivet/formats/fs.py:1139 ++#: ../blivet/formats/fs.py:1137 + msgid "Apple Bootstrap" + msgstr "Apple Bootstrap" + +-#: ../blivet/formats/fs.py:1175 ++#: ../blivet/formats/fs.py:1173 + msgid "Linux HFS+ ESP" + msgstr "Linux HFS+ ESP" + +-- +2.25.4 + diff --git a/SOURCES/0007-Do-not-use-FSAVAIL-and-FSUSE-options-when-running-lsblk.patch b/SOURCES/0007-Do-not-use-FSAVAIL-and-FSUSE-options-when-running-lsblk.patch new file mode 100644 index 0000000..c8e1447 --- /dev/null +++ b/SOURCES/0007-Do-not-use-FSAVAIL-and-FSUSE-options-when-running-lsblk.patch @@ -0,0 +1,24 @@ +From 7bc4e324580656585adad0cbe51d60ed3540b766 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Fri, 3 Jul 2020 13:04:23 +0200 +Subject: [PATCH] Do not use FSAVAIL and FSUSE% options when running lsblk + +These options were added in util-linux 2.33 which is not available +on older systems so we should not use these. +--- + blivet/blivet.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/blivet/blivet.py b/blivet/blivet.py +index fcc2080b..e7dbd37b 100644 +--- a/blivet/blivet.py ++++ b/blivet/blivet.py +@@ -77,7 +77,7 @@ def __init__(self): + self._dump_file = "%s/storage.state" % tempfile.gettempdir() + + try: +- options = "NAME,SIZE,OWNER,GROUP,MODE,FSTYPE,LABEL,UUID,PARTUUID,FSAVAIL,FSUSE%,MOUNTPOINT" ++ options = "NAME,SIZE,OWNER,GROUP,MODE,FSTYPE,LABEL,UUID,PARTUUID,MOUNTPOINT" + out = capture_output(["lsblk", "--bytes", "-a", "-o", options]) + except Exception: # pylint: disable=broad-except + pass diff --git a/SOURCES/0008-set-allowed-disk-labels-for-s390x-as-standard-ones-plus-dasd.patch b/SOURCES/0008-set-allowed-disk-labels-for-s390x-as-standard-ones-plus-dasd.patch new file mode 100644 index 0000000..931fca0 --- /dev/null +++ b/SOURCES/0008-set-allowed-disk-labels-for-s390x-as-standard-ones-plus-dasd.patch @@ -0,0 +1,39 @@ +From 462099a9137fb7997140360c07665a21615a0fea Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Dan=20Hor=C3=A1k?= +Date: Tue, 7 Jul 2020 13:19:02 +0200 +Subject: [PATCH] set allowed disk labels for s390x as standard ones (msdos + + gpt) plus dasd + +This will solve issues when a SCSI or NVMe disk with GPT partition table +is used with a s390x machine (rhbz#1827066, rhbz#1854110). +--- + blivet/formats/disklabel.py | 2 +- + tests/formats_test/disklabel_test.py | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/blivet/formats/disklabel.py b/blivet/formats/disklabel.py +index 3dcac12b..53e2c010 100644 +--- a/blivet/formats/disklabel.py ++++ b/blivet/formats/disklabel.py +@@ -230,7 +230,7 @@ def get_platform_label_types(cls): + elif arch.is_efi() and not arch.is_aarch64(): + label_types = ["gpt", "msdos"] + elif arch.is_s390(): +- label_types = ["msdos", "dasd"] ++ label_types += ["dasd"] + + return label_types + +diff --git a/tests/formats_test/disklabel_test.py b/tests/formats_test/disklabel_test.py +index 94f3775f..3068dc07 100644 +--- a/tests/formats_test/disklabel_test.py ++++ b/tests/formats_test/disklabel_test.py +@@ -95,7 +95,7 @@ def test_platform_label_types(self, arch): + arch.is_arm.return_value = False + + arch.is_s390.return_value = True +- self.assertEqual(disklabel_class.get_platform_label_types(), ["msdos", "dasd"]) ++ self.assertEqual(disklabel_class.get_platform_label_types(), ["msdos", "gpt", "dasd"]) + arch.is_s390.return_value = False + + def test_label_type_size_check(self): diff --git a/SOURCES/0009-Do-not-use-BlockDev-utils_have_kernel_module-to-check-for-modules.patch b/SOURCES/0009-Do-not-use-BlockDev-utils_have_kernel_module-to-check-for-modules.patch new file mode 100644 index 0000000..8736460 --- /dev/null +++ b/SOURCES/0009-Do-not-use-BlockDev-utils_have_kernel_module-to-check-for-modules.patch @@ -0,0 +1,47 @@ +From 7303f4a3f2fe3280339f6303dcff31b6ade12176 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Thu, 9 Jul 2020 16:30:55 +0200 +Subject: [PATCH] Do not use BlockDev.utils_have_kernel_module to check for + modules + +The function unfortunately uses only the name when searching for +the module and we need to use aliases for modules like ext2 and +ext3. So we need to use "modprobe --dry-run" instead. +--- + blivet/formats/fs.py | 12 +++--------- + 1 file changed, 3 insertions(+), 9 deletions(-) + +diff --git a/blivet/formats/fs.py b/blivet/formats/fs.py +index eee15aaa..bcfbc08e 100644 +--- a/blivet/formats/fs.py ++++ b/blivet/formats/fs.py +@@ -60,12 +60,6 @@ + import logging + log = logging.getLogger("blivet") + +-import gi +-gi.require_version("GLib", "2.0") +-gi.require_version("BlockDev", "2.0") +- +-from gi.repository import GLib +-from gi.repository import BlockDev + + AVAILABLE_FILESYSTEMS = kernel_filesystems + +@@ -462,13 +456,13 @@ def check_module(self): + + for module in self._modules: + try: +- succ = BlockDev.utils_have_kernel_module(module) +- except GLib.GError as e: ++ rc = util.run_program(["modprobe", "--dry-run", module]) ++ except OSError as e: + log.error("Could not check kernel module availability %s: %s", module, e) + self._supported = False + return + +- if not succ: ++ if rc: + log.debug("Kernel module %s not available", module) + self._supported = False + return diff --git a/SOURCES/0010-Fix-name-resolution-for-MD-devices-and-partitions-on.patch b/SOURCES/0010-Fix-name-resolution-for-MD-devices-and-partitions-on.patch new file mode 100644 index 0000000..e94ba8e --- /dev/null +++ b/SOURCES/0010-Fix-name-resolution-for-MD-devices-and-partitions-on.patch @@ -0,0 +1,844 @@ +From 18ce766bc90abdf0d8ca54bdf578463392a52ee9 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Wed, 12 Aug 2020 10:57:19 +0200 +Subject: [PATCH 1/2] Fix name resolution for MD devices and partitions on them + +UDev data for both member disks/partitions and partitions on arrays +contain the MD_* properties we must be extra careful when deciding +what name we'll use for the device. + +Resolves: rhbz#1862904 +--- + blivet/udev.py | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +diff --git a/blivet/udev.py b/blivet/udev.py +index 41c99496..c85eb3dc 100644 +--- a/blivet/udev.py ++++ b/blivet/udev.py +@@ -202,9 +202,16 @@ def device_get_name(udev_info): + """ Return the best name for a device based on the udev db data. """ + if "DM_NAME" in udev_info: + name = udev_info["DM_NAME"] +- elif "MD_DEVNAME" in udev_info and os.path.exists(device_get_sysfs_path(udev_info) + "/md"): ++ elif "MD_DEVNAME" in udev_info: + mdname = udev_info["MD_DEVNAME"] +- if device_is_partition(udev_info): ++ if device_is_md(udev_info): ++ # MD RAID array -> use MD_DEVNAME ++ name = mdname ++ elif device_get_format(udev_info) == "linux_raid_member": ++ # MD RAID member -> use SYS_NAME ++ name = udev_info["SYS_NAME"] ++ elif device_is_partition(udev_info): ++ # partition on RAID -> construct name from MD_DEVNAME + partition number + # for partitions on named RAID we want to use the raid name, not + # the node, e.g. "raid1" instead of "md127p1" + partnum = udev_info["ID_PART_ENTRY_NUMBER"] +@@ -213,6 +220,7 @@ def device_get_name(udev_info): + else: + name = mdname + partnum + else: ++ # something else -> default to MD_DEVNAME + name = mdname + else: + name = udev_info["SYS_NAME"] +-- +2.25.4 + + +From dc96961adcb9dd6ef6d09e4daaa0a5eaae1ffe60 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Wed, 12 Aug 2020 11:10:03 +0200 +Subject: [PATCH 2/2] Add tests for udev.device_get_name for RAID devices + +This includes sample UDev data for various combinations of RAID +devices configuration. + +Related: rhbz#1862904 +--- + tests/udev_data/__init__.py | 0 + tests/udev_data/raid_data.py | 705 +++++++++++++++++++++++++++++++++++ + tests/udev_test.py | 46 +++ + 3 files changed, 751 insertions(+) + create mode 100644 tests/udev_data/__init__.py + create mode 100644 tests/udev_data/raid_data.py + +diff --git a/tests/udev_data/__init__.py b/tests/udev_data/__init__.py +new file mode 100644 +index 00000000..e69de29b +diff --git a/tests/udev_data/raid_data.py b/tests/udev_data/raid_data.py +new file mode 100644 +index 00000000..509cbfbd +--- /dev/null ++++ b/tests/udev_data/raid_data.py +@@ -0,0 +1,705 @@ ++# Sample UDev data for various MD RAID devices: ++# - member_boot: data for the member disk or partition after booting the system ++# - member_assemble: data for the member disk or partition after re-assembling stopped array using ++# 'mdadm --assemble --scan' (yes, this is different from member_boot) ++# - raid_device: data for the RAID array device ++# - raid_partition: data for partition on the array ++# ++# We have data for different combinations of member "types", MD metadata versions and named v unnamed ++# RAID devices. ++# The data were gathered on Fedora 32. ++ ++ ++class RaidOnDisk1(): ++ member_name = "sda" ++ raid_name = "127" ++ raid_node = "md127" ++ metadata_version = "1.2" ++ ++ member_boot = {'DEVLINKS': '/dev/disk/by-path/pci-0000:00:11.0-scsi-0:0:0:0 /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-0-0-0', ++ 'DEVNAME': '/dev/sda', ++ 'DEVPATH': '/devices/pci0000:00/0000:00:11.0/virtio5/host8/target8:0:0/8:0:0:0/block/sda', ++ 'DEVTYPE': 'disk', ++ 'ID_BUS': 'scsi', ++ 'ID_FS_LABEL': 'localhost.localdomain:127', ++ 'ID_FS_LABEL_ENC': 'localhost.localdomain:127', ++ 'ID_FS_TYPE': 'linux_raid_member', ++ 'ID_FS_USAGE': 'raid', ++ 'ID_FS_UUID': '54956eb2-6983-8759-e2ad-4c40acc92e4b', ++ 'ID_FS_UUID_ENC': '54956eb2-6983-8759-e2ad-4c40acc92e4b', ++ 'ID_FS_UUID_SUB': '64f96f0b-e97c-9157-d393-1fe457f3dd59', ++ 'ID_FS_UUID_SUB_ENC': '64f96f0b-e97c-9157-d393-1fe457f3dd59', ++ 'ID_FS_VERSION': '1.2', ++ 'ID_MODEL': 'QEMU_HARDDISK', ++ 'ID_MODEL_ENC': 'QEMU\\x20HARDDISK\\x20\\x20\\x20', ++ 'ID_PATH': 'pci-0000:00:11.0-scsi-0:0:0:0', ++ 'ID_PATH_TAG': 'pci-0000_00_11_0-scsi-0_0_0_0', ++ 'ID_REVISION': '2.5+', ++ 'ID_SCSI': '1', ++ 'ID_SERIAL': '0QEMU_QEMU_HARDDISK_drive-scsi0-0-0-0', ++ 'ID_SERIAL_SHORT': 'drive-scsi0-0-0-0', ++ 'ID_TYPE': 'disk', ++ 'ID_VENDOR': 'QEMU', ++ 'ID_VENDOR_ENC': 'QEMU\\x20\\x20\\x20\\x20', ++ 'MAJOR': '8', ++ 'MD_DEVICE': 'md127', ++ 'MD_DEVNAME': '127', ++ 'MD_FOREIGN': 'no', ++ 'MD_STARTED': 'unsafe', ++ 'MINOR': '0', ++ 'SUBSYSTEM': 'block', ++ 'SYSTEMD_WANTS': 'mdadm-last-resort@md127.timer', ++ 'TAGS': ':systemd:', ++ 'USEC_INITIALIZED': '5529231', ++ 'SYS_NAME': 'sda', ++ 'SYS_PATH': '/sys/devices/pci0000:00/0000:00:11.0/virtio5/host8/target8:0:0/8:0:0:0/block/sda'} ++ ++ member_assemble = {'DEVLINKS': '/dev/disk/by-path/pci-0000:00:11.0-scsi-0:0:0:0 /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-0-0-0', ++ 'DEVNAME': '/dev/sda', ++ 'DEVPATH': '/devices/pci0000:00/0000:00:11.0/virtio5/host8/target8:0:0/8:0:0:0/block/sda', ++ 'DEVTYPE': 'disk', ++ 'ID_BUS': 'scsi', ++ 'ID_FS_LABEL': 'localhost.localdomain:127', ++ 'ID_FS_LABEL_ENC': 'localhost.localdomain:127', ++ 'ID_FS_TYPE': 'linux_raid_member', ++ 'ID_FS_USAGE': 'raid', ++ 'ID_FS_UUID': '54956eb2-6983-8759-e2ad-4c40acc92e4b', ++ 'ID_FS_UUID_ENC': '54956eb2-6983-8759-e2ad-4c40acc92e4b', ++ 'ID_FS_UUID_SUB': '64f96f0b-e97c-9157-d393-1fe457f3dd59', ++ 'ID_FS_UUID_SUB_ENC': '64f96f0b-e97c-9157-d393-1fe457f3dd59', ++ 'ID_FS_VERSION': '1.2', ++ 'ID_MODEL': 'QEMU_HARDDISK', ++ 'ID_MODEL_ENC': 'QEMU\\x20HARDDISK\\x20\\x20\\x20', ++ 'ID_PATH': 'pci-0000:00:11.0-scsi-0:0:0:0', ++ 'ID_PATH_TAG': 'pci-0000_00_11_0-scsi-0_0_0_0', ++ 'ID_REVISION': '2.5+', ++ 'ID_SCSI': '1', ++ 'ID_SERIAL': '0QEMU_QEMU_HARDDISK_drive-scsi0-0-0-0', ++ 'ID_SERIAL_SHORT': 'drive-scsi0-0-0-0', ++ 'ID_TYPE': 'disk', ++ 'ID_VENDOR': 'QEMU', ++ 'ID_VENDOR_ENC': 'QEMU\\x20\\x20\\x20\\x20', ++ 'MAJOR': '8', ++ 'MINOR': '0', ++ 'SUBSYSTEM': 'block', ++ 'TAGS': ':systemd:', ++ 'USEC_INITIALIZED': '5529231', ++ 'SYS_NAME': 'sda', ++ 'SYS_PATH': '/sys/devices/pci0000:00/0000:00:11.0/virtio5/host8/target8:0:0/8:0:0:0/block/sda'} ++ ++ raid_device = {'DEVLINKS': '/dev/disk/by-id/md-name-localhost.localdomain:127 /dev/disk/by-id/md-uuid-54956eb2:69838759:e2ad4c40:acc92e4b /dev/md/127', ++ 'DEVNAME': '/dev/md127', ++ 'DEVPATH': '/devices/virtual/block/md127', ++ 'DEVTYPE': 'disk', ++ 'ID_PART_TABLE_TYPE': 'dos', ++ 'ID_PART_TABLE_UUID': '4eec0361', ++ 'MAJOR': '9', ++ 'MD_DEVICES': '2', ++ 'MD_DEVICE_ev_sda_DEV': '/dev/sda', ++ 'MD_DEVICE_ev_sda_ROLE': '0', ++ 'MD_DEVICE_ev_sdb_DEV': '/dev/sdb', ++ 'MD_DEVICE_ev_sdb_ROLE': '1', ++ 'MD_DEVNAME': '127', ++ 'MD_LEVEL': 'raid1', ++ 'MD_METADATA': '1.2', ++ 'MD_NAME': 'localhost.localdomain:127', ++ 'MD_UUID': '54956eb2:69838759:e2ad4c40:acc92e4b', ++ 'MINOR': '127', ++ 'SUBSYSTEM': 'block', ++ 'SYSTEMD_WANTS': 'mdmonitor.service', ++ 'TAGS': ':systemd:', ++ 'USEC_INITIALIZED': '603606045', ++ 'SYS_NAME': 'md127', ++ 'SYS_PATH': '/sys/devices/virtual/block/md127'} ++ ++ raid_partition = {'DEVLINKS': '/dev/md/127p1 /dev/disk/by-id/md-uuid-54956eb2:69838759:e2ad4c40:acc92e4b-part1 /dev/disk/by-id/md-name-localhost.localdomain:127-part1', ++ 'DEVNAME': '/dev/md127p1', ++ 'DEVPATH': '/devices/virtual/block/md127/md127p1', ++ 'DEVTYPE': 'partition', ++ 'ID_PART_ENTRY_DISK': '9:127', ++ 'ID_PART_ENTRY_NUMBER': '1', ++ 'ID_PART_ENTRY_OFFSET': '2048', ++ 'ID_PART_ENTRY_SCHEME': 'dos', ++ 'ID_PART_ENTRY_SIZE': '2091008', ++ 'ID_PART_ENTRY_TYPE': '0x83', ++ 'ID_PART_ENTRY_UUID': '4eec0361-01', ++ 'MAJOR': '259', ++ 'MD_DEVICES': '2', ++ 'MD_DEVICE_ev_sda_DEV': '/dev/sda', ++ 'MD_DEVICE_ev_sda_ROLE': '0', ++ 'MD_DEVICE_ev_sdb_DEV': '/dev/sdb', ++ 'MD_DEVICE_ev_sdb_ROLE': '1', ++ 'MD_DEVNAME': '127', ++ 'MD_LEVEL': 'raid1', ++ 'MD_METADATA': '1.2', ++ 'MD_NAME': 'localhost.localdomain:127', ++ 'MD_UUID': '54956eb2:69838759:e2ad4c40:acc92e4b', ++ 'MINOR': '2', ++ 'PARTN': '1', ++ 'SUBSYSTEM': 'block', ++ 'SYSTEMD_WANTS': 'mdmonitor.service', ++ 'TAGS': ':systemd:', ++ 'USEC_INITIALIZED': '603714783', ++ 'SYS_NAME': 'md127p1', ++ 'SYS_PATH': '/sys/devices/virtual/block/md127/md127p1'} ++ ++ ++class RaidOnDisk2(): ++ member_name = "sdc" ++ raid_name = "name" ++ raid_node = "md127" ++ metadata_version = "1.2" ++ ++ member_boot = {'DEVLINKS': '/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-0-0-4 /dev/disk/by-path/pci-0000:00:11.0-scsi-0:0:0:4', ++ 'DEVNAME': '/dev/sdc', ++ 'DEVPATH': '/devices/pci0000:00/0000:00:11.0/virtio5/host8/target8:0:0/8:0:0:4/block/sdc', ++ 'DEVTYPE': 'disk', ++ 'ID_BUS': 'scsi', ++ 'ID_FS_LABEL': 'localhost.localdomain:name', ++ 'ID_FS_LABEL_ENC': 'localhost.localdomain:name', ++ 'ID_FS_TYPE': 'linux_raid_member', ++ 'ID_FS_USAGE': 'raid', ++ 'ID_FS_UUID': '143d480c-12c3-909f-5476-98a9f94a1c4f', ++ 'ID_FS_UUID_ENC': '143d480c-12c3-909f-5476-98a9f94a1c4f', ++ 'ID_FS_UUID_SUB': '121f2b71-3634-4183-dc9c-08bfceda765c', ++ 'ID_FS_UUID_SUB_ENC': '121f2b71-3634-4183-dc9c-08bfceda765c', ++ 'ID_FS_VERSION': '1.2', ++ 'ID_MODEL': 'QEMU_HARDDISK', ++ 'ID_MODEL_ENC': 'QEMU\\x20HARDDISK\\x20\\x20\\x20', ++ 'ID_PATH': 'pci-0000:00:11.0-scsi-0:0:0:4', ++ 'ID_PATH_TAG': 'pci-0000_00_11_0-scsi-0_0_0_4', ++ 'ID_REVISION': '2.5+', ++ 'ID_SCSI': '1', ++ 'ID_SERIAL': '0QEMU_QEMU_HARDDISK_drive-scsi0-0-0-4', ++ 'ID_SERIAL_SHORT': 'drive-scsi0-0-0-4', ++ 'ID_TYPE': 'disk', ++ 'ID_VENDOR': 'QEMU', ++ 'ID_VENDOR_ENC': 'QEMU\\x20\\x20\\x20\\x20', ++ 'MAJOR': '8', ++ 'MD_DEVICE': 'md127', ++ 'MD_DEVNAME': 'name', ++ 'MD_FOREIGN': 'no', ++ 'MD_STARTED': 'yes', ++ 'MINOR': '32', ++ 'SUBSYSTEM': 'block', ++ 'TAGS': ':systemd:', ++ 'USEC_INITIALIZED': '6109555', ++ 'SYS_NAME': 'sdc', ++ 'SYS_PATH': '/sys/devices/pci0000:00/0000:00:11.0/virtio5/host8/target8:0:0/8:0:0:4/block/sdc'} ++ ++ member_assemble = {'DEVLINKS': '/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-0-0-4 /dev/disk/by-path/pci-0000:00:11.0-scsi-0:0:0:4', ++ 'DEVNAME': '/dev/sdc', ++ 'DEVPATH': '/devices/pci0000:00/0000:00:11.0/virtio5/host8/target8:0:0/8:0:0:4/block/sdc', ++ 'DEVTYPE': 'disk', ++ 'ID_BUS': 'scsi', ++ 'ID_FS_LABEL': 'localhost.localdomain:name', ++ 'ID_FS_LABEL_ENC': 'localhost.localdomain:name', ++ 'ID_FS_TYPE': 'linux_raid_member', ++ 'ID_FS_USAGE': 'raid', ++ 'ID_FS_UUID': '143d480c-12c3-909f-5476-98a9f94a1c4f', ++ 'ID_FS_UUID_ENC': '143d480c-12c3-909f-5476-98a9f94a1c4f', ++ 'ID_FS_UUID_SUB': '121f2b71-3634-4183-dc9c-08bfceda765c', ++ 'ID_FS_UUID_SUB_ENC': '121f2b71-3634-4183-dc9c-08bfceda765c', ++ 'ID_FS_VERSION': '1.2', ++ 'ID_MODEL': 'QEMU_HARDDISK', ++ 'ID_MODEL_ENC': 'QEMU\\x20HARDDISK\\x20\\x20\\x20', ++ 'ID_PATH': 'pci-0000:00:11.0-scsi-0:0:0:4', ++ 'ID_PATH_TAG': 'pci-0000_00_11_0-scsi-0_0_0_4', ++ 'ID_REVISION': '2.5+', ++ 'ID_SCSI': '1', ++ 'ID_SERIAL': '0QEMU_QEMU_HARDDISK_drive-scsi0-0-0-4', ++ 'ID_SERIAL_SHORT': 'drive-scsi0-0-0-4', ++ 'ID_TYPE': 'disk', ++ 'ID_VENDOR': 'QEMU', ++ 'ID_VENDOR_ENC': 'QEMU\\x20\\x20\\x20\\x20', ++ 'MAJOR': '8', ++ 'MINOR': '32', ++ 'SUBSYSTEM': 'block', ++ 'TAGS': ':systemd:', ++ 'USEC_INITIALIZED': '6109555', ++ 'SYS_NAME': 'sdc', ++ 'SYS_PATH': '/sys/devices/pci0000:00/0000:00:11.0/virtio5/host8/target8:0:0/8:0:0:4/block/sdc'} ++ ++ raid_device = {'DEVLINKS': '/dev/disk/by-id/md-name-localhost.localdomain:name /dev/disk/by-id/md-uuid-143d480c:12c3909f:547698a9:f94a1c4f /dev/md/name', ++ 'DEVNAME': '/dev/md127', ++ 'DEVPATH': '/devices/virtual/block/md127', ++ 'DEVTYPE': 'disk', ++ 'ID_PART_TABLE_TYPE': 'dos', ++ 'ID_PART_TABLE_UUID': '19e9cb5b', ++ 'MAJOR': '9', ++ 'MD_DEVICES': '2', ++ 'MD_DEVICE_ev_sdc_DEV': '/dev/sdc', ++ 'MD_DEVICE_ev_sdc_ROLE': '0', ++ 'MD_DEVICE_ev_sdd_DEV': '/dev/sdd', ++ 'MD_DEVICE_ev_sdd_ROLE': '1', ++ 'MD_DEVNAME': 'name', ++ 'MD_LEVEL': 'raid1', ++ 'MD_METADATA': '1.2', ++ 'MD_NAME': 'localhost.localdomain:name', ++ 'MD_UUID': '143d480c:12c3909f:547698a9:f94a1c4f', ++ 'MINOR': '127', ++ 'SUBSYSTEM': 'block', ++ 'SYSTEMD_WANTS': 'mdmonitor.service', ++ 'TAGS': ':systemd:', ++ 'USEC_INITIALIZED': '5844744', ++ 'SYS_NAME': 'md127', ++ 'SYS_PATH': '/sys/devices/virtual/block/md127'} ++ ++ raid_partition = {'DEVLINKS': '/dev/disk/by-id/md-uuid-143d480c:12c3909f:547698a9:f94a1c4f-part1 /dev/disk/by-id/md-name-localhost.localdomain:name-part1 /dev/md/name1', ++ 'DEVNAME': '/dev/md127p1', ++ 'DEVPATH': '/devices/virtual/block/md127/md127p1', ++ 'DEVTYPE': 'partition', ++ 'ID_PART_ENTRY_DISK': '9:127', ++ 'ID_PART_ENTRY_NUMBER': '1', ++ 'ID_PART_ENTRY_OFFSET': '2048', ++ 'ID_PART_ENTRY_SCHEME': 'dos', ++ 'ID_PART_ENTRY_SIZE': '2091008', ++ 'ID_PART_ENTRY_TYPE': '0x83', ++ 'ID_PART_ENTRY_UUID': '19e9cb5b-01', ++ 'ID_PART_TABLE_TYPE': 'dos', ++ 'ID_PART_TABLE_UUID': 'ec985633', ++ 'MAJOR': '259', ++ 'MD_DEVICES': '2', ++ 'MD_DEVICE_ev_sdc_DEV': '/dev/sdc', ++ 'MD_DEVICE_ev_sdc_ROLE': '0', ++ 'MD_DEVICE_ev_sdd_DEV': '/dev/sdd', ++ 'MD_DEVICE_ev_sdd_ROLE': '1', ++ 'MD_DEVNAME': 'name', ++ 'MD_LEVEL': 'raid1', ++ 'MD_METADATA': '1.2', ++ 'MD_NAME': 'localhost.localdomain:name', ++ 'MD_UUID': '143d480c:12c3909f:547698a9:f94a1c4f', ++ 'MINOR': '1', ++ 'PARTN': '1', ++ 'SUBSYSTEM': 'block', ++ 'SYSTEMD_WANTS': 'mdmonitor.service', ++ 'TAGS': ':systemd:', ++ 'USEC_INITIALIZED': '5928255', ++ 'SYS_NAME': 'md127p1', ++ 'SYS_PATH': '/sys/devices/virtual/block/md127/md127p1'} ++ ++ ++class RaidOnDisk3(): ++ member_name = "sde" ++ raid_name = "125" ++ raid_node = "md125" ++ metadata_version = "0.9" ++ ++ member_boot = {'DEVLINKS': '/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-0-0-1 /dev/disk/by-path/pci-0000:00:11.0-scsi-0:0:0:1', ++ 'DEVNAME': '/dev/sde', ++ 'DEVPATH': '/devices/pci0000:00/0000:00:11.0/virtio5/host8/target8:0:0/8:0:0:1/block/sde', ++ 'DEVTYPE': 'disk', ++ 'ID_BUS': 'scsi', ++ 'ID_FS_TYPE': 'linux_raid_member', ++ 'ID_FS_USAGE': 'raid', ++ 'ID_FS_UUID': 'c4ef60f5-e374-5f70-bfe7-8010bc810f04', ++ 'ID_FS_UUID_ENC': 'c4ef60f5-e374-5f70-bfe7-8010bc810f04', ++ 'ID_FS_VERSION': '0.90.0', ++ 'ID_MODEL': 'QEMU_HARDDISK', ++ 'ID_MODEL_ENC': 'QEMU\\x20HARDDISK\\x20\\x20\\x20', ++ 'ID_PATH': 'pci-0000:00:11.0-scsi-0:0:0:1', ++ 'ID_PATH_TAG': 'pci-0000_00_11_0-scsi-0_0_0_1', ++ 'ID_REVISION': '2.5+', ++ 'ID_SCSI': '1', ++ 'ID_SERIAL': '0QEMU_QEMU_HARDDISK_drive-scsi0-0-0-1', ++ 'ID_SERIAL_SHORT': 'drive-scsi0-0-0-1', ++ 'ID_TYPE': 'disk', ++ 'ID_VENDOR': 'QEMU', ++ 'ID_VENDOR_ENC': 'QEMU\\x20\\x20\\x20\\x20', ++ 'MAJOR': '8', ++ 'MD_DEVICE': 'md125', ++ 'MD_DEVNAME': '125', ++ 'MD_FOREIGN': 'no', ++ 'MD_STARTED': 'unsafe', ++ 'MINOR': '64', ++ 'SUBSYSTEM': 'block', ++ 'SYSTEMD_WANTS': 'mdadm-last-resort@md125.timer', ++ 'TAGS': ':systemd:', ++ 'USEC_INITIALIZED': '5538551', ++ 'SYS_NAME': 'sde', ++ 'SYS_PATH': '/sys/devices/pci0000:00/0000:00:11.0/virtio5/host8/target8:0:0/8:0:0:1/block/sde'} ++ ++ member_assemble = {'DEVLINKS': '/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-0-0-1 /dev/disk/by-path/pci-0000:00:11.0-scsi-0:0:0:1', ++ 'DEVNAME': '/dev/sde', ++ 'DEVPATH': '/devices/pci0000:00/0000:00:11.0/virtio5/host8/target8:0:0/8:0:0:1/block/sde', ++ 'DEVTYPE': 'disk', ++ 'ID_BUS': 'scsi', ++ 'ID_FS_TYPE': 'linux_raid_member', ++ 'ID_FS_USAGE': 'raid', ++ 'ID_FS_UUID': 'c4ef60f5-e374-5f70-bfe7-8010bc810f04', ++ 'ID_FS_UUID_ENC': 'c4ef60f5-e374-5f70-bfe7-8010bc810f04', ++ 'ID_FS_VERSION': '0.90.0', ++ 'ID_MODEL': 'QEMU_HARDDISK', ++ 'ID_MODEL_ENC': 'QEMU\\x20HARDDISK\\x20\\x20\\x20', ++ 'ID_PATH': 'pci-0000:00:11.0-scsi-0:0:0:1', ++ 'ID_PATH_TAG': 'pci-0000_00_11_0-scsi-0_0_0_1', ++ 'ID_REVISION': '2.5+', ++ 'ID_SCSI': '1', ++ 'ID_SERIAL': '0QEMU_QEMU_HARDDISK_drive-scsi0-0-0-1', ++ 'ID_SERIAL_SHORT': 'drive-scsi0-0-0-1', ++ 'ID_TYPE': 'disk', ++ 'ID_VENDOR': 'QEMU', ++ 'ID_VENDOR_ENC': 'QEMU\\x20\\x20\\x20\\x20', ++ 'MAJOR': '8', ++ 'MINOR': '64', ++ 'SUBSYSTEM': 'block', ++ 'TAGS': ':systemd:', ++ 'USEC_INITIALIZED': '5538551', ++ 'SYS_NAME': 'sde', ++ 'SYS_PATH': '/sys/devices/pci0000:00/0000:00:11.0/virtio5/host8/target8:0:0/8:0:0:1/block/sde'} ++ ++ raid_device = {'DEVLINKS': '/dev/md/125 /dev/disk/by-id/md-uuid-c4ef60f5:e3745f70:bfe78010:bc810f04', ++ 'DEVNAME': '/dev/md125', ++ 'DEVPATH': '/devices/virtual/block/md125', ++ 'DEVTYPE': 'disk', ++ 'ID_PART_TABLE_TYPE': 'dos', ++ 'ID_PART_TABLE_UUID': 'e74877cd', ++ 'MAJOR': '9', ++ 'MD_DEVICES': '2', ++ 'MD_DEVICE_ev_sde_DEV': '/dev/sde', ++ 'MD_DEVICE_ev_sde_ROLE': '0', ++ 'MD_DEVICE_ev_sdf_DEV': '/dev/sdf', ++ 'MD_DEVICE_ev_sdf_ROLE': '1', ++ 'MD_DEVNAME': '125', ++ 'MD_LEVEL': 'raid1', ++ 'MD_METADATA': '0.90', ++ 'MD_UUID': 'c4ef60f5:e3745f70:bfe78010:bc810f04', ++ 'MINOR': '125', ++ 'SUBSYSTEM': 'block', ++ 'SYSTEMD_WANTS': 'mdmonitor.service', ++ 'TAGS': ':systemd:', ++ 'USEC_INITIALIZED': '5786380', ++ 'SYS_NAME': 'md125', ++ 'SYS_PATH': '/sys/devices/virtual/block/md125'} ++ ++ raid_partition = {'DEVLINKS': '/dev/md/125p1 /dev/disk/by-id/md-uuid-c4ef60f5:e3745f70:bfe78010:bc810f04-part1', ++ 'DEVNAME': '/dev/md125p1', ++ 'DEVPATH': '/devices/virtual/block/md125/md125p1', ++ 'DEVTYPE': 'partition', ++ 'ID_PART_ENTRY_DISK': '9:125', ++ 'ID_PART_ENTRY_NUMBER': '1', ++ 'ID_PART_ENTRY_OFFSET': '2048', ++ 'ID_PART_ENTRY_SCHEME': 'dos', ++ 'ID_PART_ENTRY_SIZE': '2094976', ++ 'ID_PART_ENTRY_TYPE': '0x83', ++ 'ID_PART_ENTRY_UUID': 'e74877cd-01', ++ 'MAJOR': '259', ++ 'MD_DEVICES': '2', ++ 'MD_DEVICE_ev_sde_DEV': '/dev/sde', ++ 'MD_DEVICE_ev_sde_ROLE': '0', ++ 'MD_DEVICE_ev_sdf_DEV': '/dev/sdf', ++ 'MD_DEVICE_ev_sdf_ROLE': '1', ++ 'MD_DEVNAME': '125', ++ 'MD_LEVEL': 'raid1', ++ 'MD_METADATA': '0.90', ++ 'MD_UUID': 'c4ef60f5:e3745f70:bfe78010:bc810f04', ++ 'MINOR': '3', ++ 'PARTN': '1', ++ 'SUBSYSTEM': 'block', ++ 'SYSTEMD_WANTS': 'mdmonitor.service', ++ 'TAGS': ':systemd:', ++ 'USEC_INITIALIZED': '8808457', ++ 'SYS_NAME': 'md125p1', ++ 'SYS_PATH': '/sys/devices/virtual/block/md125/md125p1'} ++ ++ ++class RaidOnPartition1(): ++ member_name = "sdh3" ++ raid_name = "122" ++ raid_node = "md122" ++ metadata_version = "1.2" ++ ++ member_boot = {'DEVLINKS': '/dev/disk/by-path/pci-0000:00:07.0-scsi-0:0:2:0-part3 /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi1-0-2-part3 /dev/disk/by-partuuid/73eb11a9-03', ++ 'DEVNAME': '/dev/sdh3', ++ 'DEVPATH': '/devices/pci0000:00/0000:00:07.0/host9/target9:0:2/9:0:2:0/block/sdh/sdh3', ++ 'DEVTYPE': 'partition', ++ 'ID_BUS': 'scsi', ++ 'ID_FS_LABEL': 'localhost.localdomain:122', ++ 'ID_FS_LABEL_ENC': 'localhost.localdomain:122', ++ 'ID_FS_TYPE': 'linux_raid_member', ++ 'ID_FS_USAGE': 'raid', ++ 'ID_FS_UUID': '0628d995-eb60-ebd1-a767-51730b16f212', ++ 'ID_FS_UUID_ENC': '0628d995-eb60-ebd1-a767-51730b16f212', ++ 'ID_FS_UUID_SUB': 'b301779b-f759-ad7d-5324-b38d4b6d944d', ++ 'ID_FS_UUID_SUB_ENC': 'b301779b-f759-ad7d-5324-b38d4b6d944d', ++ 'ID_FS_VERSION': '1.2', ++ 'ID_MODEL': 'QEMU_HARDDISK', ++ 'ID_MODEL_ENC': 'QEMU\\x20HARDDISK\\x20\\x20\\x20', ++ 'ID_PART_ENTRY_DISK': '8:112', ++ 'ID_PART_ENTRY_NUMBER': '3', ++ 'ID_PART_ENTRY_OFFSET': '411648', ++ 'ID_PART_ENTRY_SCHEME': 'dos', ++ 'ID_PART_ENTRY_SIZE': '204800', ++ 'ID_PART_ENTRY_TYPE': '0x83', ++ 'ID_PART_ENTRY_UUID': '73eb11a9-03', ++ 'ID_PART_TABLE_TYPE': 'dos', ++ 'ID_PART_TABLE_UUID': '73eb11a9', ++ 'ID_PATH': 'pci-0000:00:07.0-scsi-0:0:2:0', ++ 'ID_PATH_TAG': 'pci-0000_00_07_0-scsi-0_0_2_0', ++ 'ID_REVISION': '2.5+', ++ 'ID_SCSI': '1', ++ 'ID_SERIAL': '0QEMU_QEMU_HARDDISK_drive-scsi1-0-2', ++ 'ID_SERIAL_SHORT': 'drive-scsi1-0-2', ++ 'ID_TYPE': 'disk', ++ 'ID_VENDOR': 'QEMU', ++ 'ID_VENDOR_ENC': 'QEMU\\x20\\x20\\x20\\x20', ++ 'MAJOR': '8', ++ 'MD_DEVICE': 'md122', ++ 'MD_DEVNAME': '122', ++ 'MD_FOREIGN': 'no', ++ 'MD_STARTED': 'yes', ++ 'MINOR': '115', ++ 'PARTN': '3', ++ 'SUBSYSTEM': 'block', ++ 'TAGS': ':systemd:', ++ 'USEC_INITIALIZED': '8920462', ++ 'SYS_NAME': 'sdh3', ++ 'SYS_PATH': '/sys/devices/pci0000:00/0000:00:07.0/host9/target9:0:2/9:0:2:0/block/sdh/sdh3'} ++ ++ member_assemble = {'DEVLINKS': '/dev/disk/by-path/pci-0000:00:07.0-scsi-0:0:2:0-part3 /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi1-0-2-part3 /dev/disk/by-partuuid/73eb11a9-03', ++ 'DEVNAME': '/dev/sdh3', ++ 'DEVPATH': '/devices/pci0000:00/0000:00:07.0/host9/target9:0:2/9:0:2:0/block/sdh/sdh3', ++ 'DEVTYPE': 'partition', ++ 'ID_BUS': 'scsi', ++ 'ID_FS_LABEL': 'localhost.localdomain:122', ++ 'ID_FS_LABEL_ENC': 'localhost.localdomain:122', ++ 'ID_FS_TYPE': 'linux_raid_member', ++ 'ID_FS_USAGE': 'raid', ++ 'ID_FS_UUID': '0628d995-eb60-ebd1-a767-51730b16f212', ++ 'ID_FS_UUID_ENC': '0628d995-eb60-ebd1-a767-51730b16f212', ++ 'ID_FS_UUID_SUB': 'b301779b-f759-ad7d-5324-b38d4b6d944d', ++ 'ID_FS_UUID_SUB_ENC': 'b301779b-f759-ad7d-5324-b38d4b6d944d', ++ 'ID_FS_VERSION': '1.2', ++ 'ID_MODEL': 'QEMU_HARDDISK', ++ 'ID_MODEL_ENC': 'QEMU\\x20HARDDISK\\x20\\x20\\x20', ++ 'ID_PART_ENTRY_DISK': '8:112', ++ 'ID_PART_ENTRY_NUMBER': '3', ++ 'ID_PART_ENTRY_OFFSET': '411648', ++ 'ID_PART_ENTRY_SCHEME': 'dos', ++ 'ID_PART_ENTRY_SIZE': '204800', ++ 'ID_PART_ENTRY_TYPE': '0x83', ++ 'ID_PART_ENTRY_UUID': '73eb11a9-03', ++ 'ID_PART_TABLE_TYPE': 'dos', ++ 'ID_PART_TABLE_UUID': '73eb11a9', ++ 'ID_PATH': 'pci-0000:00:07.0-scsi-0:0:2:0', ++ 'ID_PATH_TAG': 'pci-0000_00_07_0-scsi-0_0_2_0', ++ 'ID_REVISION': '2.5+', ++ 'ID_SCSI': '1', ++ 'ID_SERIAL': '0QEMU_QEMU_HARDDISK_drive-scsi1-0-2', ++ 'ID_SERIAL_SHORT': 'drive-scsi1-0-2', ++ 'ID_TYPE': 'disk', ++ 'ID_VENDOR': 'QEMU', ++ 'ID_VENDOR_ENC': 'QEMU\\x20\\x20\\x20\\x20', ++ 'MAJOR': '8', ++ 'MINOR': '115', ++ 'PARTN': '3', ++ 'SUBSYSTEM': 'block', ++ 'TAGS': ':systemd:', ++ 'USEC_INITIALIZED': '8920462', ++ 'SYS_NAME': 'sdh3', ++ 'SYS_PATH': '/sys/devices/pci0000:00/0000:00:07.0/host9/target9:0:2/9:0:2:0/block/sdh/sdh3'} ++ ++ raid_device = {'DEVLINKS': '/dev/disk/by-id/md-uuid-0628d995:eb60ebd1:a7675173:0b16f212 /dev/disk/by-id/md-name-localhost.localdomain:122 /dev/md/122', ++ 'DEVNAME': '/dev/md122', ++ 'DEVPATH': '/devices/virtual/block/md122', ++ 'DEVTYPE': 'disk', ++ 'ID_PART_TABLE_TYPE': 'dos', ++ 'ID_PART_TABLE_UUID': '6dc80b3b', ++ 'MAJOR': '9', ++ 'MD_DEVICES': '2', ++ 'MD_DEVICE_ev_sdh3_DEV': '/dev/sdh3', ++ 'MD_DEVICE_ev_sdh3_ROLE': '0', ++ 'MD_DEVICE_ev_sdh5_DEV': '/dev/sdh5', ++ 'MD_DEVICE_ev_sdh5_ROLE': '1', ++ 'MD_DEVNAME': '122', ++ 'MD_LEVEL': 'raid1', ++ 'MD_METADATA': '1.2', ++ 'MD_NAME': 'localhost.localdomain:122', ++ 'MD_UUID': '0628d995:eb60ebd1:a7675173:0b16f212', ++ 'MINOR': '122', ++ 'SUBSYSTEM': 'block', ++ 'SYSTEMD_WANTS': 'mdmonitor.service', ++ 'TAGS': ':systemd:', ++ 'USEC_INITIALIZED': '8770105', ++ 'SYS_NAME': 'md122', ++ 'SYS_PATH': '/sys/devices/virtual/block/md122'} ++ ++ raid_partition = {'DEVLINKS': '/dev/disk/by-id/md-uuid-0628d995:eb60ebd1:a7675173:0b16f212-part1 /dev/disk/by-id/md-name-localhost.localdomain:122-part1 /dev/md/122p1', ++ 'DEVNAME': '/dev/md122p1', ++ 'DEVPATH': '/devices/virtual/block/md122/md122p1', ++ 'DEVTYPE': 'partition', ++ 'ID_PART_ENTRY_DISK': '9:122', ++ 'ID_PART_ENTRY_NUMBER': '1', ++ 'ID_PART_ENTRY_OFFSET': '2048', ++ 'ID_PART_ENTRY_SCHEME': 'dos', ++ 'ID_PART_ENTRY_SIZE': '200704', ++ 'ID_PART_ENTRY_TYPE': '0x83', ++ 'ID_PART_ENTRY_UUID': '6dc80b3b-01', ++ 'MAJOR': '259', ++ 'MD_DEVICES': '2', ++ 'MD_DEVICE_ev_sdh3_DEV': '/dev/sdh3', ++ 'MD_DEVICE_ev_sdh3_ROLE': '0', ++ 'MD_DEVICE_ev_sdh5_DEV': '/dev/sdh5', ++ 'MD_DEVICE_ev_sdh5_ROLE': '1', ++ 'MD_DEVNAME': '122', ++ 'MD_LEVEL': 'raid1', ++ 'MD_METADATA': '1.2', ++ 'MD_NAME': 'localhost.localdomain:122', ++ 'MD_UUID': '0628d995:eb60ebd1:a7675173:0b16f212', ++ 'MINOR': '6', ++ 'PARTN': '1', ++ 'SUBSYSTEM': 'block', ++ 'SYSTEMD_WANTS': 'mdmonitor.service', ++ 'TAGS': ':systemd:', ++ 'USEC_INITIALIZED': '9003885', ++ 'SYS_NAME': 'md122p1', ++ 'SYS_PATH': '/sys/devices/virtual/block/md122/md122p1'} ++ ++ ++class RaidOnPartition2(): ++ member_name = "sdh1" ++ raid_name = "123" ++ raid_node = "md123" ++ metadata_version = "0.9" ++ ++ member_boot = {'DEVLINKS': '/dev/disk/by-path/pci-0000:00:07.0-scsi-0:0:2:0-part1 /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi1-0-2-part1 /dev/disk/by-partuuid/73eb11a9-01', ++ 'DEVNAME': '/dev/sdh1', ++ 'DEVPATH': '/devices/pci0000:00/0000:00:07.0/host9/target9:0:2/9:0:2:0/block/sdh/sdh1', ++ 'DEVTYPE': 'partition', ++ 'ID_BUS': 'scsi', ++ 'ID_FS_TYPE': 'linux_raid_member', ++ 'ID_FS_USAGE': 'raid', ++ 'ID_FS_UUID': '335b35e0-f1af-8e86-bfe7-8010bc810f04', ++ 'ID_FS_UUID_ENC': '335b35e0-f1af-8e86-bfe7-8010bc810f04', ++ 'ID_FS_VERSION': '0.90.0', ++ 'ID_MODEL': 'QEMU_HARDDISK', ++ 'ID_MODEL_ENC': 'QEMU\\x20HARDDISK\\x20\\x20\\x20', ++ 'ID_PART_ENTRY_DISK': '8:112', ++ 'ID_PART_ENTRY_NUMBER': '1', ++ 'ID_PART_ENTRY_OFFSET': '2048', ++ 'ID_PART_ENTRY_SCHEME': 'dos', ++ 'ID_PART_ENTRY_SIZE': '204800', ++ 'ID_PART_ENTRY_TYPE': '0x83', ++ 'ID_PART_ENTRY_UUID': '73eb11a9-01', ++ 'ID_PART_TABLE_TYPE': 'dos', ++ 'ID_PART_TABLE_UUID': '73eb11a9', ++ 'ID_PATH': 'pci-0000:00:07.0-scsi-0:0:2:0', ++ 'ID_PATH_TAG': 'pci-0000_00_07_0-scsi-0_0_2_0', ++ 'ID_REVISION': '2.5+', ++ 'ID_SCSI': '1', ++ 'ID_SERIAL': '0QEMU_QEMU_HARDDISK_drive-scsi1-0-2', ++ 'ID_SERIAL_SHORT': 'drive-scsi1-0-2', ++ 'ID_TYPE': 'disk', ++ 'ID_VENDOR': 'QEMU', ++ 'ID_VENDOR_ENC': 'QEMU\\x20\\x20\\x20\\x20', ++ 'MAJOR': '8', ++ 'MD_DEVICE': 'md123', ++ 'MD_DEVNAME': '123', ++ 'MD_FOREIGN': 'no', ++ 'MD_STARTED': 'unsafe', ++ 'MINOR': '113', ++ 'PARTN': '1', ++ 'SUBSYSTEM': 'block', ++ 'SYSTEMD_WANTS': 'mdadm-last-resort@md123.timer', ++ 'TAGS': ':systemd:', ++ 'USEC_INITIALIZED': '8778733', ++ 'SYS_NAME': 'sdh1', ++ 'SYS_PATH': '/sys/devices/pci0000:00/0000:00:07.0/host9/target9:0:2/9:0:2:0/block/sdh/sdh1'} ++ ++ member_assemble = {'DEVLINKS': '/dev/disk/by-path/pci-0000:00:07.0-scsi-0:0:2:0-part1 /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi1-0-2-part1 /dev/disk/by-partuuid/73eb11a9-01', ++ 'DEVNAME': '/dev/sdh1', ++ 'DEVPATH': '/devices/pci0000:00/0000:00:07.0/host9/target9:0:2/9:0:2:0/block/sdh/sdh1', ++ 'DEVTYPE': 'partition', ++ 'ID_BUS': 'scsi', ++ 'ID_FS_TYPE': 'linux_raid_member', ++ 'ID_FS_USAGE': 'raid', ++ 'ID_FS_UUID': '335b35e0-f1af-8e86-bfe7-8010bc810f04', ++ 'ID_FS_UUID_ENC': '335b35e0-f1af-8e86-bfe7-8010bc810f04', ++ 'ID_FS_VERSION': '0.90.0', ++ 'ID_MODEL': 'QEMU_HARDDISK', ++ 'ID_MODEL_ENC': 'QEMU\\x20HARDDISK\\x20\\x20\\x20', ++ 'ID_PART_ENTRY_DISK': '8:112', ++ 'ID_PART_ENTRY_NUMBER': '1', ++ 'ID_PART_ENTRY_OFFSET': '2048', ++ 'ID_PART_ENTRY_SCHEME': 'dos', ++ 'ID_PART_ENTRY_SIZE': '204800', ++ 'ID_PART_ENTRY_TYPE': '0x83', ++ 'ID_PART_ENTRY_UUID': '73eb11a9-01', ++ 'ID_PART_TABLE_TYPE': 'dos', ++ 'ID_PART_TABLE_UUID': '73eb11a9', ++ 'ID_PATH': 'pci-0000:00:07.0-scsi-0:0:2:0', ++ 'ID_PATH_TAG': 'pci-0000_00_07_0-scsi-0_0_2_0', ++ 'ID_REVISION': '2.5+', ++ 'ID_SCSI': '1', ++ 'ID_SERIAL': '0QEMU_QEMU_HARDDISK_drive-scsi1-0-2', ++ 'ID_SERIAL_SHORT': 'drive-scsi1-0-2', ++ 'ID_TYPE': 'disk', ++ 'ID_VENDOR': 'QEMU', ++ 'ID_VENDOR_ENC': 'QEMU\\x20\\x20\\x20\\x20', ++ 'MAJOR': '8', ++ 'MINOR': '113', ++ 'PARTN': '1', ++ 'SUBSYSTEM': 'block', ++ 'TAGS': ':systemd:', ++ 'UDISKS_MD_MEMBER_DEVICES': '2', ++ 'UDISKS_MD_MEMBER_EVENTS': '18', ++ 'UDISKS_MD_MEMBER_LEVEL': 'raid1', ++ 'UDISKS_MD_MEMBER_UPDATE_TIME': '1597143914', ++ 'UDISKS_MD_MEMBER_UUID': '335b35e0:f1af8e86:bfe78010:bc810f04', ++ 'USEC_INITIALIZED': '8778733', ++ 'SYS_NAME': 'sdh1', ++ 'SYS_PATH': '/sys/devices/pci0000:00/0000:00:07.0/host9/target9:0:2/9:0:2:0/block/sdh/sdh1'} ++ ++ raid_device = {'DEVLINKS': '/dev/md/123 /dev/disk/by-id/md-uuid-335b35e0:f1af8e86:bfe78010:bc810f04', ++ 'DEVNAME': '/dev/md123', ++ 'DEVPATH': '/devices/virtual/block/md123', ++ 'DEVTYPE': 'disk', ++ 'ID_PART_TABLE_TYPE': 'dos', ++ 'ID_PART_TABLE_UUID': '653f84c8', ++ 'MAJOR': '9', ++ 'MD_DEVICES': '2', ++ 'MD_DEVICE_ev_sdh1_DEV': '/dev/sdh1', ++ 'MD_DEVICE_ev_sdh1_ROLE': '0', ++ 'MD_DEVICE_ev_sdh2_DEV': '/dev/sdh2', ++ 'MD_DEVICE_ev_sdh2_ROLE': '1', ++ 'MD_DEVNAME': '123', ++ 'MD_LEVEL': 'raid1', ++ 'MD_METADATA': '0.90', ++ 'MD_UUID': '335b35e0:f1af8e86:bfe78010:bc810f04', ++ 'MINOR': '123', ++ 'SUBSYSTEM': 'block', ++ 'SYSTEMD_WANTS': 'mdmonitor.service', ++ 'TAGS': ':systemd:', ++ 'USEC_INITIALIZED': '8760382', ++ 'SYS_NAME': 'md123', ++ 'SYS_PATH': '/sys/devices/virtual/block/md123'} ++ ++ raid_partition = {'DEVLINKS': '/dev/disk/by-id/md-uuid-335b35e0:f1af8e86:bfe78010:bc810f04-part1 /dev/md/123p1', ++ 'DEVNAME': '/dev/md123p1', ++ 'DEVPATH': '/devices/virtual/block/md123/md123p1', ++ 'DEVTYPE': 'partition', ++ 'ID_PART_ENTRY_DISK': '9:123', ++ 'ID_PART_ENTRY_NUMBER': '1', ++ 'ID_PART_ENTRY_OFFSET': '2048', ++ 'ID_PART_ENTRY_SCHEME': 'dos', ++ 'ID_PART_ENTRY_SIZE': '202624', ++ 'ID_PART_ENTRY_TYPE': '0x83', ++ 'ID_PART_ENTRY_UUID': '653f84c8-01', ++ 'MAJOR': '259', ++ 'MD_DEVICES': '2', ++ 'MD_DEVICE_ev_sdh1_DEV': '/dev/sdh1', ++ 'MD_DEVICE_ev_sdh1_ROLE': '0', ++ 'MD_DEVICE_ev_sdh2_DEV': '/dev/sdh2', ++ 'MD_DEVICE_ev_sdh2_ROLE': '1', ++ 'MD_DEVNAME': '123', ++ 'MD_LEVEL': 'raid1', ++ 'MD_METADATA': '0.90', ++ 'MD_UUID': '335b35e0:f1af8e86:bfe78010:bc810f04', ++ 'MINOR': '5', ++ 'PARTN': '1', ++ 'SUBSYSTEM': 'block', ++ 'SYSTEMD_WANTS': 'mdmonitor.service', ++ 'TAGS': ':systemd:', ++ 'USEC_INITIALIZED': '8952876', ++ 'SYS_NAME': 'md123p1', ++ 'SYS_PATH': '/sys/devices/virtual/block/md123/md123p1'} +diff --git a/tests/udev_test.py b/tests/udev_test.py +index 653eeb6d..d30a647b 100644 +--- a/tests/udev_test.py ++++ b/tests/udev_test.py +@@ -2,6 +2,8 @@ + import unittest + import mock + ++from udev_data import raid_data ++ + + class UdevTest(unittest.TestCase): + +@@ -77,3 +79,47 @@ class UdevTest(unittest.TestCase): + # Normal MD RAID (w/ at least one non-disk member) + device_get_slaves.side_effect = lambda info: mixed_parents if info['SYS_PATH'] == mock.sentinel.md_path else list() + self.assertFalse(blivet.udev.device_is_disk(info)) ++ ++ ++class UdevGetNameRaidTest(unittest.TestCase): ++ ++ def _test_raid_name(self, udev_data): ++ import blivet.udev ++ ++ # members don't have the device_get_sysfs_path(info) + "/md" folder ++ with mock.patch("blivet.udev.device_is_md", return_value=False): ++ member_name = blivet.udev.device_get_name(udev_data.member_boot) ++ self.assertEqual(member_name, udev_data.member_name) ++ ++ member_name = blivet.udev.device_get_name(udev_data.member_assemble) ++ self.assertEqual(member_name, udev_data.member_name) ++ ++ with mock.patch("blivet.udev.device_is_md", return_value=True): ++ raid_name = blivet.udev.device_get_name(udev_data.raid_device) ++ self.assertEqual(raid_name, udev_data.raid_name) ++ ++ # partitions also don't have the device_get_sysfs_path(info) + "/md" folder ++ with mock.patch("blivet.udev.device_is_md", return_value=False): ++ part_name = blivet.udev.device_get_name(udev_data.raid_partition) ++ expected_name = udev_data.raid_name + "p1" if udev_data.raid_name[-1].isdigit() else udev_data.raid_name + "1" ++ self.assertEqual(part_name, expected_name) ++ ++ def test_raid_name_on_disk_no_name(self): ++ data = raid_data.RaidOnDisk1() ++ self._test_raid_name(data) ++ ++ def test_raid_name_on_disk__with_name(self): ++ data = raid_data.RaidOnDisk2() ++ self._test_raid_name(data) ++ ++ def test_raid_name_on_disk_old_metadata(self): ++ data = raid_data.RaidOnDisk3() ++ self._test_raid_name(data) ++ ++ def test_raid_name_on_part_no_name(self): ++ data = raid_data.RaidOnPartition1() ++ self._test_raid_name(data) ++ ++ def test_raid_name_on_part_old_metadata(self): ++ data = raid_data.RaidOnPartition2() ++ self._test_raid_name(data) +-- +2.25.4 + diff --git a/SOURCES/0011-Fix-ignoring-disk-devices-with-parents-or-children.patch b/SOURCES/0011-Fix-ignoring-disk-devices-with-parents-or-children.patch new file mode 100644 index 0000000..6ce0a64 --- /dev/null +++ b/SOURCES/0011-Fix-ignoring-disk-devices-with-parents-or-children.patch @@ -0,0 +1,269 @@ +From f19140993e94be9e58c8a01c18f1907792f59927 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Wed, 5 Aug 2020 13:44:38 +0200 +Subject: [PATCH] Fix ignoring disk devices with parents or children + +For disk-like devices like multipath we should allow to ignore +these by simply ignoring the mpath device or by ignoring all of its +drives. + +- when ignoring the "mpatha" device we should also ignore "sda" and +"sdb" +- when ignoring both "sda" and "sdb" we should also ignore "mpatha" +- when ignoring only "sda" we should not ignore "mpatha" (we don't +want to deal with an "incomplete" multipath device in the tree) + +This is consistent with the existing behaviour when using exclusive +disks (or "ignoredisks --only-use" in kickstart). + +Resolves: rhbz#1866243 +--- + blivet/devicetree.py | 51 ++++++++----- + tests/devicetree_test.py | 157 ++++++++++++++++++++++++++++----------- + 2 files changed, 146 insertions(+), 62 deletions(-) + +diff --git a/blivet/devicetree.py b/blivet/devicetree.py +index 5cc360e1..2afb0d0e 100644 +--- a/blivet/devicetree.py ++++ b/blivet/devicetree.py +@@ -907,31 +907,48 @@ class DeviceTreeBase(object): + hidden.add_hook(new=False) + lvm.lvm_cc_removeFilterRejectRegexp(hidden.name) + ++ def _disk_in_taglist(self, disk, taglist): ++ # Taglist is a list containing mix of disk names and tags into which disk may belong. ++ # Check if it does. Raise ValueError if unknown tag is encountered. ++ if disk.name in taglist: ++ return True ++ tags = [t[1:] for t in taglist if t.startswith("@")] ++ for tag in tags: ++ if tag not in Tags.__members__: ++ raise ValueError("unknown ignoredisk tag '@%s' encountered" % tag) ++ if Tags(tag) in disk.tags: ++ return True ++ return False ++ + def _is_ignored_disk(self, disk): + """ Checks config for lists of exclusive and ignored disks + and returns if the given one should be ignored + """ +- +- def disk_in_taglist(disk, taglist): +- # Taglist is a list containing mix of disk names and tags into which disk may belong. +- # Check if it does. Raise ValueError if unknown tag is encountered. +- if disk.name in taglist: +- return True +- tags = [t[1:] for t in taglist if t.startswith("@")] +- for tag in tags: +- if tag not in Tags.__members__: +- raise ValueError("unknown ignoredisk tag '@%s' encountered" % tag) +- if Tags(tag) in disk.tags: +- return True +- return False +- +- return ((self.ignored_disks and disk_in_taglist(disk, self.ignored_disks)) or +- (self.exclusive_disks and not disk_in_taglist(disk, self.exclusive_disks))) ++ return ((self.ignored_disks and self._disk_in_taglist(disk, self.ignored_disks)) or ++ (self.exclusive_disks and not self._disk_in_taglist(disk, self.exclusive_disks))) + + def _hide_ignored_disks(self): + # hide any subtrees that begin with an ignored disk + for disk in [d for d in self._devices if d.is_disk]: +- if self._is_ignored_disk(disk): ++ is_ignored = self.ignored_disks and self._disk_in_taglist(disk, self.ignored_disks) ++ is_exclusive = self.exclusive_disks and self._disk_in_taglist(disk, self.exclusive_disks) ++ ++ if is_ignored: ++ if len(disk.children) == 1: ++ if not all(self._is_ignored_disk(d) for d in disk.children[0].parents): ++ raise DeviceTreeError("Including only a subset of raid/multipath member disks is not allowed.") ++ ++ # and also children like fwraid or mpath ++ self.hide(disk.children[0]) ++ ++ # this disk is ignored: ignore it and all it's potential parents ++ for p in disk.parents: ++ self.hide(p) ++ ++ # and finally hide the disk itself ++ self.hide(disk) ++ ++ if self.exclusive_disks and not is_exclusive: + ignored = True + # If the filter allows all members of a fwraid or mpath, the + # fwraid or mpath itself is implicitly allowed as well. I don't +diff --git a/tests/devicetree_test.py b/tests/devicetree_test.py +index a8f369cf..6032e7f6 100644 +--- a/tests/devicetree_test.py ++++ b/tests/devicetree_test.py +@@ -370,51 +370,6 @@ class DeviceTreeTestCase(unittest.TestCase): + self.assertTrue(sdb in tree.devices) + self.assertTrue(sdc in tree.devices) + +- # now test exclusive_disks special cases for multipath +- sda.format = get_format("multipath_member", exists=True) +- sdb.format = get_format("multipath_member", exists=True) +- sdc.format = get_format("multipath_member", exists=True) +- mpatha = MultipathDevice("mpatha", parents=[sda, sdb, sdc]) +- tree._add_device(mpatha) +- +- tree.ignored_disks = [] +- tree.exclusive_disks = ["mpatha"] +- +- with patch.object(tree, "hide") as hide: +- tree._hide_ignored_disks() +- self.assertFalse(hide.called) +- +- tree._hide_ignored_disks() +- self.assertTrue(sda in tree.devices) +- self.assertTrue(sdb in tree.devices) +- self.assertTrue(sdc in tree.devices) +- self.assertTrue(mpatha in tree.devices) +- +- # all members in exclusive_disks implies the mpath in exclusive_disks +- tree.exclusive_disks = ["sda", "sdb", "sdc"] +- with patch.object(tree, "hide") as hide: +- tree._hide_ignored_disks() +- self.assertFalse(hide.called) +- +- tree._hide_ignored_disks() +- self.assertTrue(sda in tree.devices) +- self.assertTrue(sdb in tree.devices) +- self.assertTrue(sdc in tree.devices) +- self.assertTrue(mpatha in tree.devices) +- +- tree.exclusive_disks = ["sda", "sdb"] +- with patch.object(tree, "hide") as hide: +- tree._hide_ignored_disks() +- hide.assert_any_call(mpatha) +- hide.assert_any_call(sdc) +- +- # verify that hide works as expected +- tree._hide_ignored_disks() +- self.assertTrue(sda in tree.devices) +- self.assertTrue(sdb in tree.devices) +- self.assertFalse(sdc in tree.devices) +- self.assertFalse(mpatha in tree.devices) +- + def test_get_related_disks(self): + tree = DeviceTree() + +@@ -447,3 +402,115 @@ class DeviceTreeTestCase(unittest.TestCase): + tree.unhide(sda) + self.assertEqual(tree.get_related_disks(sda), set([sda, sdb])) + self.assertEqual(tree.get_related_disks(sdb), set([sda, sdb])) ++ ++ ++class DeviceTreeIgnoredExclusiveMultipathTestCase(unittest.TestCase): ++ ++ def setUp(self): ++ self.tree = DeviceTree() ++ ++ self.sda = DiskDevice("sda") ++ self.sdb = DiskDevice("sdb") ++ self.sdc = DiskDevice("sdc") ++ ++ self.tree._add_device(self.sda) ++ self.tree._add_device(self.sdb) ++ self.tree._add_device(self.sdc) ++ ++ self.assertTrue(self.sda in self.tree.devices) ++ self.assertTrue(self.sdb in self.tree.devices) ++ self.assertTrue(self.sdc in self.tree.devices) ++ ++ # now test exclusive_disks special cases for multipath ++ self.sda.format = get_format("multipath_member", exists=True) ++ self.sdb.format = get_format("multipath_member", exists=True) ++ self.sdc.format = get_format("multipath_member", exists=True) ++ self.mpatha = MultipathDevice("mpatha", parents=[self.sda, self.sdb, self.sdc]) ++ self.tree._add_device(self.mpatha) ++ ++ def test_exclusive_disks_multipath_1(self): ++ # multipath is exclusive -> all disks should be exclusive ++ self.tree.ignored_disks = [] ++ self.tree.exclusive_disks = ["mpatha"] ++ ++ with patch.object(self.tree, "hide") as hide: ++ self.tree._hide_ignored_disks() ++ self.assertFalse(hide.called) ++ ++ self.tree._hide_ignored_disks() ++ self.assertTrue(self.sda in self.tree.devices) ++ self.assertTrue(self.sdb in self.tree.devices) ++ self.assertTrue(self.sdc in self.tree.devices) ++ self.assertTrue(self.mpatha in self.tree.devices) ++ ++ def test_exclusive_disks_multipath_2(self): ++ # all disks exclusive -> mpath should also be exclusive ++ self.tree.exclusive_disks = ["sda", "sdb", "sdc"] ++ with patch.object(self.tree, "hide") as hide: ++ self.tree._hide_ignored_disks() ++ self.assertFalse(hide.called) ++ ++ self.tree._hide_ignored_disks() ++ self.assertTrue(self.sda in self.tree.devices) ++ self.assertTrue(self.sdb in self.tree.devices) ++ self.assertTrue(self.sdc in self.tree.devices) ++ self.assertTrue(self.mpatha in self.tree.devices) ++ ++ def test_exclusive_disks_multipath_3(self): ++ # some disks exclusive -> mpath should be hidden ++ self.tree.exclusive_disks = ["sda", "sdb"] ++ with patch.object(self.tree, "hide") as hide: ++ self.tree._hide_ignored_disks() ++ hide.assert_any_call(self.mpatha) ++ hide.assert_any_call(self.sdc) ++ ++ # verify that hide works as expected ++ self.tree._hide_ignored_disks() ++ self.assertTrue(self.sda in self.tree.devices) ++ self.assertTrue(self.sdb in self.tree.devices) ++ self.assertFalse(self.sdc in self.tree.devices) ++ self.assertFalse(self.mpatha in self.tree.devices) ++ ++ def test_ignored_disks_multipath_1(self): ++ # mpatha ignored -> disks should be hidden ++ self.tree.ignored_disks = ["mpatha"] ++ self.tree.exclusive_disks = [] ++ ++ with patch.object(self.tree, "hide") as hide: ++ self.tree._hide_ignored_disks() ++ hide.assert_any_call(self.mpatha) ++ hide.assert_any_call(self.sda) ++ hide.assert_any_call(self.sdb) ++ hide.assert_any_call(self.sdc) ++ ++ self.tree._hide_ignored_disks() ++ self.assertFalse(self.sda in self.tree.devices) ++ self.assertFalse(self.sdb in self.tree.devices) ++ self.assertFalse(self.sdc in self.tree.devices) ++ self.assertFalse(self.mpatha in self.tree.devices) ++ ++ def test_ignored_disks_multipath_2(self): ++ # all disks ignored -> mpath should be hidden ++ self.tree.ignored_disks = ["sda", "sdb", "sdc"] ++ self.tree.exclusive_disks = [] ++ ++ with patch.object(self.tree, "hide") as hide: ++ self.tree._hide_ignored_disks() ++ hide.assert_any_call(self.mpatha) ++ hide.assert_any_call(self.sda) ++ hide.assert_any_call(self.sdb) ++ hide.assert_any_call(self.sdc) ++ ++ self.tree._hide_ignored_disks() ++ self.assertFalse(self.sda in self.tree.devices) ++ self.assertFalse(self.sdb in self.tree.devices) ++ self.assertFalse(self.sdc in self.tree.devices) ++ self.assertFalse(self.mpatha in self.tree.devices) ++ ++ def test_ignored_disks_multipath_3(self): ++ # some disks ignored -> error ++ self.tree.ignored_disks = ["sda", "sdb"] ++ self.tree.exclusive_disks = [] ++ ++ with self.assertRaises(DeviceTreeError): ++ self.tree._hide_ignored_disks() +-- +2.25.4 + diff --git a/SOURCES/0012-xfs-grow-support.patch b/SOURCES/0012-xfs-grow-support.patch new file mode 100644 index 0000000..1607c51 --- /dev/null +++ b/SOURCES/0012-xfs-grow-support.patch @@ -0,0 +1,459 @@ +From 433d863cd8a57e5fc30948ff905e6a477ed5f17c Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Tue, 14 Jul 2020 11:27:08 +0200 +Subject: [PATCH 1/4] Add support for XFS format grow + +--- + blivet/formats/fs.py | 2 ++ + blivet/tasks/availability.py | 1 + + blivet/tasks/fsresize.py | 54 ++++++++++++++++++++++++++++++++++++ + 3 files changed, 57 insertions(+) + +diff --git a/blivet/formats/fs.py b/blivet/formats/fs.py +index eee15aaa..12cb9885 100644 +--- a/blivet/formats/fs.py ++++ b/blivet/formats/fs.py +@@ -1089,11 +1089,13 @@ class XFS(FS): + _formattable = True + _linux_native = True + _supported = True ++ _resizable = True + _packages = ["xfsprogs"] + _info_class = fsinfo.XFSInfo + _mkfs_class = fsmkfs.XFSMkfs + _readlabel_class = fsreadlabel.XFSReadLabel + _size_info_class = fssize.XFSSize ++ _resize_class = fsresize.XFSResize + _sync_class = fssync.XFSSync + _writelabel_class = fswritelabel.XFSWriteLabel + _writeuuid_class = fswriteuuid.XFSWriteUUID +diff --git a/blivet/tasks/availability.py b/blivet/tasks/availability.py +index b6b5955a..df62780c 100644 +--- a/blivet/tasks/availability.py ++++ b/blivet/tasks/availability.py +@@ -455,5 +455,6 @@ TUNE2FS_APP = application_by_version("tune2fs", E2FSPROGS_VERSION) + XFSADMIN_APP = application("xfs_admin") + XFSDB_APP = application("xfs_db") + XFSFREEZE_APP = application("xfs_freeze") ++XFSRESIZE_APP = application("xfs_growfs") + + MOUNT_APP = application("mount") +diff --git a/blivet/tasks/fsresize.py b/blivet/tasks/fsresize.py +index e7e26984..12c0367f 100644 +--- a/blivet/tasks/fsresize.py ++++ b/blivet/tasks/fsresize.py +@@ -20,7 +20,10 @@ + # Red Hat Author(s): Anne Mulhern + + import abc ++import os ++import tempfile + ++from contextlib import contextmanager + from six import add_metaclass + + from ..errors import FSError +@@ -32,6 +35,9 @@ from . import task + from . import fstask + from . import dfresize + ++import logging ++log = logging.getLogger("blivet") ++ + + @add_metaclass(abc.ABCMeta) + class FSResizeTask(fstask.FSTask): +@@ -115,6 +121,54 @@ class NTFSResize(FSResize): + ] + + ++class XFSResize(FSResize): ++ ext = availability.XFSRESIZE_APP ++ unit = B ++ size_fmt = None ++ ++ @contextmanager ++ def _do_temp_mount(self): ++ if self.fs.status: ++ yield ++ else: ++ dev_name = os.path.basename(self.fs.device) ++ tmpdir = tempfile.mkdtemp(prefix="xfs-tempmount-%s" % dev_name) ++ log.debug("mounting XFS on '%s' to '%s' for resize", self.fs.device, tmpdir) ++ try: ++ self.fs.mount(mountpoint=tmpdir) ++ except FSError as e: ++ raise FSError("Failed to mount XFS filesystem for resize: %s" % str(e)) ++ ++ try: ++ yield ++ finally: ++ util.umount(mountpoint=tmpdir) ++ os.rmdir(tmpdir) ++ ++ def _get_block_size(self): ++ if self.fs._current_info: ++ # this should be set by update_size_info() ++ for line in self.fs._current_info.split("\n"): ++ if line.startswith("blocksize ="): ++ return int(line.split("=")[-1]) ++ ++ raise FSError("Failed to get XFS filesystem block size for resize") ++ ++ def size_spec(self): ++ # size for xfs_growfs is in blocks ++ return str(self.fs.target_size.convert_to(self.unit) / self._get_block_size()) ++ ++ @property ++ def args(self): ++ return [self.fs.system_mountpoint, "-D", self.size_spec()] ++ ++ def do_task(self): ++ """ Resizes the XFS format. """ ++ ++ with self._do_temp_mount(): ++ super(XFSResize, self).do_task() ++ ++ + class TmpFSResize(FSResize): + + ext = availability.MOUNT_APP +-- +2.26.2 + + +From 56d05334231c30699a9c77dedbc23fdb021b9dee Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Tue, 14 Jul 2020 11:27:51 +0200 +Subject: [PATCH 2/4] Add tests for XFS resize + +XFS supports only grow so we can't reuse most of the fstesting +code and we also need to test the resize on partition because +XFS won't allow grow to size bigger than the underlying block +device. +--- + tests/formats_test/fs_test.py | 91 +++++++++++++++++++++++++++++++++ + tests/formats_test/fstesting.py | 33 ++++++------ + 2 files changed, 107 insertions(+), 17 deletions(-) + +diff --git a/tests/formats_test/fs_test.py b/tests/formats_test/fs_test.py +index 15fc0c35..9bc5d20d 100644 +--- a/tests/formats_test/fs_test.py ++++ b/tests/formats_test/fs_test.py +@@ -2,8 +2,13 @@ import os + import tempfile + import unittest + ++import parted ++ + import blivet.formats.fs as fs + from blivet.size import Size, ROUND_DOWN ++from blivet.errors import DeviceFormatError ++from blivet.formats import get_format ++from blivet.devices import PartitionDevice, DiskDevice + + from tests import loopbackedtestcase + +@@ -50,6 +55,92 @@ class ReiserFSTestCase(fstesting.FSAsRoot): + class XFSTestCase(fstesting.FSAsRoot): + _fs_class = fs.XFS + ++ def can_resize(self, an_fs): ++ resize_tasks = (an_fs._resize, an_fs._size_info) ++ return not any(t.availability_errors for t in resize_tasks) ++ ++ def _create_partition(self, disk, size): ++ disk.format = get_format("disklabel", device=disk.path, label_type="msdos") ++ disk.format.create() ++ pstart = disk.format.alignment.grainSize ++ pend = pstart + int(Size(size) / disk.format.parted_device.sectorSize) ++ disk.format.add_partition(pstart, pend, parted.PARTITION_NORMAL) ++ disk.format.parted_disk.commit() ++ part = disk.format.parted_disk.getPartitionBySector(pstart) ++ ++ device = PartitionDevice(os.path.basename(part.path)) ++ device.disk = disk ++ device.exists = True ++ device.parted_partition = part ++ ++ return device ++ ++ def _remove_partition(self, partition, disk): ++ disk.format.remove_partition(partition.parted_partition) ++ disk.format.parted_disk.commit() ++ ++ def test_resize(self): ++ an_fs = self._fs_class() ++ if not an_fs.formattable: ++ self.skipTest("can not create filesystem %s" % an_fs.name) ++ an_fs.device = self.loop_devices[0] ++ self.assertIsNone(an_fs.create()) ++ an_fs.update_size_info() ++ ++ self._test_sizes(an_fs) ++ # CHECKME: target size is still 0 after updated_size_info is called. ++ self.assertEqual(an_fs.size, Size(0) if an_fs.resizable else an_fs._size) ++ ++ if not self.can_resize(an_fs): ++ self.assertFalse(an_fs.resizable) ++ # Not resizable, so can not do resizing actions. ++ with self.assertRaises(DeviceFormatError): ++ an_fs.target_size = Size("64 MiB") ++ with self.assertRaises(DeviceFormatError): ++ an_fs.do_resize() ++ else: ++ disk = DiskDevice(os.path.basename(self.loop_devices[0])) ++ part = self._create_partition(disk, Size("50 MiB")) ++ an_fs = self._fs_class() ++ an_fs.device = part.path ++ self.assertIsNone(an_fs.create()) ++ an_fs.update_size_info() ++ ++ self.assertTrue(an_fs.resizable) ++ ++ # grow the partition so we can grow the filesystem ++ self._remove_partition(part, disk) ++ part = self._create_partition(disk, size=part.size + Size("40 MiB")) ++ ++ # Try a reasonable target size ++ TARGET_SIZE = Size("64 MiB") ++ an_fs.target_size = TARGET_SIZE ++ self.assertEqual(an_fs.target_size, TARGET_SIZE) ++ self.assertNotEqual(an_fs._size, TARGET_SIZE) ++ self.assertIsNone(an_fs.do_resize()) ++ ACTUAL_SIZE = TARGET_SIZE.round_to_nearest(an_fs._resize.unit, rounding=ROUND_DOWN) ++ self.assertEqual(an_fs.size, ACTUAL_SIZE) ++ self.assertEqual(an_fs._size, ACTUAL_SIZE) ++ self._test_sizes(an_fs) ++ ++ self._remove_partition(part, disk) ++ ++ # and no errors should occur when checking ++ self.assertIsNone(an_fs.do_check()) ++ ++ def test_shrink(self): ++ self.skipTest("Not checking resize for this test category.") ++ ++ def test_too_small(self): ++ self.skipTest("Not checking resize for this test category.") ++ ++ def test_no_explicit_target_size2(self): ++ self.skipTest("Not checking resize for this test category.") ++ ++ def test_too_big2(self): ++ # XXX this tests assumes that resizing to max size - 1 B will fail, but xfs_grow won't ++ self.skipTest("Not checking resize for this test category.") ++ + + class HFSTestCase(fstesting.FSAsRoot): + _fs_class = fs.HFS +diff --git a/tests/formats_test/fstesting.py b/tests/formats_test/fstesting.py +index 62f806f9..86b2a116 100644 +--- a/tests/formats_test/fstesting.py ++++ b/tests/formats_test/fstesting.py +@@ -11,16 +11,6 @@ from blivet.size import Size, ROUND_DOWN + from blivet.formats import fs + + +-def can_resize(an_fs): +- """ Returns True if this filesystem has all necessary resizing tools +- available. +- +- :param an_fs: a filesystem object +- """ +- resize_tasks = (an_fs._resize, an_fs._size_info, an_fs._minsize) +- return not any(t.availability_errors for t in resize_tasks) +- +- + @add_metaclass(abc.ABCMeta) + class FSAsRoot(loopbackedtestcase.LoopBackedTestCase): + +@@ -32,6 +22,15 @@ class FSAsRoot(loopbackedtestcase.LoopBackedTestCase): + def __init__(self, methodName='run_test'): + super(FSAsRoot, self).__init__(methodName=methodName, device_spec=[self._DEVICE_SIZE]) + ++ def can_resize(self, an_fs): ++ """ Returns True if this filesystem has all necessary resizing tools ++ available. ++ ++ :param an_fs: a filesystem object ++ """ ++ resize_tasks = (an_fs._resize, an_fs._size_info, an_fs._minsize) ++ return not any(t.availability_errors for t in resize_tasks) ++ + def _test_sizes(self, an_fs): + """ Test relationships between different size values. + +@@ -190,7 +189,7 @@ class FSAsRoot(loopbackedtestcase.LoopBackedTestCase): + # CHECKME: target size is still 0 after updated_size_info is called. + self.assertEqual(an_fs.size, Size(0) if an_fs.resizable else an_fs._size) + +- if not can_resize(an_fs): ++ if not self.can_resize(an_fs): + self.assertFalse(an_fs.resizable) + # Not resizable, so can not do resizing actions. + with self.assertRaises(DeviceFormatError): +@@ -221,7 +220,7 @@ class FSAsRoot(loopbackedtestcase.LoopBackedTestCase): + # in constructor call behavior would be different. + + an_fs = self._fs_class() +- if not can_resize(an_fs): ++ if not self.can_resize(an_fs): + self.skipTest("Not checking resize for this test category.") + if not an_fs.formattable: + self.skipTest("can not create filesystem %s" % an_fs.name) +@@ -244,7 +243,7 @@ class FSAsRoot(loopbackedtestcase.LoopBackedTestCase): + """ + SIZE = Size("64 MiB") + an_fs = self._fs_class(size=SIZE) +- if not can_resize(an_fs): ++ if not self.can_resize(an_fs): + self.skipTest("Not checking resize for this test category.") + if not an_fs.formattable: + self.skipTest("can not create filesystem %s" % an_fs.name) +@@ -264,7 +263,7 @@ class FSAsRoot(loopbackedtestcase.LoopBackedTestCase): + + def test_shrink(self): + an_fs = self._fs_class() +- if not can_resize(an_fs): ++ if not self.can_resize(an_fs): + self.skipTest("Not checking resize for this test category.") + if not an_fs.formattable: + self.skipTest("can not create filesystem %s" % an_fs.name) +@@ -296,7 +295,7 @@ class FSAsRoot(loopbackedtestcase.LoopBackedTestCase): + + def test_too_small(self): + an_fs = self._fs_class() +- if not can_resize(an_fs): ++ if not self.can_resize(an_fs): + self.skipTest("Not checking resize for this test category.") + if not an_fs.formattable: + self.skipTest("can not create or resize filesystem %s" % an_fs.name) +@@ -315,7 +314,7 @@ class FSAsRoot(loopbackedtestcase.LoopBackedTestCase): + + def test_too_big(self): + an_fs = self._fs_class() +- if not can_resize(an_fs): ++ if not self.can_resize(an_fs): + self.skipTest("Not checking resize for this test category.") + if not an_fs.formattable: + self.skipTest("can not create filesystem %s" % an_fs.name) +@@ -334,7 +333,7 @@ class FSAsRoot(loopbackedtestcase.LoopBackedTestCase): + + def test_too_big2(self): + an_fs = self._fs_class() +- if not can_resize(an_fs): ++ if not self.can_resize(an_fs): + self.skipTest("Not checking resize for this test category.") + if not an_fs.formattable: + self.skipTest("can not create filesystem %s" % an_fs.name) +-- +2.26.2 + + +From 51acc04f4639f143b55789a06a68aae988a91296 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Wed, 15 Jul 2020 12:59:04 +0200 +Subject: [PATCH 3/4] Add support for checking and fixing XFS using xfs_repair + +--- + blivet/formats/fs.py | 1 + + blivet/tasks/availability.py | 1 + + blivet/tasks/fsck.py | 12 ++++++++++++ + tests/formats_test/fs_test.py | 6 +++--- + 4 files changed, 17 insertions(+), 3 deletions(-) + +diff --git a/blivet/formats/fs.py b/blivet/formats/fs.py +index 12cb9885..06fbdf10 100644 +--- a/blivet/formats/fs.py ++++ b/blivet/formats/fs.py +@@ -1091,6 +1091,7 @@ class XFS(FS): + _supported = True + _resizable = True + _packages = ["xfsprogs"] ++ _fsck_class = fsck.XFSCK + _info_class = fsinfo.XFSInfo + _mkfs_class = fsmkfs.XFSMkfs + _readlabel_class = fsreadlabel.XFSReadLabel +diff --git a/blivet/tasks/availability.py b/blivet/tasks/availability.py +index df62780c..f3b76650 100644 +--- a/blivet/tasks/availability.py ++++ b/blivet/tasks/availability.py +@@ -456,5 +456,6 @@ XFSADMIN_APP = application("xfs_admin") + XFSDB_APP = application("xfs_db") + XFSFREEZE_APP = application("xfs_freeze") + XFSRESIZE_APP = application("xfs_growfs") ++XFSREPAIR_APP = application("xfs_repair") + + MOUNT_APP = application("mount") +diff --git a/blivet/tasks/fsck.py b/blivet/tasks/fsck.py +index 5274f13a..8477f5f8 100644 +--- a/blivet/tasks/fsck.py ++++ b/blivet/tasks/fsck.py +@@ -123,6 +123,18 @@ class Ext2FSCK(FSCK): + return "\n".join(msgs) or None + + ++class XFSCK(FSCK): ++ _fsck_errors = {1: "Runtime error encountered during repair operation.", ++ 2: "XFS repair was unable to proceed due to a dirty log."} ++ ++ ext = availability.XFSREPAIR_APP ++ options = [] ++ ++ def _error_message(self, rc): ++ msgs = (self._fsck_errors[c] for c in self._fsck_errors.keys() if rc & c) ++ return "\n".join(msgs) or None ++ ++ + class HFSPlusFSCK(FSCK): + _fsck_errors = {3: "Quick check found a dirty filesystem; no repairs done.", + 4: "Root filesystem was dirty. System should be rebooted.", +diff --git a/tests/formats_test/fs_test.py b/tests/formats_test/fs_test.py +index 9bc5d20d..8fb099fd 100644 +--- a/tests/formats_test/fs_test.py ++++ b/tests/formats_test/fs_test.py +@@ -123,10 +123,10 @@ class XFSTestCase(fstesting.FSAsRoot): + self.assertEqual(an_fs._size, ACTUAL_SIZE) + self._test_sizes(an_fs) + +- self._remove_partition(part, disk) ++ # and no errors should occur when checking ++ self.assertIsNone(an_fs.do_check()) + +- # and no errors should occur when checking +- self.assertIsNone(an_fs.do_check()) ++ self._remove_partition(part, disk) + + def test_shrink(self): + self.skipTest("Not checking resize for this test category.") +-- +2.26.2 + + +From 2a6947098e66f880193f3bac2282a6c7857ca5f7 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Thu, 16 Jul 2020 09:05:35 +0200 +Subject: [PATCH 4/4] Use xfs_db in read-only mode when getting XFS information + +This way it will also work on mounted filesystems. +--- + blivet/tasks/fsinfo.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/blivet/tasks/fsinfo.py b/blivet/tasks/fsinfo.py +index af208f5d..41ff700f 100644 +--- a/blivet/tasks/fsinfo.py ++++ b/blivet/tasks/fsinfo.py +@@ -95,7 +95,7 @@ class ReiserFSInfo(FSInfo): + + class XFSInfo(FSInfo): + ext = availability.XFSDB_APP +- options = ["-c", "sb 0", "-c", "p dblocks", "-c", "p blocksize"] ++ options = ["-c", "sb 0", "-c", "p dblocks", "-c", "p blocksize", "-r"] + + + class UnimplementedFSInfo(fstask.UnimplementedFSTask): +-- +2.26.2 + diff --git a/SOURCES/0013-Do-not-limit-swap-to-128-GiB.patch b/SOURCES/0013-Do-not-limit-swap-to-128-GiB.patch new file mode 100644 index 0000000..5b9f0ed --- /dev/null +++ b/SOURCES/0013-Do-not-limit-swap-to-128-GiB.patch @@ -0,0 +1,76 @@ +From aa4ce218fe9b4ee3571d872ff1575a499596181c Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Fri, 29 May 2020 12:14:30 +0200 +Subject: [PATCH 1/2] Do not limit swap to 128 GiB + +The limit was part of change to limit suggested swap size in +kickstart which doesn't use the SwapSpace._max_size so there is no +reason to limit this for manual installations. +16 TiB seems to be max usable swap size based on mkswap code. + +Resolves: rhbz#1656485 +--- + blivet/formats/swap.py | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/blivet/formats/swap.py b/blivet/formats/swap.py +index 4b8a7edf..3cc59138 100644 +--- a/blivet/formats/swap.py ++++ b/blivet/formats/swap.py +@@ -52,8 +52,7 @@ class SwapSpace(DeviceFormat): + _linux_native = True # for clearpart + _plugin = availability.BLOCKDEV_SWAP_PLUGIN + +- # see rhbz#744129 for details +- _max_size = Size("128 GiB") ++ _max_size = Size("16 TiB") + + config_actions_map = {"label": "write_label"} + +-- +2.26.2 + + +From 93aa6ad87116f1c86616d73dbe561251c4a0c286 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Thu, 11 Jun 2020 14:27:44 +0200 +Subject: [PATCH 2/2] Add test for SwapSpace max size + +--- + tests/formats_test/swap_test.py | 24 ++++++++++++++++++++++++ + 1 file changed, 24 insertions(+) + create mode 100644 tests/formats_test/swap_test.py + +diff --git a/tests/formats_test/swap_test.py b/tests/formats_test/swap_test.py +new file mode 100644 +index 00000000..56356144 +--- /dev/null ++++ b/tests/formats_test/swap_test.py +@@ -0,0 +1,24 @@ ++import test_compat # pylint: disable=unused-import ++ ++import six ++import unittest ++ ++from blivet.devices.storage import StorageDevice ++from blivet.errors import DeviceError ++from blivet.formats import get_format ++ ++from blivet.size import Size ++ ++ ++class SwapNodevTestCase(unittest.TestCase): ++ ++ def test_swap_max_size(self): ++ StorageDevice("dev", size=Size("129 GiB"), ++ fmt=get_format("swap")) ++ ++ StorageDevice("dev", size=Size("15 TiB"), ++ fmt=get_format("swap")) ++ ++ with six.assertRaisesRegex(self, DeviceError, "device is too large for new format"): ++ StorageDevice("dev", size=Size("17 TiB"), ++ fmt=get_format("swap")) +-- +2.26.2 + diff --git a/SOURCES/0014-Use-UnusableConfigurationError-for-patially-hidden-multipath-devices.patch b/SOURCES/0014-Use-UnusableConfigurationError-for-patially-hidden-multipath-devices.patch new file mode 100644 index 0000000..1e14de6 --- /dev/null +++ b/SOURCES/0014-Use-UnusableConfigurationError-for-patially-hidden-multipath-devices.patch @@ -0,0 +1,78 @@ +From 4e6a322d32d2a12f8a87ab763a6286cf3d7b5c27 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Tue, 8 Sep 2020 13:57:40 +0200 +Subject: [PATCH] Use UnusableConfigurationError for partially hidden multipath + devices + +Follow-up for https://github.com/storaged-project/blivet/pull/883 +to make Anaconda show an error message instead of crashing. + +Resolves: rhbz#1877052 +--- + blivet/devicetree.py | 4 ++-- + blivet/errors.py | 6 ++++++ + tests/devicetree_test.py | 4 ++-- + 3 files changed, 10 insertions(+), 4 deletions(-) + +diff --git a/blivet/devicetree.py b/blivet/devicetree.py +index 2afb0d0e..57a9bbd7 100644 +--- a/blivet/devicetree.py ++++ b/blivet/devicetree.py +@@ -32,7 +32,7 @@ from gi.repository import BlockDev as blockdev + + from .actionlist import ActionList + from .callbacks import callbacks +-from .errors import DeviceError, DeviceTreeError, StorageError, DuplicateUUIDError ++from .errors import DeviceError, DeviceTreeError, StorageError, DuplicateUUIDError, InvalidMultideviceSelection + from .deviceaction import ActionDestroyDevice, ActionDestroyFormat + from .devices import BTRFSDevice, NoDevice, PartitionDevice + from .devices import LVMLogicalVolumeDevice, LVMVolumeGroupDevice +@@ -936,7 +936,7 @@ class DeviceTreeBase(object): + if is_ignored: + if len(disk.children) == 1: + if not all(self._is_ignored_disk(d) for d in disk.children[0].parents): +- raise DeviceTreeError("Including only a subset of raid/multipath member disks is not allowed.") ++ raise InvalidMultideviceSelection("Including only a subset of raid/multipath member disks is not allowed.") + + # and also children like fwraid or mpath + self.hide(disk.children[0]) +diff --git a/blivet/errors.py b/blivet/errors.py +index 811abf81..7a93f1ce 100644 +--- a/blivet/errors.py ++++ b/blivet/errors.py +@@ -233,6 +233,12 @@ class DuplicateVGError(UnusableConfigurationError): + "Hint 2: You can get the VG UUIDs by running " + "'pvs -o +vg_uuid'.") + ++ ++class InvalidMultideviceSelection(UnusableConfigurationError): ++ suggestion = N_("All parent devices must be selected when choosing exclusive " ++ "or ignored disks for a multipath or firmware RAID device.") ++ ++ + # DeviceAction + + +diff --git a/tests/devicetree_test.py b/tests/devicetree_test.py +index 6032e7f6..4e47ffc3 100644 +--- a/tests/devicetree_test.py ++++ b/tests/devicetree_test.py +@@ -5,7 +5,7 @@ import six + import unittest + + from blivet.actionlist import ActionList +-from blivet.errors import DeviceTreeError, DuplicateUUIDError ++from blivet.errors import DeviceTreeError, DuplicateUUIDError, InvalidMultideviceSelection + from blivet.deviceaction import ACTION_TYPE_DESTROY, ACTION_OBJECT_DEVICE + from blivet.devicelibs import lvm + from blivet.devices import DiskDevice +@@ -512,5 +512,5 @@ class DeviceTreeIgnoredExclusiveMultipathTestCase(unittest.TestCase): + self.tree.ignored_disks = ["sda", "sdb"] + self.tree.exclusive_disks = [] + +- with self.assertRaises(DeviceTreeError): ++ with self.assertRaises(InvalidMultideviceSelection): + self.tree._hide_ignored_disks() +-- +2.26.2 + diff --git a/SOURCES/0015-Fix-possible-UnicodeDecodeError-when-reading-model-f.patch b/SOURCES/0015-Fix-possible-UnicodeDecodeError-when-reading-model-f.patch new file mode 100644 index 0000000..24e408e --- /dev/null +++ b/SOURCES/0015-Fix-possible-UnicodeDecodeError-when-reading-model-f.patch @@ -0,0 +1,32 @@ +From 866a48e6c3d8246d2897bb402a191df5f2848aa4 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Tue, 23 Jun 2020 10:33:33 +0200 +Subject: [PATCH] Fix possible UnicodeDecodeError when reading model from sysfs + +Some Innovation IT NVMe devices have an (invalid) unicode in their +model name. + +Resolves: rhbz#1849326 +--- + blivet/udev.py | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/blivet/udev.py b/blivet/udev.py +index 41c99496..2c795225 100644 +--- a/blivet/udev.py ++++ b/blivet/udev.py +@@ -185,8 +185,9 @@ def __is_blacklisted_blockdev(dev_name): + if any(re.search(expr, dev_name) for expr in device_name_blacklist): + return True + +- if os.path.exists("/sys/class/block/%s/device/model" % (dev_name,)): +- model = open("/sys/class/block/%s/device/model" % (dev_name,)).read() ++ model_path = "/sys/class/block/%s/device/model" % dev_name ++ if os.path.exists(model_path): ++ model = open(model_path, encoding="utf-8", errors="replace").read() + for bad in ("IBM *STMF KERNEL", "SCEI Flash-5", "DGC LUNZ"): + if model.find(bad) != -1: + log.info("ignoring %s with model %s", dev_name, model) +-- +2.26.2 + diff --git a/SOURCES/0016-Basic-LVM-VDO-support.patch b/SOURCES/0016-Basic-LVM-VDO-support.patch new file mode 100644 index 0000000..b52342b --- /dev/null +++ b/SOURCES/0016-Basic-LVM-VDO-support.patch @@ -0,0 +1,415 @@ +From 3f6bbf52442609b8e6e3919a3fdd8c5af64923e6 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Tue, 12 May 2020 12:48:41 +0200 +Subject: [PATCH 1/3] Add basic support for LVM VDO devices + +This adds support for LVM VDO devices detection during populate +and allows removing both VDO LVs and VDO pools using actions. +--- + blivet/devices/lvm.py | 150 +++++++++++++++++++++++++++++++- + blivet/populator/helpers/lvm.py | 16 +++- + tests/action_test.py | 39 +++++++++ + tests/devices_test/lvm_test.py | 34 ++++++++ + tests/storagetestcase.py | 11 ++- + 5 files changed, 245 insertions(+), 5 deletions(-) + +diff --git a/blivet/devices/lvm.py b/blivet/devices/lvm.py +index 97de6acd..d9e24a33 100644 +--- a/blivet/devices/lvm.py ++++ b/blivet/devices/lvm.py +@@ -1789,8 +1789,132 @@ class LVMThinLogicalVolumeMixin(object): + data.pool_name = self.pool.lvname + + ++class LVMVDOPoolMixin(object): ++ def __init__(self): ++ self._lvs = [] ++ ++ @property ++ def is_vdo_pool(self): ++ return self.seg_type == "vdo-pool" ++ ++ @property ++ def type(self): ++ return "lvmvdopool" ++ ++ @property ++ def resizable(self): ++ return False ++ ++ @util.requires_property("is_vdo_pool") ++ def _add_log_vol(self, lv): ++ """ Add an LV to this VDO pool. """ ++ if lv in self._lvs: ++ raise ValueError("lv is already part of this VDO pool") ++ ++ self.vg._add_log_vol(lv) ++ log.debug("Adding %s/%s to %s", lv.name, lv.size, self.name) ++ self._lvs.append(lv) ++ ++ @util.requires_property("is_vdo_pool") ++ def _remove_log_vol(self, lv): ++ """ Remove an LV from this VDO pool. """ ++ if lv not in self._lvs: ++ raise ValueError("specified lv is not part of this VDO pool") ++ ++ self._lvs.remove(lv) ++ self.vg._remove_log_vol(lv) ++ ++ @property ++ @util.requires_property("is_vdo_pool") ++ def lvs(self): ++ """ A list of this VDO pool's LVs """ ++ return self._lvs[:] # we don't want folks changing our list ++ ++ @property ++ def direct(self): ++ """ Is this device directly accessible? """ ++ return False ++ ++ def _create(self): ++ """ Create the device. """ ++ raise NotImplementedError ++ ++ ++class LVMVDOLogicalVolumeMixin(object): ++ def __init__(self): ++ pass ++ ++ def _init_check(self): ++ pass ++ ++ def _check_parents(self): ++ """Check that this device has parents as expected""" ++ if isinstance(self.parents, (list, ParentList)): ++ if len(self.parents) != 1: ++ raise ValueError("constructor requires a single vdo-pool LV") ++ ++ container = self.parents[0] ++ else: ++ container = self.parents ++ ++ if not container or not isinstance(container, LVMLogicalVolumeDevice) or not container.is_vdo_pool: ++ raise ValueError("constructor requires a vdo-pool LV") ++ ++ @property ++ def vg_space_used(self): ++ return Size(0) # the pool's size is already accounted for in the vg ++ ++ @property ++ def is_vdo_lv(self): ++ return self.seg_type == "vdo" ++ ++ @property ++ def vg(self): ++ # parents[0] is the pool, not the VG so set the VG here ++ return self.pool.vg ++ ++ @property ++ def type(self): ++ return "vdolv" ++ ++ @property ++ def resizable(self): ++ return False ++ ++ @property ++ @util.requires_property("is_vdo_lv") ++ def pool(self): ++ return self.parents[0] ++ ++ def _create(self): ++ """ Create the device. """ ++ raise NotImplementedError ++ ++ def _destroy(self): ++ # nothing to do here, VDO LV is destroyed automatically together with ++ # the VDO pool ++ pass ++ ++ def remove_hook(self, modparent=True): ++ if modparent: ++ self.pool._remove_log_vol(self) ++ ++ # pylint: disable=bad-super-call ++ super(LVMLogicalVolumeBase, self).remove_hook(modparent=modparent) ++ ++ def add_hook(self, new=True): ++ # pylint: disable=bad-super-call ++ super(LVMLogicalVolumeBase, self).add_hook(new=new) ++ if new: ++ return ++ ++ if self not in self.pool.lvs: ++ self.pool._add_log_vol(self) ++ ++ + class LVMLogicalVolumeDevice(LVMLogicalVolumeBase, LVMInternalLogicalVolumeMixin, LVMSnapshotMixin, +- LVMThinPoolMixin, LVMThinLogicalVolumeMixin): ++ LVMThinPoolMixin, LVMThinLogicalVolumeMixin, LVMVDOPoolMixin, ++ LVMVDOLogicalVolumeMixin): + """ An LVM Logical Volume """ + + # generally resizable, see :property:`resizable` for details +@@ -1879,6 +2003,8 @@ class LVMLogicalVolumeDevice(LVMLogicalVolumeBase, LVMInternalLogicalVolumeMixin + LVMLogicalVolumeBase.__init__(self, name, parents, size, uuid, seg_type, + fmt, exists, sysfs_path, grow, maxsize, + percent, cache_request, pvs, from_lvs) ++ LVMVDOPoolMixin.__init__(self) ++ LVMVDOLogicalVolumeMixin.__init__(self) + + LVMInternalLogicalVolumeMixin._init_check(self) + LVMSnapshotMixin._init_check(self) +@@ -1905,6 +2031,10 @@ class LVMLogicalVolumeDevice(LVMLogicalVolumeBase, LVMInternalLogicalVolumeMixin + ret.append(LVMThinPoolMixin) + if self.is_thin_lv: + ret.append(LVMThinLogicalVolumeMixin) ++ if self.is_vdo_pool: ++ ret.append(LVMVDOPoolMixin) ++ if self.is_vdo_lv: ++ ret.append(LVMVDOLogicalVolumeMixin) + return ret + + def _try_specific_call(self, name, *args, **kwargs): +@@ -2066,6 +2196,11 @@ class LVMLogicalVolumeDevice(LVMLogicalVolumeBase, LVMInternalLogicalVolumeMixin + def display_lv_name(self): + return self.lvname + ++ @property ++ @type_specific ++ def pool(self): ++ return super(LVMLogicalVolumeDevice, self).pool ++ + def _setup(self, orig=False): + """ Open, or set up, a device. """ + log_method_call(self, self.name, orig=orig, status=self.status, +@@ -2167,6 +2302,19 @@ class LVMLogicalVolumeDevice(LVMLogicalVolumeBase, LVMInternalLogicalVolumeMixin + udev.settle() + blockdev.lvm.lvresize(self.vg.name, self._name, self.size) + ++ @type_specific ++ def _add_log_vol(self, lv): ++ pass ++ ++ @type_specific ++ def _remove_log_vol(self, lv): ++ pass ++ ++ @property ++ @type_specific ++ def lvs(self): ++ return [] ++ + @property + @type_specific + def direct(self): +diff --git a/blivet/populator/helpers/lvm.py b/blivet/populator/helpers/lvm.py +index 4b674fac..ff8bf59f 100644 +--- a/blivet/populator/helpers/lvm.py ++++ b/blivet/populator/helpers/lvm.py +@@ -211,9 +211,6 @@ class LVMFormatPopulator(FormatPopulator): + origin = self._devicetree.get_device_by_name(origin_device_name) + + lv_kwargs["origin"] = origin +- elif lv_attr[0] == 'v': +- # skip vorigins +- return + elif lv_attr[0] in 'IrielTCo' and lv_name.endswith(']'): + # an internal LV, add the an instance of the appropriate class + # to internal_lvs for later processing when non-internal LVs are +@@ -237,6 +234,19 @@ class LVMFormatPopulator(FormatPopulator): + origin = self._devicetree.get_device_by_name(origin_device_name) + lv_kwargs["origin"] = origin + ++ lv_parents = [self._devicetree.get_device_by_name(pool_device_name)] ++ elif lv_attr[0] == 'd': ++ # vdo pool ++ # nothing to do here ++ pass ++ elif lv_attr[0] == 'v': ++ if lv_type != "vdo": ++ # skip vorigins ++ return ++ pool_name = blockdev.lvm.vdolvpoolname(vg_name, lv_name) ++ pool_device_name = "%s-%s" % (vg_name, pool_name) ++ add_required_lv(pool_device_name, "failed to look up VDO pool") ++ + lv_parents = [self._devicetree.get_device_by_name(pool_device_name)] + elif lv_name.endswith(']'): + # unrecognized Internal LVM2 device +diff --git a/tests/action_test.py b/tests/action_test.py +index 90c1b312..8f9a7424 100644 +--- a/tests/action_test.py ++++ b/tests/action_test.py +@@ -1252,6 +1252,45 @@ class DeviceActionTestCase(StorageTestCase): + self.assertEqual(set(self.storage.lvs), {pool}) + self.assertEqual(set(pool._internal_lvs), {lv1, lv2}) + ++ def test_lvm_vdo_destroy(self): ++ self.destroy_all_devices() ++ sdc = self.storage.devicetree.get_device_by_name("sdc") ++ sdc1 = self.new_device(device_class=PartitionDevice, name="sdc1", ++ size=Size("50 GiB"), parents=[sdc], ++ fmt=blivet.formats.get_format("lvmpv")) ++ self.schedule_create_device(sdc1) ++ ++ vg = self.new_device(device_class=LVMVolumeGroupDevice, ++ name="vg", parents=[sdc1]) ++ self.schedule_create_device(vg) ++ ++ pool = self.new_device(device_class=LVMLogicalVolumeDevice, ++ name="data", parents=[vg], ++ size=Size("10 GiB"), ++ seg_type="vdo-pool", exists=True) ++ self.storage.devicetree._add_device(pool) ++ lv = self.new_device(device_class=LVMLogicalVolumeDevice, ++ name="meta", parents=[pool], ++ size=Size("50 GiB"), ++ seg_type="vdo", exists=True) ++ self.storage.devicetree._add_device(lv) ++ ++ remove_lv = self.schedule_destroy_device(lv) ++ self.assertListEqual(pool.lvs, []) ++ self.assertNotIn(lv, vg.lvs) ++ ++ # cancelling the action should put lv back to both vg and pool lvs ++ self.storage.devicetree.actions.remove(remove_lv) ++ self.assertListEqual(pool.lvs, [lv]) ++ self.assertIn(lv, vg.lvs) ++ ++ # can't remove non-leaf pool ++ with self.assertRaises(ValueError): ++ self.schedule_destroy_device(pool) ++ ++ self.schedule_destroy_device(lv) ++ self.schedule_destroy_device(pool) ++ + + class ConfigurationActionsTest(unittest.TestCase): + +diff --git a/tests/devices_test/lvm_test.py b/tests/devices_test/lvm_test.py +index 9e701d18..204cb99a 100644 +--- a/tests/devices_test/lvm_test.py ++++ b/tests/devices_test/lvm_test.py +@@ -405,6 +405,40 @@ class LVMDeviceTest(unittest.TestCase): + exists=False) + self.assertFalse(vg.is_empty) + ++ def test_lvm_vdo_pool(self): ++ pv = StorageDevice("pv1", fmt=blivet.formats.get_format("lvmpv"), ++ size=Size("1 GiB"), exists=True) ++ vg = LVMVolumeGroupDevice("testvg", parents=[pv]) ++ pool = LVMLogicalVolumeDevice("testpool", parents=[vg], size=Size("512 MiB"), ++ seg_type="vdo-pool", exists=True) ++ self.assertTrue(pool.is_vdo_pool) ++ ++ free = vg.free_space ++ lv = LVMLogicalVolumeDevice("testlv", parents=[pool], size=Size("2 GiB"), ++ seg_type="vdo", exists=True) ++ self.assertTrue(lv.is_vdo_lv) ++ self.assertEqual(lv.vg, vg) ++ self.assertEqual(lv.pool, pool) ++ ++ # free space in the vg shouldn't be affected by the vdo lv ++ self.assertEqual(lv.vg_space_used, 0) ++ self.assertEqual(free, vg.free_space) ++ ++ self.assertListEqual(pool.lvs, [lv]) ++ ++ # now try to destroy both the pool and the vdo lv ++ # for the lv this should be a no-op, destroying the pool should destroy both ++ with patch("blivet.devices.lvm.blockdev.lvm") as lvm: ++ lv.destroy() ++ lv.remove_hook() ++ self.assertFalse(lv.exists) ++ self.assertFalse(lvm.lvremove.called) ++ self.assertListEqual(pool.lvs, []) ++ ++ pool.destroy() ++ self.assertFalse(pool.exists) ++ self.assertTrue(lvm.lvremove.called) ++ + + class TypeSpecificCallsTest(unittest.TestCase): + def test_type_specific_calls(self): +diff --git a/tests/storagetestcase.py b/tests/storagetestcase.py +index e581bca6..1844dec5 100644 +--- a/tests/storagetestcase.py ++++ b/tests/storagetestcase.py +@@ -96,7 +96,16 @@ class StorageTestCase(unittest.TestCase): + def new_device(self, *args, **kwargs): + """ Return a new Device instance suitable for testing. """ + device_class = kwargs.pop("device_class") +- exists = kwargs.pop("exists", False) ++ ++ # we intentionally don't pass the "exists" kwarg to the constructor ++ # becauses this causes issues with some devices (especially partitions) ++ # but we still need it for some LVs like VDO because we can't create ++ # those so we need to fake their existence even for the constructor ++ if device_class is blivet.devices.LVMLogicalVolumeDevice: ++ exists = kwargs.get("exists", False) ++ else: ++ exists = kwargs.pop("exists", False) ++ + part_type = kwargs.pop("part_type", parted.PARTITION_NORMAL) + device = device_class(*args, **kwargs) + +-- +2.26.2 + + +From f05a66e1bed1ca1f3cd7d7ffecd6693ab4d7f32a Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Tue, 12 May 2020 12:52:47 +0200 +Subject: [PATCH 2/3] Fix checking for filesystem support in action_test + +--- + tests/action_test.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/action_test.py b/tests/action_test.py +index 8f9a7424..228eb97a 100644 +--- a/tests/action_test.py ++++ b/tests/action_test.py +@@ -56,7 +56,7 @@ FORMAT_CLASSES = [ + + + @unittest.skipUnless(not any(x.unavailable_type_dependencies() for x in DEVICE_CLASSES), "some unsupported device classes required for this test") +-@unittest.skipUnless(not any(x().utils_available for x in FORMAT_CLASSES), "some unsupported format classes required for this test") ++@unittest.skipUnless(all(x().utils_available for x in FORMAT_CLASSES), "some unsupported format classes required for this test") + class DeviceActionTestCase(StorageTestCase): + + """ DeviceActionTestSuite """ +-- +2.26.2 + + +From 69bd2e69e21c8779377a6f54b3d83cb35138867a Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Tue, 12 May 2020 12:54:03 +0200 +Subject: [PATCH 3/3] Fix LV min size for resize in test_action_dependencies + +We've recently changed min size for all filesystems so we can't +resize the LV to the device minimal size. +This was overlooked in the original change because these tests +were skipped. +--- + tests/action_test.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/action_test.py b/tests/action_test.py +index 228eb97a..77176f46 100644 +--- a/tests/action_test.py ++++ b/tests/action_test.py +@@ -870,7 +870,7 @@ class DeviceActionTestCase(StorageTestCase): + name="testlv2", parents=[testvg]) + testlv2.format = self.new_format("ext4", device=testlv2.path, + exists=True, device_instance=testlv2) +- shrink_lv2 = ActionResizeDevice(testlv2, testlv2.size - Size("10 GiB")) ++ shrink_lv2 = ActionResizeDevice(testlv2, testlv2.size - Size("10 GiB") + Ext4FS._min_size) + shrink_lv2.apply() + + self.assertTrue(grow_lv.requires(shrink_lv2)) +-- +2.26.2 + diff --git a/SOURCES/0017-Let-parted-fix-fixable-issues-with-partition-table.patch b/SOURCES/0017-Let-parted-fix-fixable-issues-with-partition-table.patch new file mode 100644 index 0000000..af2c4d8 --- /dev/null +++ b/SOURCES/0017-Let-parted-fix-fixable-issues-with-partition-table.patch @@ -0,0 +1,30 @@ +From d477f8d076789cbe1c0a85545ea8b5133fdc4bdf Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Fri, 18 Sep 2020 13:58:48 +0200 +Subject: [PATCH] Let parted fix fixable issues with partition table + +This will automatically fix issues like GPT partition table not +covering whole device after disk size change. + +Resolves: rhbz#1846869 +--- + blivet/populator/populator.py | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/blivet/populator/populator.py b/blivet/populator/populator.py +index 465c272d..fe566816 100644 +--- a/blivet/populator/populator.py ++++ b/blivet/populator/populator.py +@@ -64,6 +64,9 @@ def parted_exn_handler(exn_type, exn_options, exn_msg): + if exn_type == parted.EXCEPTION_TYPE_ERROR and \ + exn_options == parted.EXCEPTION_OPT_YES_NO: + ret = parted.EXCEPTION_RESOLVE_YES ++ elif exn_type == parted.EXCEPTION_TYPE_WARNING and \ ++ exn_options & parted.EXCEPTION_RESOLVE_FIX: ++ ret = parted.EXCEPTION_RESOLVE_FIX + return ret + + +-- +2.29.2 + diff --git a/SOURCES/0018-Fix-possible-UnicodeDecodeError-when-reading-sysfs-a.patch b/SOURCES/0018-Fix-possible-UnicodeDecodeError-when-reading-sysfs-a.patch new file mode 100644 index 0000000..11b6a40 --- /dev/null +++ b/SOURCES/0018-Fix-possible-UnicodeDecodeError-when-reading-sysfs-a.patch @@ -0,0 +1,112 @@ +From 430cd2cdba8fba434b5bed2d2a7ed97803c62f6d Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Tue, 5 Jan 2021 16:56:52 +0100 +Subject: [PATCH 1/3] Fix possible UnicodeDecodeError when reading sysfs + attributes + +This is a follow-up for https://github.com/storaged-project/blivet/pull/861 +where we fixed reading device model in "__is_blacklisted_blockdev" +but we read the device model from other places too so it makes +more sense to "fix" all sysfs attribute reads. +--- + blivet/util.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/blivet/util.py b/blivet/util.py +index 2fa9c8fc..48b7818f 100644 +--- a/blivet/util.py ++++ b/blivet/util.py +@@ -379,7 +379,7 @@ def get_sysfs_attr(path, attr, root=None): + log.warning("%s is not a valid attribute", attr) + return None + +- f = open(fullattr, "r") ++ f = open(fullattr, "r", encoding="utf-8", errors="replace") + data = f.read() + f.close() + sdata = "".join(["%02x" % (ord(x),) for x in data]) +-- +2.29.2 + + +From 15350b52f30910d4fadad92da0195710adcb69a0 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Tue, 5 Jan 2021 16:59:14 +0100 +Subject: [PATCH 2/3] Use util.get_sysfs_attr in __is_ignored_blockdev to read + device mode + +--- + blivet/udev.py | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/blivet/udev.py b/blivet/udev.py +index 2c795225..25375459 100644 +--- a/blivet/udev.py ++++ b/blivet/udev.py +@@ -185,9 +185,8 @@ def __is_blacklisted_blockdev(dev_name): + if any(re.search(expr, dev_name) for expr in device_name_blacklist): + return True + +- model_path = "/sys/class/block/%s/device/model" % dev_name +- if os.path.exists(model_path): +- model = open(model_path, encoding="utf-8", errors="replace").read() ++ model = util.get_sysfs_attr("/sys/class/block/%s" % dev_name, "device/model") ++ if model: + for bad in ("IBM *STMF KERNEL", "SCEI Flash-5", "DGC LUNZ"): + if model.find(bad) != -1: + log.info("ignoring %s with model %s", dev_name, model) +-- +2.29.2 + + +From 64ece8c0dafb550bbde4798a766515fb04f44568 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Wed, 6 Jan 2021 12:34:49 +0100 +Subject: [PATCH 3/3] Add test for util.get_sysfs_attr + +--- + tests/util_test.py | 23 +++++++++++++++++++++++ + 1 file changed, 23 insertions(+) + +diff --git a/tests/util_test.py b/tests/util_test.py +index 9a2ff492..853b6166 100644 +--- a/tests/util_test.py ++++ b/tests/util_test.py +@@ -2,7 +2,9 @@ + import test_compat + + from six.moves import mock ++import os + import six ++import tempfile + import unittest + from decimal import Decimal + +@@ -157,3 +159,24 @@ class DependencyGuardTestCase(unittest.TestCase): + with mock.patch.object(_requires_something, '_check_avail', return_value=True): + self.assertEqual(self._test_dependency_guard_non_critical(), True) + self.assertEqual(self._test_dependency_guard_critical(), True) ++ ++ ++class GetSysfsAttrTestCase(unittest.TestCase): ++ ++ def test_get_sysfs_attr(self): ++ ++ with tempfile.TemporaryDirectory() as sysfs: ++ model_file = os.path.join(sysfs, "model") ++ with open(model_file, "w") as f: ++ f.write("test model\n") ++ ++ model = util.get_sysfs_attr(sysfs, "model") ++ self.assertEqual(model, "test model") ++ ++ # now with some invalid byte in the model ++ with open(model_file, "wb") as f: ++ f.write(b"test model\xef\n") ++ ++ # the unicode replacement character (U+FFFD) should be used instead ++ model = util.get_sysfs_attr(sysfs, "model") ++ self.assertEqual(model, "test model\ufffd") +-- +2.29.2 + diff --git a/SOURCES/0019-LVM-VDO-support.patch b/SOURCES/0019-LVM-VDO-support.patch new file mode 100644 index 0000000..c79d6c1 --- /dev/null +++ b/SOURCES/0019-LVM-VDO-support.patch @@ -0,0 +1,2027 @@ +From 18f05802f07f580ed31f38931b1103842397d598 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Mon, 2 Nov 2020 14:19:52 +0100 +Subject: [PATCH 01/17] Fix type of LVM VDO logical volumes + +We should use "lvmvdolv" to make it similar to other "lvmXYZ" +types. +--- + blivet/devices/lvm.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/blivet/devices/lvm.py b/blivet/devices/lvm.py +index d9e24a33..9639256d 100644 +--- a/blivet/devices/lvm.py ++++ b/blivet/devices/lvm.py +@@ -1875,7 +1875,7 @@ def vg(self): + + @property + def type(self): +- return "vdolv" ++ return "lvmvdolv" + + @property + def resizable(self): + +From 7f4815e14075550f55f2afb44bfba461eacea1c4 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Mon, 2 Nov 2020 14:21:33 +0100 +Subject: [PATCH 02/17] Add VDO pool data LV to internal LVs during populate + +--- + blivet/devices/lvm.py | 9 ++++++++- + blivet/populator/helpers/lvm.py | 2 +- + 2 files changed, 9 insertions(+), 2 deletions(-) + +diff --git a/blivet/devices/lvm.py b/blivet/devices/lvm.py +index 9639256d..d0957d6a 100644 +--- a/blivet/devices/lvm.py ++++ b/blivet/devices/lvm.py +@@ -1119,7 +1119,7 @@ class LVMInternalLVtype(Enum): + + @classmethod + def get_type(cls, lv_attr, lv_name): # pylint: disable=unused-argument +- attr_letters = {cls.data: ("T", "C"), ++ attr_letters = {cls.data: ("T", "C", "D"), + cls.meta: ("e",), + cls.log: ("l", "L"), + cls.image: ("i", "I"), +@@ -1824,6 +1824,13 @@ def _remove_log_vol(self, lv): + self._lvs.remove(lv) + self.vg._remove_log_vol(lv) + ++ @property ++ @util.requires_property("is_vdo_pool") ++ def _vdopool_data_lv(self): ++ if not self._internal_lvs: ++ return None ++ return self._internal_lvs[0] ++ + @property + @util.requires_property("is_vdo_pool") + def lvs(self): +diff --git a/blivet/populator/helpers/lvm.py b/blivet/populator/helpers/lvm.py +index ff8bf59f..b1626306 100644 +--- a/blivet/populator/helpers/lvm.py ++++ b/blivet/populator/helpers/lvm.py +@@ -211,7 +211,7 @@ def add_lv(lv): + origin = self._devicetree.get_device_by_name(origin_device_name) + + lv_kwargs["origin"] = origin +- elif lv_attr[0] in 'IrielTCo' and lv_name.endswith(']'): ++ elif lv_attr[0] in 'IrielTCoD' and lv_name.endswith(']'): + # an internal LV, add the an instance of the appropriate class + # to internal_lvs for later processing when non-internal LVs are + # processed + +From c164864955e371aef78b5020f28bf0c9d235ac7c Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Mon, 2 Nov 2020 14:22:12 +0100 +Subject: [PATCH 03/17] Add availability functions for LVM VDO + +VDO is currently available only on RHEL/CentOS so we need a +separate availability check for LVM VDO devices. +--- + blivet/devices/lvm.py | 6 ++++++ + blivet/tasks/availability.py | 8 ++++++++ + 2 files changed, 14 insertions(+) + +diff --git a/blivet/devices/lvm.py b/blivet/devices/lvm.py +index d0957d6a..ffc65dcd 100644 +--- a/blivet/devices/lvm.py ++++ b/blivet/devices/lvm.py +@@ -1790,6 +1790,9 @@ def populate_ksdata(self, data): + + + class LVMVDOPoolMixin(object): ++ ++ _external_dependencies = [availability.BLOCKDEV_LVM_PLUGIN, availability.BLOCKDEV_LVM_PLUGIN_VDO] ++ + def __init__(self): + self._lvs = [] + +@@ -1848,6 +1851,9 @@ def _create(self): + + + class LVMVDOLogicalVolumeMixin(object): ++ ++ _external_dependencies = [availability.BLOCKDEV_LVM_PLUGIN, availability.BLOCKDEV_LVM_PLUGIN_VDO] ++ + def __init__(self): + pass + +diff --git a/blivet/tasks/availability.py b/blivet/tasks/availability.py +index f3b76650..b107428e 100644 +--- a/blivet/tasks/availability.py ++++ b/blivet/tasks/availability.py +@@ -372,6 +372,13 @@ def available_resource(name): + blockdev.LVMTechMode.MODIFY)}) + BLOCKDEV_LVM_TECH = BlockDevMethod(BLOCKDEV_LVM) + ++BLOCKDEV_LVM_VDO = BlockDevTechInfo(plugin_name="lvm", ++ check_fn=blockdev.lvm_is_tech_avail, ++ technologies={blockdev.LVMTech.VDO: (blockdev.LVMTechMode.CREATE | ++ blockdev.LVMTechMode.REMOVE | ++ blockdev.LVMTechMode.QUERY)}) ++BLOCKDEV_LVM_TECH_VDO = BlockDevMethod(BLOCKDEV_LVM_VDO) ++ + # libblockdev mdraid plugin required technologies and modes + BLOCKDEV_MD_ALL_MODES = (blockdev.MDTechMode.CREATE | + blockdev.MDTechMode.DELETE | +@@ -410,6 +417,7 @@ def available_resource(name): + BLOCKDEV_DM_PLUGIN_RAID = blockdev_plugin("dm", BLOCKDEV_DM_TECH_RAID) + BLOCKDEV_LOOP_PLUGIN = blockdev_plugin("loop", BLOCKDEV_LOOP_TECH) + BLOCKDEV_LVM_PLUGIN = blockdev_plugin("lvm", BLOCKDEV_LVM_TECH) ++BLOCKDEV_LVM_PLUGIN_VDO = blockdev_plugin("lvm", BLOCKDEV_LVM_TECH_VDO) + BLOCKDEV_MDRAID_PLUGIN = blockdev_plugin("mdraid", BLOCKDEV_MD_TECH) + BLOCKDEV_MPATH_PLUGIN = blockdev_plugin("mpath", BLOCKDEV_MPATH_TECH) + BLOCKDEV_SWAP_PLUGIN = blockdev_plugin("swap", BLOCKDEV_SWAP_TECH) + +From d782620129d47a7b79b0e6b80455e6d93f8bcc88 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Mon, 2 Nov 2020 14:27:55 +0100 +Subject: [PATCH 04/17] Read the LVM VDO pool current size from the internal + data LV + +The pool device mapper device size is always 512k when active. +--- + blivet/devices/lvm.py | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/blivet/devices/lvm.py b/blivet/devices/lvm.py +index ffc65dcd..73743fa8 100644 +--- a/blivet/devices/lvm.py ++++ b/blivet/devices/lvm.py +@@ -1845,6 +1845,15 @@ def direct(self): + """ Is this device directly accessible? """ + return False + ++ def read_current_size(self): ++ log_method_call(self, exists=self.exists, path=self.path, ++ sysfs_path=self.sysfs_path) ++ if self.size != Size(0): ++ return self.size ++ if self._vdopool_data_lv: ++ return self._vdopool_data_lv.read_current_size() ++ return Size(0) ++ + def _create(self): + """ Create the device. """ + raise NotImplementedError + +From 2da48ae84f4eac84e8cf998ee2402249a5a52626 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Mon, 2 Nov 2020 14:29:43 +0100 +Subject: [PATCH 05/17] Add "vdo_lv" property to LVMVDOPoolMixin + +--- + blivet/devices/lvm.py | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/blivet/devices/lvm.py b/blivet/devices/lvm.py +index 73743fa8..2f93fa22 100644 +--- a/blivet/devices/lvm.py ++++ b/blivet/devices/lvm.py +@@ -1840,6 +1840,13 @@ def lvs(self): + """ A list of this VDO pool's LVs """ + return self._lvs[:] # we don't want folks changing our list + ++ @property ++ @util.requires_property("is_vdo_pool") ++ def vdo_lv(self): ++ if not self._lvs: ++ return None ++ return self._lvs[0] ++ + @property + def direct(self): + """ Is this device directly accessible? """ + +From bbfa2cbdc6cb85d405b895c66eb4867cea4218b4 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Mon, 2 Nov 2020 14:30:37 +0100 +Subject: [PATCH 06/17] Add support for creating LVM VDO pools and LVM VDO + volumes + +The pool and the volume are created by one call but these can have +different properties (like size) and are in fact two block devices +when created, we also need to create two devices and add them to +the devicetree. The pool device must be always created first and +the _create function for the VDO volume is a no-op. +--- + blivet/devices/lvm.py | 63 +++++++++++++++++++++++++++++++++++++------ + 1 file changed, 55 insertions(+), 8 deletions(-) + +diff --git a/blivet/devices/lvm.py b/blivet/devices/lvm.py +index 2f93fa22..0802e2de 100644 +--- a/blivet/devices/lvm.py ++++ b/blivet/devices/lvm.py +@@ -311,7 +311,7 @@ def _add_log_vol(self, lv): + + # verify we have the space, then add it + # do not verify for growing vg (because of ks) +- if not lv.exists and not self.growable and not lv.is_thin_lv and lv.size > self.free_space: ++ if not lv.exists and not self.growable and not (lv.is_thin_lv or lv.is_vdo_lv) and lv.size > self.free_space: + raise errors.DeviceError("new lv is too large to fit in free space", self.name) + + log.debug("Adding %s/%s to %s", lv.name, lv.size, self.name) +@@ -639,7 +639,7 @@ def __init__(self, name, parents=None, size=None, uuid=None, seg_type=None, + percent=None, cache_request=None, pvs=None, from_lvs=None): + + if not exists: +- if seg_type not in [None, "linear", "thin", "thin-pool", "cache"] + lvm.raid_seg_types: ++ if seg_type not in [None, "linear", "thin", "thin-pool", "cache", "vdo-pool", "vdo"] + lvm.raid_seg_types: + raise ValueError("Invalid or unsupported segment type: %s" % seg_type) + if seg_type and seg_type in lvm.raid_seg_types and not pvs: + raise ValueError("List of PVs has to be given for every non-linear LV") +@@ -1793,7 +1793,11 @@ class LVMVDOPoolMixin(object): + + _external_dependencies = [availability.BLOCKDEV_LVM_PLUGIN, availability.BLOCKDEV_LVM_PLUGIN_VDO] + +- def __init__(self): ++ def __init__(self, compression=True, deduplication=True, index_memory=0, write_policy=None): ++ self.compression = compression ++ self.deduplication = deduplication ++ self.index_memory = index_memory ++ self.write_policy = write_policy + self._lvs = [] + + @property +@@ -1863,7 +1867,19 @@ def read_current_size(self): + + def _create(self): + """ Create the device. """ +- raise NotImplementedError ++ ++ if not self.vdo_lv: ++ raise errors.DeviceError("Cannot create new VDO pool without a VDO LV.") ++ ++ if self.write_policy: ++ write_policy = blockdev.lvm_get_vdo_write_policy_str(self.write_policy) ++ else: ++ write_policy = blockdev.LVMVDOWritePolicy.AUTO ++ ++ blockdev.lvm.vdo_pool_create(self.vg.name, self.vdo_lv.lvname, self.lvname, ++ self.size, self.vdo_lv.size, self.index_memory, ++ self.compression, self.deduplication, ++ write_policy) + + + class LVMVDOLogicalVolumeMixin(object): +@@ -1915,9 +1931,26 @@ def resizable(self): + def pool(self): + return self.parents[0] + ++ def _set_size(self, newsize): ++ if not isinstance(newsize, Size): ++ raise AttributeError("new size must of type Size") ++ ++ newsize = self.vg.align(newsize) ++ newsize = self.vg.align(util.numeric_type(newsize)) ++ # just make sure the size is set (no VG size/free space check needed for ++ # a VDO LV) ++ DMDevice._set_size(self, newsize) ++ ++ def _pre_create(self): ++ # skip LVMLogicalVolumeDevice's _pre_create() method as it checks for a ++ # free space in a VG which doesn't make sense for a VDO LV and causes a ++ # bug by limitting the VDO LV's size to VG free space which is nonsense ++ super(LVMLogicalVolumeBase, self)._pre_create() # pylint: disable=bad-super-call ++ + def _create(self): +- """ Create the device. """ +- raise NotImplementedError ++ # nothing to do here, VDO LV is created automatically together with ++ # the VDO pool ++ pass + + def _destroy(self): + # nothing to do here, VDO LV is destroyed automatically together with +@@ -1953,7 +1986,9 @@ def __init__(self, name, parents=None, size=None, uuid=None, seg_type=None, + fmt=None, exists=False, sysfs_path='', grow=None, maxsize=None, + percent=None, cache_request=None, pvs=None, + parent_lv=None, int_type=None, origin=None, vorigin=False, +- metadata_size=None, chunk_size=None, profile=None, from_lvs=None): ++ metadata_size=None, chunk_size=None, profile=None, from_lvs=None, ++ compression=False, deduplication=False, index_memory=0, ++ write_policy=None): + """ + :param name: the device name (generally a device node's basename) + :type name: str +@@ -2012,6 +2047,17 @@ def __init__(self, name, parents=None, size=None, uuid=None, seg_type=None, + :keyword from_lvs: LVs to create the new LV from (in the (data_lv, metadata_lv) order) + :type from_lvs: tuple of :class:`LVMLogicalVolumeDevice` + ++ For VDO pools only: ++ ++ :keyword compression: whether to enable compression on the VDO pool ++ :type compression: bool ++ :keyword dudplication: whether to enable dudplication on the VDO pool ++ :type dudplication: bool ++ :keyword index_memory: amount of index memory (in bytes) or 0 for default ++ :type index_memory: int ++ :keyword write_policy: write policy for the volume or None for default ++ :type write_policy: str ++ + """ + + if isinstance(parents, (list, ParentList)): +@@ -2032,7 +2078,8 @@ def __init__(self, name, parents=None, size=None, uuid=None, seg_type=None, + LVMLogicalVolumeBase.__init__(self, name, parents, size, uuid, seg_type, + fmt, exists, sysfs_path, grow, maxsize, + percent, cache_request, pvs, from_lvs) +- LVMVDOPoolMixin.__init__(self) ++ LVMVDOPoolMixin.__init__(self, compression, deduplication, index_memory, ++ write_policy) + LVMVDOLogicalVolumeMixin.__init__(self) + + LVMInternalLogicalVolumeMixin._init_check(self) + +From 2d1593b50dc6232e213b4df86dfbf5cf6d282dcd Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Mon, 2 Nov 2020 14:31:35 +0100 +Subject: [PATCH 07/17] Allow creating LVM VDO pools and volumes using + "blivet.new_lv" + +The steps to create the VDO devices would typically look like: + +pool = b.new_lv(vdo_pool=True, parents=[data], size=Size("8 GiB")) +vdolv = b.new_lv(vdo_lv=True, parents=[pool], size=Size("40 GiB")) +b.create_device(pool) +b.create_device(vdolv) +b.do_it() +--- + blivet/blivet.py | 18 ++++++++++++++---- + tests/devices_test/lvm_test.py | 31 +++++++++++++++++++++++++++++++ + 2 files changed, 45 insertions(+), 4 deletions(-) + +diff --git a/blivet/blivet.py b/blivet/blivet.py +index e7dbd37b..754eb152 100644 +--- a/blivet/blivet.py ++++ b/blivet/blivet.py +@@ -573,6 +573,10 @@ def new_lv(self, *args, **kwargs): + :type thin_pool: bool + :keyword thin_volume: whether to create a thin volume + :type thin_volume: bool ++ :keyword vdo_pool: whether to create a vdo pool ++ :type vdo_pool: bool ++ :keyword vdo_lv: whether to create a vdo lv ++ :type vdo_lv: bool + :returns: the new device + :rtype: :class:`~.devices.LVMLogicalVolumeDevice` + +@@ -589,8 +593,10 @@ def new_lv(self, *args, **kwargs): + """ + thin_volume = kwargs.pop("thin_volume", False) + thin_pool = kwargs.pop("thin_pool", False) ++ vdo_pool = kwargs.pop("vdo_pool", False) ++ vdo_lv = kwargs.pop("vdo_lv", False) + parent = kwargs.get("parents", [None])[0] +- if thin_volume and parent: ++ if (thin_volume or vdo_lv) and parent: + # kwargs["parents"] will contain the pool device, so... + vg = parent.vg + else: +@@ -600,6 +606,10 @@ def new_lv(self, *args, **kwargs): + kwargs["seg_type"] = "thin" + if thin_pool: + kwargs["seg_type"] = "thin-pool" ++ if vdo_pool: ++ kwargs["seg_type"] = "vdo-pool" ++ if vdo_lv: ++ kwargs["seg_type"] = "vdo" + + mountpoint = kwargs.pop("mountpoint", None) + if 'fmt_type' in kwargs: +@@ -625,7 +635,7 @@ def new_lv(self, *args, **kwargs): + swap = False + + prefix = "" +- if thin_pool: ++ if thin_pool or vdo_pool: + prefix = "pool" + + name = self.suggest_device_name(parent=vg, +@@ -636,10 +646,10 @@ def new_lv(self, *args, **kwargs): + if "%s-%s" % (vg.name, name) in self.names: + raise ValueError("name already in use") + +- if thin_pool or thin_volume: ++ if thin_pool or thin_volume or vdo_pool or vdo_lv: + cache_req = kwargs.pop("cache_request", None) + if cache_req: +- raise ValueError("Creating cached thin volumes and pools is not supported") ++ raise ValueError("Creating cached thin and VDO volumes and pools is not supported") + + return LVMLogicalVolumeDevice(name, *args, **kwargs) + +diff --git a/tests/devices_test/lvm_test.py b/tests/devices_test/lvm_test.py +index 204cb99a..493d3ba1 100644 +--- a/tests/devices_test/lvm_test.py ++++ b/tests/devices_test/lvm_test.py +@@ -689,3 +689,34 @@ def test_new_lv_from_non_existing_lvs(self): + with patch.object(pool, "_pre_create"): + pool.create() + self.assertTrue(lvm.thpool_convert.called) ++ ++ def test_new_vdo_pool(self): ++ b = blivet.Blivet() ++ pv = StorageDevice("pv1", fmt=blivet.formats.get_format("lvmpv"), ++ size=Size("10 GiB"), exists=True) ++ vg = LVMVolumeGroupDevice("testvg", parents=[pv], exists=True) ++ ++ for dev in (pv, vg): ++ b.devicetree._add_device(dev) ++ ++ # check that all the above devices are in the expected places ++ self.assertEqual(set(b.devices), {pv, vg}) ++ self.assertEqual(set(b.vgs), {vg}) ++ ++ self.assertEqual(vg.size, Size("10236 MiB")) ++ ++ vdopool = b.new_lv(name="vdopool", vdo_pool=True, ++ parents=[vg], compression=True, ++ deduplication=True, ++ size=blivet.size.Size("8 GiB")) ++ ++ vdolv = b.new_lv(name="vdolv", vdo_lv=True, ++ parents=[vdopool], ++ size=blivet.size.Size("40 GiB")) ++ ++ b.create_device(vdopool) ++ b.create_device(vdolv) ++ ++ self.assertEqual(vdopool.children[0], vdolv) ++ self.assertEqual(vdolv.parents[0], vdopool) ++ self.assertListEqual(vg.lvs, [vdopool, vdolv]) + +From 31ec429ad7bd0857a768e2dfebe1de088dafc144 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Mon, 2 Nov 2020 14:32:47 +0100 +Subject: [PATCH 08/17] Add LVM VDO device factory + +--- + blivet/devicefactory.py | 100 +++++++++++++++++++++++++++- + tests/devicefactory_test.py | 128 +++++++++++++++++++++++++++++++++--- + 2 files changed, 218 insertions(+), 10 deletions(-) + +diff --git a/blivet/devicefactory.py b/blivet/devicefactory.py +index 9214ad54..c95037cc 100644 +--- a/blivet/devicefactory.py ++++ b/blivet/devicefactory.py +@@ -27,7 +27,7 @@ + from .devices import BTRFSDevice, DiskDevice + from .devices import LUKSDevice, LVMLogicalVolumeDevice + from .devices import PartitionDevice, MDRaidArrayDevice +-from .devices.lvm import DEFAULT_THPOOL_RESERVE ++from .devices.lvm import LVMVDOPoolMixin, DEFAULT_THPOOL_RESERVE + from .formats import get_format + from .devicelibs import btrfs + from .devicelibs import mdraid +@@ -58,6 +58,7 @@ + DEVICE_TYPE_BTRFS = 3 + DEVICE_TYPE_DISK = 4 + DEVICE_TYPE_LVM_THINP = 5 ++DEVICE_TYPE_LVM_VDO = 6 + + + def is_supported_device_type(device_type): +@@ -69,6 +70,9 @@ def is_supported_device_type(device_type): + :returns: True if this device type is supported + :rtype: bool + """ ++ if device_type == DEVICE_TYPE_LVM_VDO: ++ return not any(e for e in LVMVDOPoolMixin._external_dependencies if not e.available) ++ + devices = [] + if device_type == DEVICE_TYPE_BTRFS: + devices = [BTRFSDevice] +@@ -96,7 +100,7 @@ def get_supported_raid_levels(device_type): + pkg = None + if device_type == DEVICE_TYPE_BTRFS: + pkg = btrfs +- elif device_type in (DEVICE_TYPE_LVM, DEVICE_TYPE_LVM_THINP): ++ elif device_type in (DEVICE_TYPE_LVM, DEVICE_TYPE_LVM_THINP, DEVICE_TYPE_LVM_VDO): + pkg = lvm + elif device_type == DEVICE_TYPE_MD: + pkg = mdraid +@@ -116,6 +120,8 @@ def get_device_type(device): + "lvmlv": DEVICE_TYPE_LVM, + "lvmthinlv": DEVICE_TYPE_LVM_THINP, + "lvmthinpool": DEVICE_TYPE_LVM, ++ "lvmvdolv": DEVICE_TYPE_LVM_VDO, ++ "lvmvdopool": DEVICE_TYPE_LVM, + "btrfs subvolume": DEVICE_TYPE_BTRFS, + "btrfs volume": DEVICE_TYPE_BTRFS, + "mdarray": DEVICE_TYPE_MD} +@@ -136,6 +142,7 @@ def get_device_factory(blivet, device_type=DEVICE_TYPE_LVM, **kwargs): + DEVICE_TYPE_PARTITION: PartitionFactory, + DEVICE_TYPE_MD: MDFactory, + DEVICE_TYPE_LVM_THINP: LVMThinPFactory, ++ DEVICE_TYPE_LVM_VDO: LVMVDOFactory, + DEVICE_TYPE_DISK: DeviceFactory} + + factory_class = class_table[device_type] +@@ -1738,6 +1745,95 @@ def _get_new_device(self, *args, **kwargs): + return super(LVMThinPFactory, self)._get_new_device(*args, **kwargs) + + ++class LVMVDOFactory(LVMFactory): ++ ++ """ Factory for creating LVM VDO volumes. ++ ++ :keyword pool_name: name for the VDO pool, if not specified unique name will be generated ++ :type pool_name: str ++ :keyword virtual_size: size for the VDO volume, usually bigger than pool size, if not ++ specified physical size (pool size) will be used ++ :type size: :class:`~.size.Size` ++ :keyword compression: whether to enable compression (defaults to True) ++ :type compression: bool ++ :keyword deduplication: whether to enable deduplication (defaults to True) ++ :type deduplication: bool ++ """ ++ ++ def __init__(self, storage, **kwargs): ++ self.pool_name = kwargs.pop("pool_name", None) ++ self.virtual_size = kwargs.pop("virtual_size", None) ++ self.compression = kwargs.pop("compression", True) ++ self.deduplication = kwargs.pop("deduplication", True) ++ super(LVMVDOFactory, self).__init__(storage, **kwargs) ++ ++ def _get_new_pool(self, *args, **kwargs): ++ kwargs["vdo_pool"] = True ++ return super(LVMVDOFactory, self)._get_new_device(*args, **kwargs) ++ ++ def _set_device_size(self): ++ """ Set the size of the factory device. """ ++ super(LVMVDOFactory, self)._set_device_size() ++ ++ self.device.pool.size = self.size ++ self._reconfigure_container() ++ ++ if not self.virtual_size or self.virtual_size < self.size: ++ # virtual_size is not set or smaller than current size --> it should be same as the pool size ++ self.device.size = self.size ++ else: ++ self.device.size = self.virtual_size ++ ++ def _set_pool_name(self): ++ safe_new_name = self.storage.safe_device_name(self.pool_name) ++ if self.device.pool.name != safe_new_name: ++ if not safe_new_name: ++ log.error("not renaming '%s' to invalid name '%s'", ++ self.device.pool.name, self.pool_name) ++ return ++ if safe_new_name in self.storage.names: ++ log.error("not renaming '%s' to in-use name '%s'", ++ self.device.pool.name, safe_new_name) ++ return ++ ++ log.debug("renaming device '%s' to '%s'", ++ self.device.pool.name, safe_new_name) ++ self.device.pool.raw_device.name = safe_new_name ++ ++ def _set_name(self): ++ super(LVMVDOFactory, self)._set_name() ++ if self.pool_name: ++ self._set_pool_name() ++ ++ def _reconfigure_device(self): ++ super(LVMVDOFactory, self)._reconfigure_device() ++ ++ self.device.pool.compression = self.compression ++ self.device.pool.deduplication = self.deduplication ++ ++ # ++ # methods to configure the factory's device ++ # ++ def _get_new_device(self, *args, **kwargs): ++ """ Create and return the factory device as a StorageDevice. """ ++ pool = self._get_new_pool(name=self.pool_name, ++ size=self.size, ++ parents=[self.vg], ++ compression=self.compression, ++ deduplication=self.deduplication) ++ self.storage.create_device(pool) ++ ++ kwargs["parents"] = [pool] ++ kwargs["vdo_lv"] = True ++ ++ if self.virtual_size: ++ vdolv_kwargs = kwargs.copy() ++ vdolv_kwargs["size"] = self.virtual_size ++ else: ++ vdolv_kwargs = kwargs ++ return super(LVMVDOFactory, self)._get_new_device(*args, **vdolv_kwargs) ++ ++ + class MDFactory(DeviceFactory): + + """ Factory for creating MD RAID devices. """ +diff --git a/tests/devicefactory_test.py b/tests/devicefactory_test.py +index 08068779..7cdb51c5 100644 +--- a/tests/devicefactory_test.py ++++ b/tests/devicefactory_test.py +@@ -4,6 +4,9 @@ + from decimal import Decimal + import os + ++import test_compat # pylint: disable=unused-import ++from six.moves.mock import patch # pylint: disable=no-name-in-module,import-error ++ + import blivet + + from blivet import devicefactory +@@ -93,10 +96,12 @@ def _validate_factory_device(self, *args, **kwargs): + self.assertEqual(device.format.label, + kwargs.get('label')) + +- self.assertLessEqual(device.size, kwargs.get("size")) +- self.assertGreaterEqual(device.size, device.format.min_size) +- if device.format.max_size: +- self.assertLessEqual(device.size, device.format.max_size) ++ # sizes with VDO are special, we have a special check in LVMVDOFactoryTestCase._validate_factory_device ++ if device_type != devicefactory.DEVICE_TYPE_LVM_VDO: ++ self.assertLessEqual(device.size, kwargs.get("size")) ++ self.assertGreaterEqual(device.size, device.format.min_size) ++ if device.format.max_size: ++ self.assertLessEqual(device.size, device.format.max_size) + + self.assertEqual(device.encrypted, + kwargs.get("encrypted", False) or +@@ -115,7 +120,11 @@ def test_device_factory(self): + "mountpoint": '/factorytest'} + device = self._factory_device(device_type, **kwargs) + self._validate_factory_device(device, device_type, **kwargs) +- self.b.recursive_remove(device) ++ ++ if device.type == "lvmvdolv": ++ self.b.recursive_remove(device.pool) ++ else: ++ self.b.recursive_remove(device) + + if self.encryption_supported: + # Encrypt the leaf device +@@ -157,6 +166,12 @@ def test_device_factory(self): + device = self._factory_device(device_type, **kwargs) + self._validate_factory_device(device, device_type, **kwargs) + ++ # change size up ++ kwargs["device"] = device ++ kwargs["size"] = Size("900 MiB") ++ device = self._factory_device(device_type, **kwargs) ++ self._validate_factory_device(device, device_type, **kwargs) ++ + # Change LUKS version + kwargs["luks_version"] = "luks1" + device = self._factory_device(device_type, **kwargs) +@@ -179,7 +194,7 @@ def _get_size_delta(self, devices=None): + """ + return Size("1 MiB") + +- def test_get_free_disk_space(self): ++ def test_get_free_disk_space(self, *args): # pylint: disable=unused-argument + # get_free_disk_space should return the total free space on disks + kwargs = self._get_test_factory_args() + kwargs["size"] = Size("500 MiB") +@@ -206,7 +221,7 @@ def test_get_free_disk_space(self): + sum(d.size for d in self.b.disks) - device_space, + delta=self._get_size_delta(devices=[device])) + +- def test_normalize_size(self): ++ def test_normalize_size(self, *args): # pylint: disable=unused-argument + # _normalize_size should adjust target size to within the format limits + fstype = "ext2" + ext2 = get_format(fstype) +@@ -258,7 +273,7 @@ def test_default_factory_type(self): + factory = devicefactory.get_device_factory(self.b) + self.assertIsInstance(factory, devicefactory.LVMFactory) + +- def test_factory_defaults(self): ++ def test_factory_defaults(self, *args): # pylint: disable=unused-argument + ctor_kwargs = self._get_test_factory_args() + factory = devicefactory.get_device_factory(self.b, self.device_type, **ctor_kwargs) + for setting, value in factory._default_settings.items(): +@@ -522,6 +537,103 @@ def _get_size_delta(self, devices=None): + return delta + + ++class LVMVDOFactoryTestCase(LVMFactoryTestCase): ++ device_class = LVMLogicalVolumeDevice ++ device_type = devicefactory.DEVICE_TYPE_LVM_VDO ++ encryption_supported = False ++ ++ def _validate_factory_device(self, *args, **kwargs): ++ super(LVMVDOFactoryTestCase, self)._validate_factory_device(*args, ++ **kwargs) ++ device = args[0] ++ ++ if kwargs.get("encrypted", False): ++ vdolv = device.parents[0] ++ else: ++ vdolv = device ++ ++ self.assertTrue(hasattr(vdolv, "pool")) ++ ++ virtual_size = kwargs.get("virtual_size", 0) ++ if virtual_size: ++ self.assertEqual(vdolv.size, virtual_size) ++ else: ++ self.assertEqual(vdolv.size, vdolv.pool.size) ++ self.assertGreaterEqual(vdolv.size, vdolv.pool.size) ++ ++ compression = kwargs.get("compression", True) ++ self.assertEqual(vdolv.pool.compression, compression) ++ ++ deduplication = kwargs.get("deduplication", True) ++ self.assertEqual(vdolv.pool.deduplication, deduplication) ++ ++ pool_name = kwargs.get("pool_name", None) ++ if pool_name: ++ self.assertEqual(vdolv.pool.lvname, pool_name) ++ ++ return device ++ ++ @patch("blivet.formats.lvmpv.LVMPhysicalVolume.formattable", return_value=True) ++ @patch("blivet.formats.lvmpv.LVMPhysicalVolume.destroyable", return_value=True) ++ @patch("blivet.static_data.lvm_info.blockdev.lvm.lvs", return_value=[]) ++ @patch("blivet.devices.lvm.LVMVolumeGroupDevice.type_external_dependencies", return_value=set()) ++ @patch("blivet.devices.lvm.LVMLogicalVolumeBase.type_external_dependencies", return_value=set()) ++ def test_device_factory(self, *args): # pylint: disable=unused-argument,arguments-differ ++ device_type = self.device_type ++ kwargs = {"disks": self.b.disks, ++ "size": Size("400 MiB"), ++ "fstype": 'ext4', ++ "mountpoint": '/factorytest'} ++ device = self._factory_device(device_type, **kwargs) ++ self._validate_factory_device(device, device_type, **kwargs) ++ self.b.recursive_remove(device.pool) ++ ++ kwargs = {"disks": self.b.disks, ++ "size": Size("400 MiB"), ++ "fstype": 'ext4', ++ "mountpoint": '/factorytest', ++ "pool_name": "vdopool", ++ "deduplication": True, ++ "compression": True} ++ device = self._factory_device(device_type, **kwargs) ++ self._validate_factory_device(device, device_type, **kwargs) ++ ++ # change size without specifying virtual_size: both sizes should grow ++ kwargs["size"] = Size("600 MiB") ++ kwargs["device"] = device ++ device = self._factory_device(device_type, **kwargs) ++ self._validate_factory_device(device, device_type, **kwargs) ++ ++ # change virtual size ++ kwargs["virtual_size"] = Size("6 GiB") ++ kwargs["device"] = device ++ device = self._factory_device(device_type, **kwargs) ++ self._validate_factory_device(device, device_type, **kwargs) ++ ++ # change virtual size to smaller than size ++ kwargs["virtual_size"] = Size("500 GiB") ++ kwargs["device"] = device ++ device = self._factory_device(device_type, **kwargs) ++ self._validate_factory_device(device, device_type, **kwargs) ++ ++ # change deduplication and compression ++ kwargs["deduplication"] = False ++ kwargs["device"] = device ++ device = self._factory_device(device_type, **kwargs) ++ self._validate_factory_device(device, device_type, **kwargs) ++ ++ kwargs["compression"] = False ++ kwargs["device"] = device ++ device = self._factory_device(device_type, **kwargs) ++ self._validate_factory_device(device, device_type, **kwargs) ++ ++ # rename the pool ++ kwargs["pool_name"] = "vdopool2" ++ kwargs["device"] = device ++ device = self._factory_device(device_type, **kwargs) ++ self._validate_factory_device(device, device_type, **kwargs) ++ ++ + class MDFactoryTestCase(DeviceFactoryTestCase): + device_type = devicefactory.DEVICE_TYPE_MD + device_class = MDRaidArrayDevice + +From 22ba2b96111d5f153a3b55d3c56d84e597cf9a90 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Mon, 2 Nov 2020 14:33:06 +0100 +Subject: [PATCH 09/17] Add VM test for LVM VDO + +--- + tests/vmtests/blivet_reset_vmtest.py | 15 +++++++++++++++ + tests/vmtests/runvmtests.py | 3 ++- + 2 files changed, 17 insertions(+), 1 deletion(-) + +diff --git a/tests/vmtests/blivet_reset_vmtest.py b/tests/vmtests/blivet_reset_vmtest.py +index 8743d51e..47fc84c4 100644 +--- a/tests/vmtests/blivet_reset_vmtest.py ++++ b/tests/vmtests/blivet_reset_vmtest.py +@@ -192,6 +192,21 @@ def setUp(self): + self.collect_expected_data() + + ++class LVMVDOTestCase(BlivetResetTestCase): ++ ++ def _set_up_storage(self): ++ if not devicefactory.is_supported_device_type(devicefactory.DEVICE_TYPE_LVM_VDO): ++ self.skipTest("VDO not supported, skipping") ++ ++ self.blivet.factory_device(devicefactory.DEVICE_TYPE_LVM_VDO, ++ size=Size("10 GiB"), ++ fstype="ext4", ++ disks=self.blivet.disks[:], ++ name="vdolv", ++ pool_name="vdopool", ++ virtual_size=Size("40 GiB")) ++ ++ + @unittest.skip("temporarily disabled due to issues with raids with metadata version 0.90") + class MDRaid0TestCase(BlivetResetTestCase): + +diff --git a/tests/vmtests/runvmtests.py b/tests/vmtests/runvmtests.py +index 88143d3a..6f20484f 100644 +--- a/tests/vmtests/runvmtests.py ++++ b/tests/vmtests/runvmtests.py +@@ -12,7 +12,8 @@ + "tests.vmtests.blivet_reset_vmtest.LVMThinSnapShotTestCase", + "tests.vmtests.blivet_reset_vmtest.LVMRaidTestCase", + "tests.vmtests.blivet_reset_vmtest.MDRaid0TestCase", +- "tests.vmtests.blivet_reset_vmtest.LVMOnMDTestCase"] ++ "tests.vmtests.blivet_reset_vmtest.LVMOnMDTestCase", ++ "tests.vmtests.blivet_reset_vmtest.LVMVDOTestCase"] + + SNAP_NAME = "snapshot" + + +From 52b37bb86e856f1ede71f7cceb7284a639d741f4 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Thu, 19 Nov 2020 13:07:17 +0100 +Subject: [PATCH 10/17] Allow adding nodiscard option when running mkfs + +For filesystems that support it we might want to add some nodiscard +option to mkfs when creating format on devices like LVM VDO +volumes where discard is very slow and doesn't really makes sense +when running mkfs. +--- + blivet/formats/fs.py | 12 +++++- + blivet/tasks/fsmkfs.py | 59 +++++++++++++++++++++++++++--- + tests/formats_test/methods_test.py | 3 +- + 3 files changed, 66 insertions(+), 8 deletions(-) + +diff --git a/blivet/formats/fs.py b/blivet/formats/fs.py +index 4ba83e6d..e61e5b86 100644 +--- a/blivet/formats/fs.py ++++ b/blivet/formats/fs.py +@@ -132,6 +132,7 @@ def __init__(self, **kwargs): + self.mountopts = kwargs.get("mountopts", "") + self.label = kwargs.get("label") + self.fsprofile = kwargs.get("fsprofile") ++ self._mkfs_nodiscard = kwargs.get("nodiscard", False) + + self._user_mountopts = self.mountopts + +@@ -263,6 +264,14 @@ def label_format_ok(self, label): + label = property(lambda s: s._get_label(), lambda s, l: s._set_label(l), + doc="this filesystem's label") + ++ def can_nodiscard(self): ++ """Returns True if this filesystem supports nodiscard option during ++ creation, otherwise False. ++ ++ :rtype: bool ++ """ ++ return self._mkfs.can_nodiscard and self._mkfs.available ++ + def can_set_uuid(self): + """Returns True if this filesystem supports setting an UUID during + creation, otherwise False. +@@ -402,7 +411,8 @@ def _create(self, **kwargs): + try: + self._mkfs.do_task(options=kwargs.get("options"), + label=not self.relabels(), +- set_uuid=self.can_set_uuid()) ++ set_uuid=self.can_set_uuid(), ++ nodiscard=self.can_nodiscard()) + except FSWriteLabelError as e: + log.warning("Choosing not to apply label (%s) during creation of filesystem %s. Label format is unacceptable for this filesystem.", self.label, self.type) + except FSWriteUUIDError as e: +diff --git a/blivet/tasks/fsmkfs.py b/blivet/tasks/fsmkfs.py +index ad166aa0..c982f7e7 100644 +--- a/blivet/tasks/fsmkfs.py ++++ b/blivet/tasks/fsmkfs.py +@@ -37,6 +37,7 @@ class FSMkfsTask(fstask.FSTask): + + can_label = abc.abstractproperty(doc="whether this task labels") + can_set_uuid = abc.abstractproperty(doc="whether this task can set UUID") ++ can_nodiscard = abc.abstractproperty(doc="whether this task can set nodiscard option") + + + @add_metaclass(abc.ABCMeta) +@@ -48,6 +49,9 @@ class FSMkfs(task.BasicApplication, FSMkfsTask): + label_option = abc.abstractproperty( + doc="Option for setting a filesystem label.") + ++ nodiscard_option = abc.abstractproperty( ++ doc="Option for setting nodiscrad option for mkfs.") ++ + args = abc.abstractproperty(doc="options for creating filesystem") + + @abc.abstractmethod +@@ -80,6 +84,15 @@ def can_set_uuid(self): + """ + return self.get_uuid_args is not None + ++ @property ++ def can_nodiscard(self): ++ """Whether this task can set nodiscard option for a filesystem. ++ ++ :returns: True if nodiscard can be set ++ :rtype: bool ++ """ ++ return self.nodiscard_option is not None ++ + @property + def _label_options(self): + """ Any labeling options that a particular filesystem may use. +@@ -100,6 +113,23 @@ def _label_options(self): + else: + raise FSWriteLabelError("Choosing not to apply label (%s) during creation of filesystem %s. Label format is unacceptable for this filesystem." % (self.fs.label, self.fs.type)) + ++ @property ++ def _nodiscard_option(self): ++ """ Any nodiscard options that a particular filesystem may use. ++ ++ :returns: nodiscard options ++ :rtype: list of str ++ """ ++ # Do not know how to set nodiscard while formatting. ++ if self.nodiscard_option is None: ++ return [] ++ ++ # nodiscard option not requested ++ if not self.fs._mkfs_nodiscard: ++ return [] ++ ++ return self.nodiscard_option ++ + @property + def _uuid_options(self): + """Any UUID options that a particular filesystem may use. +@@ -119,7 +149,7 @@ def _uuid_options(self): + " is unacceptable for this filesystem." + % (self.fs.uuid, self.fs.type)) + +- def _format_options(self, options=None, label=False, set_uuid=False): ++ def _format_options(self, options=None, label=False, set_uuid=False, nodiscard=False): + """Get a list of format options to be used when creating the + filesystem. + +@@ -135,11 +165,12 @@ def _format_options(self, options=None, label=False, set_uuid=False): + + label_options = self._label_options if label else [] + uuid_options = self._uuid_options if set_uuid else [] ++ nodiscard_option = self._nodiscard_option if nodiscard else [] + create_options = shlex.split(self.fs.create_options or "") + return (options + self.args + label_options + uuid_options + +- create_options + [self.fs.device]) ++ nodiscard_option + create_options + [self.fs.device]) + +- def _mkfs_command(self, options, label, set_uuid): ++ def _mkfs_command(self, options, label, set_uuid, nodiscard): + """Return the command to make the filesystem. + + :param options: any special options +@@ -148,12 +179,14 @@ def _mkfs_command(self, options, label, set_uuid): + :type label: bool + :param set_uuid: whether to set an UUID + :type set_uuid: bool ++ :param nodiscard: whether to run mkfs with nodiscard option ++ :type nodiscard: bool + :returns: the mkfs command + :rtype: list of str + """ +- return [str(self.ext)] + self._format_options(options, label, set_uuid) ++ return [str(self.ext)] + self._format_options(options, label, set_uuid, nodiscard) + +- def do_task(self, options=None, label=False, set_uuid=False): ++ def do_task(self, options=None, label=False, set_uuid=False, nodiscard=False): + """Create the format on the device and label if possible and desired. + + :param options: any special options, may be None +@@ -168,7 +201,7 @@ def do_task(self, options=None, label=False, set_uuid=False): + raise FSError("\n".join(error_msgs)) + + options = options or [] +- cmd = self._mkfs_command(options, label, set_uuid) ++ cmd = self._mkfs_command(options, label, set_uuid, nodiscard) + try: + ret = util.run_program(cmd) + except OSError as e: +@@ -181,6 +214,7 @@ def do_task(self, options=None, label=False, set_uuid=False): + class BTRFSMkfs(FSMkfs): + ext = availability.MKFS_BTRFS_APP + label_option = None ++ nodiscard_option = ["--nodiscard"] + + def get_uuid_args(self, uuid): + return ["-U", uuid] +@@ -193,6 +227,7 @@ def args(self): + class Ext2FSMkfs(FSMkfs): + ext = availability.MKE2FS_APP + label_option = "-L" ++ nodiscard_option = ["-E", "nodiscard"] + + _opts = [] + +@@ -215,6 +250,7 @@ class Ext4FSMkfs(Ext3FSMkfs): + class FATFSMkfs(FSMkfs): + ext = availability.MKDOSFS_APP + label_option = "-n" ++ nodiscard_option = None + + def get_uuid_args(self, uuid): + return ["-i", uuid.replace('-', '')] +@@ -227,6 +263,7 @@ def args(self): + class GFS2Mkfs(FSMkfs): + ext = availability.MKFS_GFS2_APP + label_option = None ++ nodiscard_option = None + get_uuid_args = None + + @property +@@ -237,6 +274,7 @@ def args(self): + class HFSMkfs(FSMkfs): + ext = availability.HFORMAT_APP + label_option = "-l" ++ nodiscard_option = None + get_uuid_args = None + + @property +@@ -247,6 +285,7 @@ def args(self): + class HFSPlusMkfs(FSMkfs): + ext = availability.MKFS_HFSPLUS_APP + label_option = "-v" ++ nodiscard_option = None + get_uuid_args = None + + @property +@@ -257,6 +296,7 @@ def args(self): + class JFSMkfs(FSMkfs): + ext = availability.MKFS_JFS_APP + label_option = "-L" ++ nodiscard_option = None + get_uuid_args = None + + @property +@@ -267,6 +307,7 @@ def args(self): + class NTFSMkfs(FSMkfs): + ext = availability.MKNTFS_APP + label_option = "-L" ++ nodiscard_option = None + get_uuid_args = None + + @property +@@ -277,6 +318,7 @@ def args(self): + class ReiserFSMkfs(FSMkfs): + ext = availability.MKREISERFS_APP + label_option = "-l" ++ nodiscard_option = None + + def get_uuid_args(self, uuid): + return ["-u", uuid] +@@ -289,6 +331,7 @@ def args(self): + class XFSMkfs(FSMkfs): + ext = availability.MKFS_XFS_APP + label_option = "-L" ++ nodiscard_option = ["-K"] + + def get_uuid_args(self, uuid): + return ["-m", "uuid=" + uuid] +@@ -307,3 +350,7 @@ def can_label(self): + @property + def can_set_uuid(self): + return False ++ ++ @property ++ def can_nodiscard(self): ++ return False +diff --git a/tests/formats_test/methods_test.py b/tests/formats_test/methods_test.py +index 710fa1c5..b2674ea7 100644 +--- a/tests/formats_test/methods_test.py ++++ b/tests/formats_test/methods_test.py +@@ -307,7 +307,8 @@ def _test_create_backend(self): + self.format._mkfs.do_task.assert_called_with( + options=None, + label=not self.format.relabels(), +- set_uuid=self.format.can_set_uuid() ++ set_uuid=self.format.can_set_uuid(), ++ nodiscard=self.format.can_nodiscard() + ) + + def _test_setup_backend(self): + +From ac04f74fa9bc8ded3facd302ca74ec033009a0bd Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Thu, 19 Nov 2020 13:19:21 +0100 +Subject: [PATCH 11/17] Add nodiscard option by default when creating VDO + logical volumes + +User can override this by passing "nodiscard=False" to the LV +constructor, but we want nodiscard by default. +--- + blivet/blivet.py | 8 +++++++- + blivet/devicefactory.py | 6 ++++++ + tests/devicefactory_test.py | 7 +++++++ + 3 files changed, 20 insertions(+), 1 deletion(-) + +diff --git a/blivet/blivet.py b/blivet/blivet.py +index 754eb152..e4115691 100644 +--- a/blivet/blivet.py ++++ b/blivet/blivet.py +@@ -613,9 +613,15 @@ def new_lv(self, *args, **kwargs): + + mountpoint = kwargs.pop("mountpoint", None) + if 'fmt_type' in kwargs: ++ fmt_args = kwargs.pop("fmt_args", {}) ++ if vdo_lv and "nodiscard" not in fmt_args.keys(): ++ # we don't want to run discard on VDO LV during mkfs so if user don't ++ # tell us not to do it, we should add the nodiscard option to mkfs ++ fmt_args["nodiscard"] = True ++ + kwargs["fmt"] = get_format(kwargs.pop("fmt_type"), + mountpoint=mountpoint, +- **kwargs.pop("fmt_args", {})) ++ **fmt_args) + + name = kwargs.pop("name", None) + if name: +diff --git a/blivet/devicefactory.py b/blivet/devicefactory.py +index c95037cc..085f2fd6 100644 +--- a/blivet/devicefactory.py ++++ b/blivet/devicefactory.py +@@ -1811,6 +1811,12 @@ def _reconfigure_device(self): + self.device.pool.compression = self.compression + self.device.pool.deduplication = self.deduplication + ++ def _set_format(self): ++ super(LVMVDOFactory, self)._set_format() ++ ++ # preserve nodiscard mkfs option after changing filesystem ++ self.device.format._mkfs_nodiscard = True ++ + # + # methods to configure the factory's device + # +diff --git a/tests/devicefactory_test.py b/tests/devicefactory_test.py +index 7cdb51c5..4de1e05b 100644 +--- a/tests/devicefactory_test.py ++++ b/tests/devicefactory_test.py +@@ -571,6 +571,10 @@ def _validate_factory_device(self, *args, **kwargs): + if pool_name: + self.assertEqual(vdolv.pool.lvname, pool_name) + ++ # nodiscard should be always set for VDO LV format ++ if vdolv.format.type: ++ self.assertTrue(vdolv.format._mkfs_nodiscard) ++ + return device + + @patch("blivet.formats.lvmpv.LVMPhysicalVolume.formattable", return_value=True) +@@ -633,6 +637,9 @@ def test_device_factory(self, *args): # pylint: disable=unused-argument,argumen + device = self._factory_device(device_type, **kwargs) + self._validate_factory_device(device, device_type, **kwargs) + ++ # change fstype ++ kwargs["fstype"] = "xfs" ++ + + class MDFactoryTestCase(DeviceFactoryTestCase): + device_type = devicefactory.DEVICE_TYPE_MD + +From 43f25ce84729c321d1ff2bbba2f50489f6d736b4 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Thu, 19 Nov 2020 13:31:40 +0100 +Subject: [PATCH 12/17] Add LVM VDO example + +--- + examples/lvm_vdo.py | 61 +++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 61 insertions(+) + create mode 100644 examples/lvm_vdo.py + +diff --git a/examples/lvm_vdo.py b/examples/lvm_vdo.py +new file mode 100644 +index 00000000..ad081642 +--- /dev/null ++++ b/examples/lvm_vdo.py +@@ -0,0 +1,61 @@ ++import os ++ ++import blivet ++from blivet.size import Size ++from blivet.util import set_up_logging, create_sparse_tempfile ++ ++set_up_logging() ++b = blivet.Blivet() # create an instance of Blivet (don't add system devices) ++ ++# create a disk image file on which to create new devices ++disk1_file = create_sparse_tempfile("disk1", Size("100GiB")) ++b.disk_images["disk1"] = disk1_file ++disk2_file = create_sparse_tempfile("disk2", Size("100GiB")) ++b.disk_images["disk2"] = disk2_file ++ ++b.reset() ++ ++try: ++ disk1 = b.devicetree.get_device_by_name("disk1") ++ disk2 = b.devicetree.get_device_by_name("disk2") ++ ++ b.initialize_disk(disk1) ++ b.initialize_disk(disk2) ++ ++ pv = b.new_partition(size=Size("50GiB"), fmt_type="lvmpv", parents=[disk1]) ++ b.create_device(pv) ++ pv2 = b.new_partition(size=Size("50GiB"), fmt_type="lvmpv", parents=[disk2]) ++ b.create_device(pv2) ++ ++ # allocate the partitions (decide where and on which disks they'll reside) ++ blivet.partitioning.do_partitioning(b) ++ ++ vg = b.new_vg(parents=[pv, pv2]) ++ b.create_device(vg) ++ ++ # create 80 GiB VDO pool ++ # there can be only one VDO LV on the pool and these are created together ++ # with one LVM call, we have 2 separate devices because there are two block ++ # devices in the end and it allows to control the different "physical" size of ++ # the pool and "logical" size of the VDO LV (which is usually bigger, accounting ++ # for the saved space with deduplication and/or compression) ++ pool = b.new_lv(size=Size("80GiB"), parents=[vg], name="vdopool", vdo_pool=True, ++ deduplication=True, compression=True) ++ b.create_device(pool) ++ ++ # create the VDO LV with 400 GiB "virtual size" and ext4 filesystem on the VDO ++ # pool ++ lv = b.new_lv(size=Size("400GiB"), parents=[pool], name="vdolv", vdo_lv=True, ++ fmt_type="ext4") ++ b.create_device(lv) ++ ++ print(b.devicetree) ++ ++ # write the new partitions to disk and format them as specified ++ b.do_it() ++ print(b.devicetree) ++ input("Check the state and hit ENTER to trigger cleanup") ++finally: ++ b.devicetree.teardown_disk_images() ++ os.unlink(disk1_file) ++ os.unlink(disk2_file) + +From c487a1e6023b54f5beea8d99ba2f5da5d80590ee Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Wed, 25 Nov 2020 13:30:15 +0100 +Subject: [PATCH 13/17] Add LVM VDO documentation + +--- + doc/lvmvdo.rst | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 86 insertions(+) + create mode 100644 doc/lvmvdo.rst + +diff --git a/doc/lvmvdo.rst b/doc/lvmvdo.rst +new file mode 100644 +index 00000000..3965abd3 +--- /dev/null ++++ b/doc/lvmvdo.rst +@@ -0,0 +1,86 @@ ++LVM VDO support ++=============== ++ ++Support for creating LVM VDO devices has been added in Blivet 3.4. ++ ++These devices are similar to LVM thinly provisioned volumes, but there are some special steps ++and limitations when creating these devices which this document describes. ++ ++LVM VDO in Blivet ++----------------- ++ ++LVM VDO devices are represented by two ``LVMLogicalVolumeDevice`` devices: ++ ++- VDO Pool logical volume with type 'lvmvdopool' ++- VDO logical volume with type 'lvmvdolv' which is the child of the VDO Pool device ++ ++Existing LVM VDO setup in Blivet: ++ ++ existing 20 GiB disk vdb (265) with existing msdos disklabel ++ existing 20 GiB partition vdb1 (275) with existing lvmpv ++ existing 20 GiB lvmvg data (284) ++ existing 10 GiB lvmvdopool data-vdopool (288) ++ existing 50 GiB lvmvdolv data-vdolv (295) ++ ++When creating LVM VDO setup using Blivet these two devices must be created together as these ++are created by a single LVM command. ++ ++It currently isn't possible to create additional VDO logical volumes in the pool. It is however ++possible to create multiple VDO pools in a single volume group. ++ ++Deduplication and compression are properties of the VDO pool. Size specified for the VDO pool ++volume will be used as the "physical" size for the pool and size specified for the VDO logical volume ++will be used as the "virtual" size for the VDO volume. ++ ++When creating format, it must be created on the VDO logical volume. For filesystems with discard ++support, no discard option will be automatically added when calling the ``mkfs`` command ++(e.g. ``-K`` for ``mkfs.xfs``). ++ ++Example for creating a *80 GiB* VDO pool with *400 GiB* VDO logical volume with an *ext4* format with ++both deduplication and compression enabled: ++ ++ pool = b.new_lv(size=Size("80GiB"), parents=[vg], name="vdopool", vdo_pool=True, ++ deduplication=True, compression=True) ++ b.create_device(pool) ++ ++ lv = b.new_lv(size=Size("400GiB"), parents=[pool], name="vdolv", vdo_lv=True, ++ fmt_type="ext4") ++ b.create_device(lv) ++ ++When removing existing LVM VDO devices, both devices must be removed from the devicetree and the VDO ++logical volume must be removed first (``recursive_remove`` can be used to automate these two steps). ++ ++Managing of existing LVM VDO devices is currently not supported. ++ ++ ++LVM VDO in Devicefactory ++------------------------ ++ ++For the top-down specified creation using device factories a new ``LVMVDOFactory`` factory has been ++added. Factory device in this case is the VDO logical volume and is again automatically created ++together with the VDO pool. ++ ++Example of creating a new LVM VDO setup using the ``devicefactory`` module: ++ ++ factory = blivet.devicefactory.LVMVDOFactory(b, size=Size("5 GiB"), virtual_size=Size("50 GiB"), ++ disks=disks, fstype="xfs", ++ container_name="data", ++ pool_name="myvdopool", ++ compression=True, deduplication=True) ++ factory.configure() ++ factory.device ++ ++ LVMLogicalVolumeDevice instance (0x7f14d17422b0) -- ++ name = data-00 status = False id = 528 ++ children = [] ++ parents = ['non-existent 5 GiB lvmvdopool data-myvdopool (519)'] ++ ... ++ ++``size`` in this case sets the pool (physical) size, the VDO logical volume size can be specified ++with ``virtual_size`` (if not specified it will be same as the pool size). Name for the VDO volume ++can be specified using the ``name`` keyword argument. ``pool_name`` argument is optional and ++a unique name will be generated if omitted. Both ``compression`` and ``deduplication`` default to ++``True`` (enabled) if not specified. ++ ++This factory can create only a single VDO logical volume in a single VDO pool but additional VDO pools ++can be added by repeating the steps to create the first one. + +From c6c776cf137b5c6ae454487df469e9a6dba8a5d1 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Wed, 9 Dec 2020 14:06:27 +0100 +Subject: [PATCH 14/17] Set minimum size for LVM VDO pool devices + +--- + blivet/devicefactory.py | 3 +++ + blivet/devices/lvm.py | 26 ++++++++++++++++++++++++++ + tests/devicefactory_test.py | 29 ++++++++++++++++++++--------- + tests/devices_test/lvm_test.py | 6 ++++++ + 4 files changed, 55 insertions(+), 9 deletions(-) + +diff --git a/blivet/devicefactory.py b/blivet/devicefactory.py +index 085f2fd6..5e47eb9a 100644 +--- a/blivet/devicefactory.py ++++ b/blivet/devicefactory.py +@@ -277,6 +277,7 @@ class DeviceFactory(object): + "container_size": SIZE_POLICY_AUTO, + "container_raid_level": None, + "container_encrypted": None} ++ _device_min_size = Size(0) # no limit by default, limited only by filesystem size + + def __init__(self, storage, **kwargs): + """ +@@ -1760,6 +1761,8 @@ class LVMVDOFactory(LVMFactory): + :type deduplication: bool + """ + ++ _device_min_size = LVMVDOPoolMixin._min_size ++ + def __init__(self, storage, **kwargs): + self.pool_name = kwargs.pop("pool_name", None) + self.virtual_size = kwargs.pop("virtual_size", None) +diff --git a/blivet/devices/lvm.py b/blivet/devices/lvm.py +index 0802e2de..785fa2d2 100644 +--- a/blivet/devices/lvm.py ++++ b/blivet/devices/lvm.py +@@ -1792,6 +1792,7 @@ def populate_ksdata(self, data): + class LVMVDOPoolMixin(object): + + _external_dependencies = [availability.BLOCKDEV_LVM_PLUGIN, availability.BLOCKDEV_LVM_PLUGIN_VDO] ++ _min_size = Size("5 GiB") # 2.5 GiB for index and one 2 GiB slab rounded up to 5 GiB + + def __init__(self, compression=True, deduplication=True, index_memory=0, write_policy=None): + self.compression = compression +@@ -1800,6 +1801,9 @@ def __init__(self, compression=True, deduplication=True, index_memory=0, write_p + self.write_policy = write_policy + self._lvs = [] + ++ if not self.exists and self.size < self.min_size: ++ raise ValueError("Requested size %s is smaller than minimum %s" % (self.size, self.min_size)) ++ + @property + def is_vdo_pool(self): + return self.seg_type == "vdo-pool" +@@ -1856,6 +1860,23 @@ def direct(self): + """ Is this device directly accessible? """ + return False + ++ @property ++ @util.requires_property("is_vdo_pool") ++ def min_size(self): ++ if self.exists: ++ return self.current_size ++ ++ return self._min_size ++ ++ def _set_size(self, newsize): ++ if not isinstance(newsize, Size): ++ raise AttributeError("new size must of type Size") ++ ++ if newsize < self.min_size: ++ raise ValueError("Requested size %s is smaller than minimum %s" % (newsize, self.min_size)) ++ ++ DMDevice._set_size(self, newsize) ++ + def read_current_size(self): + log_method_call(self, exists=self.exists, path=self.path, + sysfs_path=self.sysfs_path) +@@ -2229,6 +2250,11 @@ def max_size(self): + max_format = self.format.max_size + return min(max_lv, max_format) if max_format else max_lv + ++ @property ++ @type_specific ++ def min_size(self): ++ return super(LVMLogicalVolumeDevice, self).min_size ++ + @property + @type_specific + def vg_space_used(self): +diff --git a/tests/devicefactory_test.py b/tests/devicefactory_test.py +index 4de1e05b..a1334cda 100644 +--- a/tests/devicefactory_test.py ++++ b/tests/devicefactory_test.py +@@ -49,13 +49,18 @@ class DeviceFactoryTestCase(unittest.TestCase): + encryption_supported = True + """ whether encryption of this device type is supported by blivet """ + ++ factory_class = None ++ """ devicefactory class used in this test case """ ++ ++ _disk_size = Size("2 GiB") ++ + def setUp(self): + if self.device_type is None: + raise unittest.SkipTest("abstract base class") + + self.b = blivet.Blivet() # don't populate it +- self.disk_files = [create_sparse_tempfile("factorytest", Size("2 GiB")), +- create_sparse_tempfile("factorytest", Size("2 GiB"))] ++ self.disk_files = [create_sparse_tempfile("factorytest", self._disk_size), ++ create_sparse_tempfile("factorytest", self._disk_size)] + for filename in self.disk_files: + disk = DiskFile(filename) + self.b.devicetree._add_device(disk) +@@ -197,7 +202,7 @@ def _get_size_delta(self, devices=None): + def test_get_free_disk_space(self, *args): # pylint: disable=unused-argument + # get_free_disk_space should return the total free space on disks + kwargs = self._get_test_factory_args() +- kwargs["size"] = Size("500 MiB") ++ kwargs["size"] = max(Size("500 MiB"), self.factory_class._device_min_size) + factory = devicefactory.get_device_factory(self.b, + self.device_type, + disks=self.b.disks, +@@ -285,7 +290,7 @@ def test_factory_defaults(self, *args): # pylint: disable=unused-argument + kwargs = self._get_test_factory_args() + kwargs.update({"disks": self.b.disks[:], + "fstype": "swap", +- "size": Size("2GiB"), ++ "size": max(Size("2GiB"), self.factory_class._device_min_size), + "label": "SWAP"}) + device = self._factory_device(self.device_type, **kwargs) + factory = devicefactory.get_device_factory(self.b, self.device_type, +@@ -302,6 +307,7 @@ def test_factory_defaults(self, *args): # pylint: disable=unused-argument + class PartitionFactoryTestCase(DeviceFactoryTestCase): + device_class = PartitionDevice + device_type = devicefactory.DEVICE_TYPE_PARTITION ++ factory_class = devicefactory.PartitionFactory + + def test_bug1178884(self): + # Test a change of format and size where old size is too large for the +@@ -330,6 +336,7 @@ def _get_size_delta(self, devices=None): + class LVMFactoryTestCase(DeviceFactoryTestCase): + device_class = LVMLogicalVolumeDevice + device_type = devicefactory.DEVICE_TYPE_LVM ++ factory_class = devicefactory.LVMFactory + + def _validate_factory_device(self, *args, **kwargs): + super(LVMFactoryTestCase, self)._validate_factory_device(*args, **kwargs) +@@ -510,6 +517,7 @@ class LVMThinPFactoryTestCase(LVMFactoryTestCase): + device_class = LVMLogicalVolumeDevice + device_type = devicefactory.DEVICE_TYPE_LVM_THINP + encryption_supported = False ++ factory_class = devicefactory.LVMThinPFactory + + def _validate_factory_device(self, *args, **kwargs): + super(LVMThinPFactoryTestCase, self)._validate_factory_device(*args, +@@ -541,6 +549,8 @@ class LVMVDOFactoryTestCase(LVMFactoryTestCase): + device_class = LVMLogicalVolumeDevice + device_type = devicefactory.DEVICE_TYPE_LVM_VDO + encryption_supported = False ++ _disk_size = Size("10 GiB") # we need bigger disks for VDO ++ factory_class = devicefactory.LVMVDOFactory + + def _validate_factory_device(self, *args, **kwargs): + super(LVMVDOFactoryTestCase, self)._validate_factory_device(*args, +@@ -585,7 +595,7 @@ def _validate_factory_device(self, *args, **kwargs): + def test_device_factory(self, *args): # pylint: disable=unused-argument,arguments-differ + device_type = self.device_type + kwargs = {"disks": self.b.disks, +- "size": Size("400 MiB"), ++ "size": Size("6 GiB"), + "fstype": 'ext4', + "mountpoint": '/factorytest'} + device = self._factory_device(device_type, **kwargs) +@@ -593,7 +603,7 @@ def test_device_factory(self, *args): # pylint: disable=unused-argument,argumen + self.b.recursive_remove(device.pool) + + kwargs = {"disks": self.b.disks, +- "size": Size("400 MiB"), ++ "size": Size("6 GiB"), + "fstype": 'ext4', + "mountpoint": '/factorytest', + "pool_name": "vdopool", +@@ -603,19 +613,19 @@ def test_device_factory(self, *args): # pylint: disable=unused-argument,argumen + self._validate_factory_device(device, device_type, **kwargs) + + # change size without specifying virtual_size: both sizes should grow +- kwargs["size"] = Size("600 MiB") ++ kwargs["size"] = Size("8 GiB") + kwargs["device"] = device + device = self._factory_device(device_type, **kwargs) + self._validate_factory_device(device, device_type, **kwargs) + + # change virtual size +- kwargs["virtual_size"] = Size("6 GiB") ++ kwargs["virtual_size"] = Size("40 GiB") + kwargs["device"] = device + device = self._factory_device(device_type, **kwargs) + self._validate_factory_device(device, device_type, **kwargs) + + # change virtual size to smaller than size +- kwargs["virtual_size"] = Size("500 GiB") ++ kwargs["virtual_size"] = Size("10 GiB") + kwargs["device"] = device + device = self._factory_device(device_type, **kwargs) + self._validate_factory_device(device, device_type, **kwargs) +@@ -644,6 +654,7 @@ def test_device_factory(self, *args): # pylint: disable=unused-argument,argumen + class MDFactoryTestCase(DeviceFactoryTestCase): + device_type = devicefactory.DEVICE_TYPE_MD + device_class = MDRaidArrayDevice ++ factory_class = devicefactory.MDFactory + + def test_device_factory(self): + # RAID0 across two disks +diff --git a/tests/devices_test/lvm_test.py b/tests/devices_test/lvm_test.py +index 493d3ba1..78b140ba 100644 +--- a/tests/devices_test/lvm_test.py ++++ b/tests/devices_test/lvm_test.py +@@ -705,6 +705,12 @@ def test_new_vdo_pool(self): + + self.assertEqual(vg.size, Size("10236 MiB")) + ++ with self.assertRaises(ValueError): ++ vdopool = b.new_lv(name="vdopool", vdo_pool=True, ++ parents=[vg], compression=True, ++ deduplication=True, ++ size=blivet.size.Size("1 GiB")) ++ + vdopool = b.new_lv(name="vdopool", vdo_pool=True, + parents=[vg], compression=True, + deduplication=True, + +From 197f2877709e702c101ada6b9a055a88f09320c8 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Fri, 11 Dec 2020 14:20:48 +0100 +Subject: [PATCH 15/17] Use better description for libblockdev plugins in + tasks.availability + +The old names were quite confusing when showing that "lvm" is +missing when in fact libblockdev LVM plugin is missing. Also with +LVM VDO we need to be able to tell the difference between missing +LVM plugin and missing LVM VDO support. +--- + blivet/tasks/availability.py | 26 +++++++++++++------------- + 1 file changed, 13 insertions(+), 13 deletions(-) + +diff --git a/blivet/tasks/availability.py b/blivet/tasks/availability.py +index b107428e..52418685 100644 +--- a/blivet/tasks/availability.py ++++ b/blivet/tasks/availability.py +@@ -236,13 +236,13 @@ def availability_errors(self, resource): + :returns: [] if the name of the plugin is loaded + :rtype: list of str + """ +- if resource.name not in blockdev.get_available_plugin_names(): # pylint: disable=no-value-for-parameter +- return ["libblockdev plugin %s not loaded" % resource.name] ++ if self._tech_info.plugin_name not in blockdev.get_available_plugin_names(): # pylint: disable=no-value-for-parameter ++ return ["libblockdev plugin %s not loaded" % self._tech_info.plugin_name] + else: + tech_missing = self._check_technologies() + if tech_missing: + return ["libblockdev plugin %s is loaded but some required " +- "technologies are not available:\n%s" % (resource.name, tech_missing)] ++ "technologies are not available:\n%s" % (self._tech_info.plugin_name, tech_missing)] + else: + return [] + +@@ -411,16 +411,16 @@ def available_resource(name): + # we can't just check if the plugin is loaded, we also need to make sure + # that all technologies required by us our supported (some may be missing + # due to missing dependencies) +-BLOCKDEV_BTRFS_PLUGIN = blockdev_plugin("btrfs", BLOCKDEV_BTRFS_TECH) +-BLOCKDEV_CRYPTO_PLUGIN = blockdev_plugin("crypto", BLOCKDEV_CRYPTO_TECH) +-BLOCKDEV_DM_PLUGIN = blockdev_plugin("dm", BLOCKDEV_DM_TECH) +-BLOCKDEV_DM_PLUGIN_RAID = blockdev_plugin("dm", BLOCKDEV_DM_TECH_RAID) +-BLOCKDEV_LOOP_PLUGIN = blockdev_plugin("loop", BLOCKDEV_LOOP_TECH) +-BLOCKDEV_LVM_PLUGIN = blockdev_plugin("lvm", BLOCKDEV_LVM_TECH) +-BLOCKDEV_LVM_PLUGIN_VDO = blockdev_plugin("lvm", BLOCKDEV_LVM_TECH_VDO) +-BLOCKDEV_MDRAID_PLUGIN = blockdev_plugin("mdraid", BLOCKDEV_MD_TECH) +-BLOCKDEV_MPATH_PLUGIN = blockdev_plugin("mpath", BLOCKDEV_MPATH_TECH) +-BLOCKDEV_SWAP_PLUGIN = blockdev_plugin("swap", BLOCKDEV_SWAP_TECH) ++BLOCKDEV_BTRFS_PLUGIN = blockdev_plugin("libblockdev btrfs plugin", BLOCKDEV_BTRFS_TECH) ++BLOCKDEV_CRYPTO_PLUGIN = blockdev_plugin("libblockdev crypto plugin", BLOCKDEV_CRYPTO_TECH) ++BLOCKDEV_DM_PLUGIN = blockdev_plugin("libblockdev dm plugin", BLOCKDEV_DM_TECH) ++BLOCKDEV_DM_PLUGIN_RAID = blockdev_plugin("libblockdev dm plugin (raid technology)", BLOCKDEV_DM_TECH_RAID) ++BLOCKDEV_LOOP_PLUGIN = blockdev_plugin("libblockdev loop plugin", BLOCKDEV_LOOP_TECH) ++BLOCKDEV_LVM_PLUGIN = blockdev_plugin("libblockdev lvm plugin", BLOCKDEV_LVM_TECH) ++BLOCKDEV_LVM_PLUGIN_VDO = blockdev_plugin("libblockdev lvm plugin (vdo technology)", BLOCKDEV_LVM_TECH_VDO) ++BLOCKDEV_MDRAID_PLUGIN = blockdev_plugin("libblockdev mdraid plugin", BLOCKDEV_MD_TECH) ++BLOCKDEV_MPATH_PLUGIN = blockdev_plugin("libblockdev mpath plugin", BLOCKDEV_MPATH_TECH) ++BLOCKDEV_SWAP_PLUGIN = blockdev_plugin("libblockdev swap plugin", BLOCKDEV_SWAP_TECH) + + # applications with versions + # we need e2fsprogs newer than 1.41 and we are checking the version by running + +From 5fc047b48b0de18fa249f102d2a7163ac2d6e6a6 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Fri, 11 Dec 2020 14:24:18 +0100 +Subject: [PATCH 16/17] Fix external dependencies for LVM VDO devices + +The external and unavailable dependencies code is mostly supposed +to work with just class objects and not instances, which is problem +for LVM devices where the LVMLogicalVolumeDevice can't depend on +LVM VDO and special LVM VDO device mixin classes don't inherit +from the Device class so they are missing some availability +functions. +This fix adds the neccessary functions to LVM VDO mixin classes to +make sure both "unavailable_type_dependencies" and +"type_external_dependencies" work with LVMVDOLogicalVolumeMixin +and LVMVDOPoolMixin. When working with an LVMLogicalVolumeDevice +instance its dependencies are correctly set based on type of the +logical volume. +--- + blivet/devicefactory.py | 7 +-- + blivet/devices/lvm.py | 31 ++++++++++ + tests/action_test.py | 7 +++ + tests/devicefactory_test.py | 32 ++++++++++ + tests/devices_test/lvm_test.py | 106 +++++++++++++++++++++++++++++++++ + 5 files changed, 179 insertions(+), 4 deletions(-) + +diff --git a/blivet/devicefactory.py b/blivet/devicefactory.py +index 5e47eb9a..b29a107a 100644 +--- a/blivet/devicefactory.py ++++ b/blivet/devicefactory.py +@@ -27,7 +27,7 @@ + from .devices import BTRFSDevice, DiskDevice + from .devices import LUKSDevice, LVMLogicalVolumeDevice + from .devices import PartitionDevice, MDRaidArrayDevice +-from .devices.lvm import LVMVDOPoolMixin, DEFAULT_THPOOL_RESERVE ++from .devices.lvm import LVMVDOPoolMixin, LVMVDOLogicalVolumeMixin, DEFAULT_THPOOL_RESERVE + from .formats import get_format + from .devicelibs import btrfs + from .devicelibs import mdraid +@@ -70,9 +70,6 @@ def is_supported_device_type(device_type): + :returns: True if this device type is supported + :rtype: bool + """ +- if device_type == DEVICE_TYPE_LVM_VDO: +- return not any(e for e in LVMVDOPoolMixin._external_dependencies if not e.available) +- + devices = [] + if device_type == DEVICE_TYPE_BTRFS: + devices = [BTRFSDevice] +@@ -84,6 +81,8 @@ def is_supported_device_type(device_type): + devices = [PartitionDevice] + elif device_type == DEVICE_TYPE_MD: + devices = [MDRaidArrayDevice] ++ elif device_type == DEVICE_TYPE_LVM_VDO: ++ devices = [LVMLogicalVolumeDevice, LVMVDOPoolMixin, LVMVDOLogicalVolumeMixin] + + return not any(c.unavailable_type_dependencies() for c in devices) + +diff --git a/blivet/devices/lvm.py b/blivet/devices/lvm.py +index 785fa2d2..ac900bf3 100644 +--- a/blivet/devices/lvm.py ++++ b/blivet/devices/lvm.py +@@ -1804,6 +1804,17 @@ def __init__(self, compression=True, deduplication=True, index_memory=0, write_p + if not self.exists and self.size < self.min_size: + raise ValueError("Requested size %s is smaller than minimum %s" % (self.size, self.min_size)) + ++ # these two methods are defined in Device but LVMVDOPoolMixin doesn't inherit from ++ # it and we can't have this code in LVMLogicalVolumeDevice because we need to be able ++ # to get dependencies without creating instance of the class ++ @classmethod ++ def type_external_dependencies(cls): ++ return set(d for d in cls._external_dependencies) | LVMLogicalVolumeDevice.type_external_dependencies() ++ ++ @classmethod ++ def unavailable_type_dependencies(cls): ++ return set(e for e in cls.type_external_dependencies() if not e.available) ++ + @property + def is_vdo_pool(self): + return self.seg_type == "vdo-pool" +@@ -1926,6 +1937,17 @@ def _check_parents(self): + if not container or not isinstance(container, LVMLogicalVolumeDevice) or not container.is_vdo_pool: + raise ValueError("constructor requires a vdo-pool LV") + ++ # these two methods are defined in Device but LVMVDOLogicalVolumeMixin doesn't inherit ++ # from it and we can't have this code in LVMLogicalVolumeDevice because we need to be ++ # able to get dependencies without creating instance of the class ++ @classmethod ++ def type_external_dependencies(cls): ++ return set(d for d in cls._external_dependencies) | LVMLogicalVolumeDevice.type_external_dependencies() ++ ++ @classmethod ++ def unavailable_type_dependencies(cls): ++ return set(e for e in cls.type_external_dependencies() if not e.available) ++ + @property + def vg_space_used(self): + return Size(0) # the pool's size is already accounted for in the vg +@@ -2217,6 +2239,15 @@ def _convert_from_lvs(self): + """Convert the LVs to create this LV from into its internal LVs""" + raise ValueError("Cannot create a new LV of type '%s' from other LVs" % self.seg_type) + ++ @property ++ def external_dependencies(self): ++ deps = super(LVMLogicalVolumeBase, self).external_dependencies ++ if self.is_vdo_pool: ++ deps.update(LVMVDOPoolMixin.type_external_dependencies()) ++ if self.is_vdo_lv: ++ deps.update(LVMVDOLogicalVolumeMixin.type_external_dependencies()) ++ return deps ++ + @property + @type_specific + def vg(self): +diff --git a/tests/action_test.py b/tests/action_test.py +index 77176f46..38a2e872 100644 +--- a/tests/action_test.py ++++ b/tests/action_test.py +@@ -18,6 +18,8 @@ + from blivet.devices import MDRaidArrayDevice + from blivet.devices import LVMVolumeGroupDevice + from blivet.devices import LVMLogicalVolumeDevice ++from blivet.devices.lvm import LVMVDOPoolMixin ++from blivet.devices.lvm import LVMVDOLogicalVolumeMixin + + # format classes + from blivet.formats.fs import Ext2FS +@@ -1252,6 +1254,11 @@ def test_lv_from_lvs_actions(self): + self.assertEqual(set(self.storage.lvs), {pool}) + self.assertEqual(set(pool._internal_lvs), {lv1, lv2}) + ++ ++@unittest.skipUnless(not any(x.unavailable_type_dependencies() for x in DEVICE_CLASSES + [LVMVDOPoolMixin, LVMVDOLogicalVolumeMixin]), "some unsupported device classes required for this test") ++@unittest.skipUnless(all(x().utils_available for x in FORMAT_CLASSES), "some unsupported format classes required for this test") ++class DeviceActionLVMVDOTestCase(DeviceActionTestCase): ++ + def test_lvm_vdo_destroy(self): + self.destroy_all_devices() + sdc = self.storage.devicetree.get_device_by_name("sdc") +diff --git a/tests/devicefactory_test.py b/tests/devicefactory_test.py +index a1334cda..e4210ead 100644 +--- a/tests/devicefactory_test.py ++++ b/tests/devicefactory_test.py +@@ -592,6 +592,8 @@ def _validate_factory_device(self, *args, **kwargs): + @patch("blivet.static_data.lvm_info.blockdev.lvm.lvs", return_value=[]) + @patch("blivet.devices.lvm.LVMVolumeGroupDevice.type_external_dependencies", return_value=set()) + @patch("blivet.devices.lvm.LVMLogicalVolumeBase.type_external_dependencies", return_value=set()) ++ @patch("blivet.devices.lvm.LVMVDOPoolMixin.type_external_dependencies", return_value=set()) ++ @patch("blivet.devices.lvm.LVMVDOLogicalVolumeMixin.type_external_dependencies", return_value=set()) + def test_device_factory(self, *args): # pylint: disable=unused-argument,arguments-differ + device_type = self.device_type + kwargs = {"disks": self.b.disks, +@@ -650,6 +652,36 @@ def test_device_factory(self, *args): # pylint: disable=unused-argument,argumen + # change fstype + kwargs["fstype"] = "xfs" + ++ @patch("blivet.formats.lvmpv.LVMPhysicalVolume.formattable", return_value=True) ++ @patch("blivet.formats.lvmpv.LVMPhysicalVolume.destroyable", return_value=True) ++ @patch("blivet.static_data.lvm_info.blockdev.lvm.lvs", return_value=[]) ++ @patch("blivet.devices.lvm.LVMVolumeGroupDevice.type_external_dependencies", return_value=set()) ++ @patch("blivet.devices.lvm.LVMLogicalVolumeBase.type_external_dependencies", return_value=set()) ++ @patch("blivet.devices.lvm.LVMVDOPoolMixin.type_external_dependencies", return_value=set()) ++ @patch("blivet.devices.lvm.LVMVDOLogicalVolumeMixin.type_external_dependencies", return_value=set()) ++ def test_factory_defaults(self, *args): # pylint: disable=unused-argument ++ super(LVMVDOFactoryTestCase, self).test_factory_defaults() ++ ++ @patch("blivet.formats.lvmpv.LVMPhysicalVolume.formattable", return_value=True) ++ @patch("blivet.formats.lvmpv.LVMPhysicalVolume.destroyable", return_value=True) ++ @patch("blivet.static_data.lvm_info.blockdev.lvm.lvs", return_value=[]) ++ @patch("blivet.devices.lvm.LVMVolumeGroupDevice.type_external_dependencies", return_value=set()) ++ @patch("blivet.devices.lvm.LVMLogicalVolumeBase.type_external_dependencies", return_value=set()) ++ @patch("blivet.devices.lvm.LVMVDOPoolMixin.type_external_dependencies", return_value=set()) ++ @patch("blivet.devices.lvm.LVMVDOLogicalVolumeMixin.type_external_dependencies", return_value=set()) ++ def test_get_free_disk_space(self, *args): ++ super(LVMVDOFactoryTestCase, self).test_get_free_disk_space() ++ ++ @patch("blivet.formats.lvmpv.LVMPhysicalVolume.formattable", return_value=True) ++ @patch("blivet.formats.lvmpv.LVMPhysicalVolume.destroyable", return_value=True) ++ @patch("blivet.static_data.lvm_info.blockdev.lvm.lvs", return_value=[]) ++ @patch("blivet.devices.lvm.LVMVolumeGroupDevice.type_external_dependencies", return_value=set()) ++ @patch("blivet.devices.lvm.LVMLogicalVolumeBase.type_external_dependencies", return_value=set()) ++ @patch("blivet.devices.lvm.LVMVDOPoolMixin.type_external_dependencies", return_value=set()) ++ @patch("blivet.devices.lvm.LVMVDOLogicalVolumeMixin.type_external_dependencies", return_value=set()) ++ def test_normalize_size(self, *args): # pylint: disable=unused-argument ++ super(LVMVDOFactoryTestCase, self).test_normalize_size() ++ + + class MDFactoryTestCase(DeviceFactoryTestCase): + device_type = devicefactory.DEVICE_TYPE_MD +diff --git a/tests/devices_test/lvm_test.py b/tests/devices_test/lvm_test.py +index 78b140ba..d938144d 100644 +--- a/tests/devices_test/lvm_test.py ++++ b/tests/devices_test/lvm_test.py +@@ -10,10 +10,13 @@ + from blivet.devices import StorageDevice + from blivet.devices import LVMLogicalVolumeDevice + from blivet.devices import LVMVolumeGroupDevice ++from blivet.devices.lvm import LVMVDOPoolMixin ++from blivet.devices.lvm import LVMVDOLogicalVolumeMixin + from blivet.devices.lvm import LVMCacheRequest + from blivet.devices.lvm import LVPVSpec, LVMInternalLVtype + from blivet.size import Size + from blivet.devicelibs import raid ++from blivet import devicefactory + from blivet import errors + + DEVICE_CLASSES = [ +@@ -690,6 +693,10 @@ def test_new_lv_from_non_existing_lvs(self): + pool.create() + self.assertTrue(lvm.thpool_convert.called) + ++ ++@unittest.skipUnless(not any(x.unavailable_type_dependencies() for x in DEVICE_CLASSES + [LVMVDOPoolMixin, LVMVDOLogicalVolumeMixin]), "some unsupported device classes required for this test") ++class BlivetNewLVMVDODeviceTest(unittest.TestCase): ++ + def test_new_vdo_pool(self): + b = blivet.Blivet() + pv = StorageDevice("pv1", fmt=blivet.formats.get_format("lvmpv"), +@@ -726,3 +733,102 @@ def test_new_vdo_pool(self): + self.assertEqual(vdopool.children[0], vdolv) + self.assertEqual(vdolv.parents[0], vdopool) + self.assertListEqual(vg.lvs, [vdopool, vdolv]) ++ ++ ++@unittest.skipUnless(not any(x.unavailable_type_dependencies() for x in DEVICE_CLASSES), "some unsupported device classes required for this test") ++class BlivetLVMVDODependenciesTest(unittest.TestCase): ++ def test_vdo_dependencies(self): ++ blivet.tasks.availability.CACHE_AVAILABILITY = False ++ ++ b = blivet.Blivet() ++ pv = StorageDevice("pv1", fmt=blivet.formats.get_format("lvmpv"), ++ size=Size("10 GiB"), exists=True) ++ vg = LVMVolumeGroupDevice("testvg", parents=[pv], exists=True) ++ ++ for dev in (pv, vg): ++ b.devicetree._add_device(dev) ++ ++ # check that all the above devices are in the expected places ++ self.assertEqual(set(b.devices), {pv, vg}) ++ self.assertEqual(set(b.vgs), {vg}) ++ ++ self.assertEqual(vg.size, Size("10236 MiB")) ++ ++ vdopool = b.new_lv(name="vdopool", vdo_pool=True, ++ parents=[vg], compression=True, ++ deduplication=True, ++ size=blivet.size.Size("8 GiB")) ++ ++ vdolv = b.new_lv(name="vdolv", vdo_lv=True, ++ parents=[vdopool], ++ size=blivet.size.Size("40 GiB")) ++ ++ # Dependencies check: for VDO types these should be combination of "normal" ++ # LVM dependencies (LVM libblockdev plugin + kpartx and DM plugin from DMDevice) ++ # and LVM VDO technology from the LVM plugin ++ lvm_vdo_dependencies = ["kpartx", ++ "libblockdev dm plugin", ++ "libblockdev lvm plugin", ++ "libblockdev lvm plugin (vdo technology)"] ++ pool_deps = [d.name for d in vdopool.external_dependencies] ++ six.assertCountEqual(self, pool_deps, lvm_vdo_dependencies) ++ ++ vdolv_deps = [d.name for d in vdolv.external_dependencies] ++ six.assertCountEqual(self, vdolv_deps, lvm_vdo_dependencies) ++ ++ # same dependencies should be returned when checking with class not instance ++ pool_type_deps = [d.name for d in LVMVDOPoolMixin.type_external_dependencies()] ++ six.assertCountEqual(self, pool_type_deps, lvm_vdo_dependencies) ++ ++ vdolv_type_deps = [d.name for d in LVMVDOLogicalVolumeMixin.type_external_dependencies()] ++ six.assertCountEqual(self, vdolv_type_deps, lvm_vdo_dependencies) ++ ++ # just to be sure LVM VDO specific code didn't break "normal" LVs ++ normallv = b.new_lv(name="lvol0", ++ parents=[vg], ++ size=blivet.size.Size("1 GiB")) ++ ++ normalvl_deps = [d.name for d in normallv.external_dependencies] ++ six.assertCountEqual(self, normalvl_deps, ["kpartx", ++ "libblockdev dm plugin", ++ "libblockdev lvm plugin"]) ++ ++ with patch("blivet.devices.lvm.LVMVDOPoolMixin._external_dependencies", ++ new=[blivet.tasks.availability.unavailable_resource("VDO unavailability test")]): ++ with patch("blivet.devices.lvm.LVMVDOLogicalVolumeMixin._external_dependencies", ++ new=[blivet.tasks.availability.unavailable_resource("VDO unavailability test")]): ++ ++ pool_deps = [d.name for d in vdopool.unavailable_dependencies] ++ self.assertEqual(pool_deps, ["VDO unavailability test"]) ++ ++ vdolv_deps = [d.name for d in vdolv.unavailable_dependencies] ++ self.assertEqual(vdolv_deps, ["VDO unavailability test"]) ++ ++ # same dependencies should be returned when checking with class not instance ++ pool_type_deps = [d.name for d in LVMVDOPoolMixin.unavailable_type_dependencies()] ++ six.assertCountEqual(self, pool_type_deps, ["VDO unavailability test"]) ++ ++ vdolv_type_deps = [d.name for d in LVMVDOLogicalVolumeMixin.unavailable_type_dependencies()] ++ six.assertCountEqual(self, vdolv_type_deps, ["VDO unavailability test"]) ++ ++ normallv_deps = [d.name for d in normallv.unavailable_dependencies] ++ self.assertEqual(normallv_deps, []) ++ ++ with self.assertRaises(errors.DependencyError): ++ b.create_device(vdopool) ++ b.create_device(vdolv) ++ ++ b.create_device(normallv) ++ ++ def test_vdo_dependencies_devicefactory(self): ++ with patch("blivet.devices.lvm.LVMVDOPoolMixin._external_dependencies", ++ new=[blivet.tasks.availability.unavailable_resource("VDO unavailability test")]): ++ with patch("blivet.devices.lvm.LVMVDOLogicalVolumeMixin._external_dependencies", ++ new=[blivet.tasks.availability.unavailable_resource("VDO unavailability test")]): ++ ++ # shouldn't affect "normal" LVM ++ lvm_supported = devicefactory.is_supported_device_type(devicefactory.DEVICE_TYPE_LVM) ++ self.assertTrue(lvm_supported) ++ ++ vdo_supported = devicefactory.is_supported_device_type(devicefactory.DEVICE_TYPE_LVM_VDO) ++ self.assertFalse(vdo_supported) + +From c7fb125ec552ee5070f8180f92fe5545709192ff Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Fri, 11 Dec 2020 15:02:05 +0100 +Subject: [PATCH 17/17] Bump required libblockdev version to 2.24 + +LVM VDO support was added in 2.24. +--- + python-blivet.spec | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/python-blivet.spec b/python-blivet.spec +index ffd4210e..58cad0b2 100644 +--- a/python-blivet.spec ++++ b/python-blivet.spec +@@ -36,7 +36,7 @@ Source1: http://github.com/storaged-project/blivet/archive/%{realname}-%{realver + %global partedver 1.8.1 + %global pypartedver 3.10.4 + %global utillinuxver 2.15.1 +-%global libblockdevver 2.19 ++%global libblockdevver 2.24 + %global libbytesizever 0.3 + %global pyudevver 0.18 + diff --git a/SPECS/python-blivet.spec b/SPECS/python-blivet.spec new file mode 100644 index 0000000..a85e8d6 --- /dev/null +++ b/SPECS/python-blivet.spec @@ -0,0 +1,3203 @@ +%define is_rhel 0%{?rhel} != 0 + +# python3 is not available on RHEL <=7 +%if %{is_rhel} && 0%{?rhel} <= 7 +# disable python3 by default +%bcond_with python3 +%else +%bcond_without python3 +%endif + +# python2 is not available on RHEL > 7 and not needed on Fedora > 28 +%if 0%{?rhel} > 7 || 0%{?fedora} > 28 +# disable python2 by default +%bcond_with python2 +%else +%bcond_without python2 +%endif + +Summary: A python module for system storage configuration +Name: python-blivet +Url: https://storageapis.wordpress.com/projects/blivet +Version: 3.2.2 + +#%%global prerelease .b2 +# prerelease, if defined, should be something like .a1, .b1, .b2.dev1, or .c2 +Release: 9%{?prerelease}%{?dist} +Epoch: 1 +License: LGPLv2+ +Group: System Environment/Libraries +%global realname blivet +%global realversion %{version}%{?prerelease} +Source0: http://github.com/storaged-project/blivet/archive/%{realname}-%{realversion}.tar.gz +Source1: http://github.com/storaged-project/blivet/archive/%{realname}-%{realversion}-tests.tar.gz +Patch0: 0001-force-lvm-cli.plugin +Patch1: 0002-remove-btrfs-plugin.patch +Patch2: 0003-Skip-test_mounting-for-filesystems-that-are-not-moun.patch +Patch3: 0004-Add-extra-sleep-after-pvremove-call.patch +Patch4: 0005-Round-down-to-nearest-MiB-value-when-writing-ks-parittion-info.ks +Patch5: 0006-Blivet-RHEL-8.3-localization-update.patch +Patch6: 0007-Do-not-use-FSAVAIL-and-FSUSE-options-when-running-lsblk.patch +Patch7: 0008-set-allowed-disk-labels-for-s390x-as-standard-ones-plus-dasd.patch +Patch8: 0009-Do-not-use-BlockDev-utils_have_kernel_module-to-check-for-modules.patch +Patch9: 0010-Fix-name-resolution-for-MD-devices-and-partitions-on.patch +Patch10: 0011-Fix-ignoring-disk-devices-with-parents-or-children.patch +Patch11: 0012-xfs-grow-support.patch +Patch12: 0013-Do-not-limit-swap-to-128-GiB.patch +Patch13: 0014-Use-UnusableConfigurationError-for-patially-hidden-multipath-devices.patch +Patch14: 0015-Fix-possible-UnicodeDecodeError-when-reading-model-f.patch +Patch15: 0016-Basic-LVM-VDO-support.patch +Patch16: 0017-Let-parted-fix-fixable-issues-with-partition-table.patch +Patch17: 0018-Fix-possible-UnicodeDecodeError-when-reading-sysfs-a.patch +Patch18: 0019-LVM-VDO-support.patch + +# Versions of required components (done so we make sure the buildrequires +# match the requires versions of things). +%global partedver 1.8.1 +%global pypartedver 3.10.4 +%global utillinuxver 2.15.1 +%global libblockdevver 2.19 +%global libbytesizever 0.3 +%global pyudevver 0.18 + +BuildArch: noarch + +%description +The python-blivet package is a python module for examining and modifying +storage configuration. + +%package -n %{realname}-data +Summary: Data for the %{realname} python module. + +BuildRequires: systemd + +Conflicts: python-blivet < 1:2.0.0 +Conflicts: python3-blivet < 1:2.0.0 + +%description -n %{realname}-data +The %{realname}-data package provides data files required by the %{realname} +python module. + +%if %{with python3} +%package -n python3-%{realname} +Summary: A python3 package for examining and modifying storage configuration. + +%{?python_provide:%python_provide python3-%{realname}} + +BuildRequires: gettext +BuildRequires: python3-devel +BuildRequires: python3-setuptools + +%{?__python3:Requires: %{__python3}} +Requires: python3-six +Requires: python3-pyudev >= %{pyudevver} +Requires: parted >= %{partedver} +Requires: python3-pyparted >= %{pypartedver} +Requires: libselinux-python3 +Requires: python3-blockdev >= %{libblockdevver} +Recommends: libblockdev-btrfs >= %{libblockdevver} +Recommends: libblockdev-crypto >= %{libblockdevver} +Recommends: libblockdev-dm >= %{libblockdevver} +Recommends: libblockdev-fs >= %{libblockdevver} +Recommends: libblockdev-kbd >= %{libblockdevver} +Recommends: libblockdev-loop >= %{libblockdevver} +Recommends: libblockdev-lvm >= %{libblockdevver} +Recommends: libblockdev-mdraid >= %{libblockdevver} +Recommends: libblockdev-mpath >= %{libblockdevver} +Recommends: libblockdev-nvdimm >= %{libblockdevver} +Recommends: libblockdev-part >= %{libblockdevver} +Recommends: libblockdev-swap >= %{libblockdevver} +Recommends: libblockdev-s390 >= %{libblockdevver} +Requires: python3-bytesize >= %{libbytesizever} +Requires: util-linux >= %{utillinuxver} +Requires: lsof +Requires: python3-gobject-base +Requires: systemd-udev +Requires: %{realname}-data = %{epoch}:%{version}-%{release} + +Obsoletes: blivet-data < 1:2.0.0 + +%if %{without python2} +Obsoletes: python2-blivet < 1:2.0.2-2 +Obsoletes: python-blivet < 1:2.0.2-2 +%else +Obsoletes: python-blivet < 1:2.0.0 +%endif + +%description -n python3-%{realname} +The python3-%{realname} is a python3 package for examining and modifying storage +configuration. +%endif + +%if %{with python2} +%package -n python2-%{realname} +Summary: A python2 package for examining and modifying storage configuration. + +%{?python_provide:%python_provide python2-%{realname}} + +BuildRequires: gettext +BuildRequires: python2-devel +BuildRequires: python2-setuptools + +Requires: python2 +Requires: python2-six +Requires: python2-pyudev >= %{pyudevver} +Requires: parted >= %{partedver} +Requires: python2-pyparted >= %{pypartedver} +Requires: python2-libselinux +Requires: python2-blockdev >= %{libblockdevver} +Recommends: libblockdev-btrfs >= %{libblockdevver} +Recommends: libblockdev-crypto >= %{libblockdevver} +Recommends: libblockdev-dm >= %{libblockdevver} +Recommends: libblockdev-fs >= %{libblockdevver} +Recommends: libblockdev-kbd >= %{libblockdevver} +Recommends: libblockdev-loop >= %{libblockdevver} +Recommends: libblockdev-lvm >= %{libblockdevver} +Recommends: libblockdev-mdraid >= %{libblockdevver} +Recommends: libblockdev-mpath >= %{libblockdevver} +Recommends: libblockdev-nvdimm >= %{libblockdevver} +Recommends: libblockdev-part >= %{libblockdevver} +Recommends: libblockdev-swap >= %{libblockdevver} +Recommends: libblockdev-s390 >= %{libblockdevver} +Requires: python2-bytesize >= %{libbytesizever} +Requires: util-linux >= %{utillinuxver} +Requires: lsof +Requires: python2-hawkey +Requires: %{realname}-data = %{epoch}:%{version}-%{release} + +Requires: systemd-udev +Requires: python2-gobject-base + +Obsoletes: blivet-data < 1:2.0.0 +Obsoletes: python-blivet < 1:2.0.0 + +%description -n python2-%{realname} +The python2-%{realname} is a python2 package for examining and modifying storage +configuration. +%endif + +%prep +%autosetup -n %{realname}-%{realversion} -N +%autosetup -n %{realname}-%{realversion} -b1 -p1 + +%build +%{?with_python2:make PYTHON=%{__python2}} +%{?with_python3:make PYTHON=%{__python3}} + +%install +%{?with_python2:make PYTHON=%{__python2} DESTDIR=%{buildroot} install} +%{?with_python3:make PYTHON=%{__python3} DESTDIR=%{buildroot} install} + +%find_lang %{realname} + +%files -n %{realname}-data -f %{realname}.lang +%{_sysconfdir}/dbus-1/system.d/* +%{_datadir}/dbus-1/system-services/* +%{_libexecdir}/* +%{_unitdir}/* + +%if %{with python2} +%files -n python2-%{realname} +%license COPYING +%doc README ChangeLog examples +%{python2_sitelib}/* +%endif + +%if %{with python3} +%files -n python3-%{realname} +%license COPYING +%doc README ChangeLog examples +%{python3_sitelib}/* +%endif + +%changelog +* Tue Feb 9 2021 Vojtech Trefny - 3.2.2-9 +- LVM VDO support + Resolves: rhbz#1509337 + +* Mon Jan 11 2021 Vojtech Trefny - 3.2.2-8 +- Let parted fix fixable issues with partition table + Resolves: rhbz#1846869 +- Fix possible UnicodeDecodeError when reading sysfs attributes + Resolves: rhbz#1849326 + +* Wed Nov 18 2020 Vojtech Trefny - 3.2.2-7 +- Add support for XFS format grow + Resolves: rhbz#1862349 +- Do not limit swap to 128 GiB + Resolves: rhbz#1656485 +- Use UnusableConfigurationError for partially hidden multipath devices + Resolves: rhbz#1877052 +- Fix possible UnicodeDecodeError when reading model from sysfs + Resolves: rhbz#1849326 +- Add basic support for LVM VDO devices + Resolves: rhbz#1828745 + +* Thu Aug 20 2020 Vojtech Trefny - 3.2.2-6 +- Fix name resolution for MD devices and partitions on them + Resolves: rhbz#1862904 +- Fix ignoring disk devices with parents or children + Resolves: rhbz#1866243 + +* Thu Jul 16 2020 Vojtech Trefny - 3.2.2-5 +- set allowed disk labels for s390x as standard ones (msdos + gpt) plus dasd + Resolves: rhbz#1855200 +- Do not use BlockDev.utils_have_kernel_module to check for modules + Resolves: rhbz#1855344 + +* Thu Jul 09 2020 Vojtech Trefny - 3.2.2-4 +- Blivet RHEL 8.3 localization update + Resolves: rhbz#182056 +- Do not use FSAVAIL and FSUSE% options when running lsblk + Resolves: rhbz#1853624 + +* Tue Jun 30 2020 Vojtech Trefny - 3.2.2-3 +- Round down to nearest MiB value when writing ks parittion info + Resolves: rhbz#1850670 + +* Wed Jun 24 2020 Vojtech Trefny - 3.2.2-2 +- Add extra sleep after pvremove call + Resolves: rhbz#1640601 + +* Fri May 22 2020 Vojtech Trefny - 3.2.2-1 +- Rebase to the latest upstream release 3.2.2 + Resolves: rhbz#1714970 + +* Mon Mar 02 2020 Vojtech Trefny - 3.1.0-20 +- add `-y' to lvm.pvcreate + Resolves: rhbz#1768494 + +* Wed Jan 29 2020 Vojtech Trefny - 3.1.0-19 +- Override LVM skip-activation to allow for thorough removal + Resolves: rhbz#1766498 +- Make sure LVs are writable before wiping + Related: rhbz#1766498 +- Fix udev test names so they actually get run. + Related: rhbz#1758102 +- Add recognition of Dell FW RAID to udev.device_is_disk. + Resolves: rhbz#1758102 +- Align base sizes up if smaller than min I/O size. + Resolves: rhbz#1781106 +- Make minimal and optimal alignment getters public. + Related: rhbz#1781106 + +* Tue Nov 19 2019 Vojtech Trefny - 3.1.0-18 +- Check for PV sector size when creating new VG + Resolves: rhbz#1754446 + +* Wed Oct 02 2019 David Lehman - 3.1.0-17 +- Fix util.detect_virt function + Resolves: rhbz#1676935 + +* Mon Aug 05 2019 Vojtech Trefny - 3.1.0-16 +- Minor cleanups to reduce log noise + Related: rhbz#1579375 + +* Mon Jul 15 2019 Vojtech Trefny - 3.1.0-15 +- Do not crash if 'dm.get_member_raid_sets' fails + Resolves: rhbz#1704289 + +* Tue Jul 02 2019 Vojtech Trefny - 3.1.0-14 +- Correctly handle non-unicode iSCSI initiator names + Resolves: rhbz#1632117 + +* Tue Jun 18 2019 Vojtech Trefny - 3.1.0-13 +- Fix reading LV attributes in LVMVolumeGroupDevice.status + Resolves: rhbz#1721381 + +* Fri Jun 14 2019 Vojtech Trefny - 3.1.0-12 +- Deactivate incomplete VGs along with everything else + Resolves: rhbz#1635125 +- Automatically adjust size of growable devices for new format + Resolves: rhbz#1680013 +- Add flag for protecting cdrom devices during populate + Resolves: rhbz#1719648 +- Clean up some errors evident in installer logs + Resolves: rhbz#1579375 +- Use dasd disklabel for vm disks backed by dasds + Resolves: rhbz#1676935 + +* Thu May 16 2019 Vojtech Trefny - 3.1.0-11 +- Various test fixes for RHEL 8 + Related: rhbz#1682561 +- Add upstream test suite to the SRPM + Related: rhbz#1682561 + +* Wed Apr 03 2019 David Lehman - 3.1.0-10 +- Ensure correct type of mpath cache member list. + Related: rhbz#1672971 + +* Mon Feb 25 2019 David Lehman - 3.1.0-9 +- Update to latest translations. + Resolves: rhbz#1608337 +- Require libfc instead of fcoe for offloaded FCoE. + Resolves: rhbz#1575953 +- Use udev to determine if disk is a multipath member. + Related: rhbz#1575953 +- Don't crash if blockdev mpath plugin isn't available. + Resolves: rhbz#1672971 + +* Tue Jan 15 2019 Vojtech Trefny - 3.1.0-8 +- Copy the iSCSI initiator name file to the installed system (vtrefny) + Resolves: rhbz#1664587 + +* Mon Dec 17 2018 Vojtech Trefny - 3.1.0-7 +- Wipe all stale metadata after creating md array (dlehman) + Resolves: rhbz#1639682 + +* Tue Oct 16 2018 David Lehman - 3.1.0-6 +- Fix options for ISCSI functions (vtrefny) + Resolves: rhbz#1635569 + +* Thu Sep 27 2018 Vojtech Trefny - 3.1.0-5 +- arm: add support for EFI on ARMv7 (probinson) + Related: rhbz#1623882 +- Aarch64 platforms: Fix gpt defaults for 64 bit arm platforms (probinson) + Resolves: rhbz#1623882 +- arch: arm: drop get_arm_machine function (probinson) + Related: rhbz#1623882 +- arch: arm: drop omap specifics for partitioning (probinson) + Related: rhbz#1623882 + +* Thu Sep 20 2018 Tomas Orsava - 3.1.0-4 +- Require the Python interpreter directly instead of using the package name +- Related: rhbz#1619153 + +* Wed Sep 19 2018 Vojtech Trefny - 3.1.0-3 +- Check device dependencies only for device actions + Related: rhbz#1605213 +- Allow removing btrfs volumes without btrfs support + Resolves: rhbz#1605213 + +* Tue Aug 21 2018 Vojtech Trefny - 3.1.0-2 +- Create a separate availability check for dmraid support + Resolves: rhbz#1617958 + +* Fri Aug 10 2018 David Lehman - 3.1.0-1 +- Allow configuring default LUKS2 PBKDF arguments using luks_data (vtrefny) + Related: rhbz#1561352 +- Fix the populate_kickstart method in LUKS (vtrefny) + Related: rhbz#1561352 +- Allow specifying extra arguments for PBKDF when creating LUKS2 (vtrefny) + Related: rhbz#1561352 +- Add support for LUKS2 to DeviceFactory (vtrefny) + Resolves: rhbz#1561352 +- DeviceFactory: use min_luks_entropy from kwargs (vtrefny) + Related: rhbz#1561352 +- Fix passing 'min_luks_entropy' when creating LUKS format (vtrefny) + Related: rhbz#1561352 +- Use passphrase/key file when resizing LUKS2 format (vtrefny) + Related: rhbz#1561352 +- Require libblockdev 2.17 (vtrefny) + Related: rhbz#1561352 +- Add support for LUKS2 format (vtrefny) + Related: rhbz#1561352 +- Add initial support for DM Integrity "format" (vtrefny) + Related: rhbz#1561352 +- Do not try to add LUKSDevice in LUKSFormatPopulator (vtrefny) + Related: rhbz#1561352 +- Add support for dm-integrity devices (vtrefny) + Related: rhbz#1561352 +- Fixed various issues preventing successful build (japokorn) + Related: rhbz#1561352 + +* Mon Jul 30 2018 David Lehman - 3.1.0-0.1.b2 +- Do not ignore "Image out-of-sync" internal LVs (vtrefny) +- Fixed error message when slave is missing (japokorn) +- Ensure WWNs are set for multipath and dmraid. (dlehman) +- Use ID_WWN_WITH_EXTENSION for WWNs. (dlehman) +- Ignore pylint error "bad-option-value" for new pylint errors (vtrefny) +- Fix errors found by new pylint 2.0.0 (vtrefny) +- Fix caching logic in ExternalResource. (dlehman) +- Use DiskFile to allow testing missing dependencies as non-root. (dlehman) +- Restore availability caching after disabling for tests. (dlehman) +- Preserve original blockdev plugin list in test cleanup. (dlehman) +- Fix positional/key-word arguments in util.Path (vtrefny) +- fix doc for is_s390() (dan) +- The key size of LUKS should be 0 by default (vponcova) +- Do not use rpm to check for Zanata client (vtrefny) +- Fixed create_device fail behavior (japokorn) +- Fixed KS forcing zerombr onto RO disk (japokorn) +- Fix BIOS device number regex in edd module. (#1552236) (dlehman) +- Shrink devices before growing others with common ancestors. (#1539422) (dlehman) +- Do not copy ksdata. (rvykydal) +- Find and remove stale LVM metadata immediately after creating md array. (dlehman) +- Adapt mock imports for compatibility w/ python2 & python3. (dlehman) +- Use py2-compatible syntax to get system architecture. (dlehman) + +* Mon Jul 16 2018 Vojtech Trefny - 3.1.0-0.3.b1 +- Remove btrfs from requested libblockdev plugins (vtrefny) + +* Wed Jul 11 2018 Vojtech Trefny - 3.1.0-0.2.b1 +- Force command line based libblockdev LVM plugin (vtrefny) + +* Wed May 02 2018 David Lehman - 3.1.0-0.1.b1 +- Add 'nvdimm' tag for NVDIMM namespaces (vtrefny) +- Add test for NVDIMMNamespaceDevicePopulator (vtrefny) +- Add populator helper for NVDIMM namespaces (vtrefny) +- Add 'NVDIMMNamespaceDevice' device representing NVDIMM namespaces (vtrefny) +- Add a function for identifying NVDIMM namespaces (vtrefny) +- Add a singleton for NVDIMM namespaces management (vtrefny) +- Add NVDIMM plugin to list of requested plugins (vtrefny) + +* Fri Apr 20 2018 David Lehman - 3.0.1-1 +- Weak dependencies for libblockdev plugins (japokorn) +- Translate log levels from libblockdev to python log levels (vtrefny) +- Try to wait after stopping an MD array (vtrefny) +- Replace deprecated iscsi_firmware dracut option (rvykydal) +- Fix how we check return value for call_sync in safe_dbus (vtrefny) +- Conditionalize the Python 2 subpackage and don't build it on EL > 7 and + Fedora > 28 (miro) +- Fix python3 conditional in rpm spec file. (dlehman) +- Fix upstream URL in spec (vtrefny) +- Allow device specification by node to udev.get_device. (#1524700) (dlehman) +- Do not try to update potfile during make all (vtrefny) +- Use '-p1' when applying patches with autosetup (vtrefny) +- Remove dependency on pocketlint (vtrefny) +- Dasd is a valid label type on s390x (#1538550) (vponcova) +- fcoe: remove /etc/fcoe dir if it exists before copying configuration + (#1542846) (rvykydal) +- Avoid UnitTest.subTest due to python2 incompatibility. (dlehman) +- Adapt action test mock imports for compatibility w/ python2 & python3. + (dlehman) +- Use explicit super() syntax in config actions for py2 compat. (dlehman) +- Use libblockdev runtime dependency checks (#1501249) (vtrefny) +- Fix minor typos (yurchor) + +* Mon Apr 02 2018 David Lehman - 1:3.0.0-0.6.1.b1 +- Use bcond for with python3, allow it on RHEL > 7 (mhroncok) +- Conditionalize the Python 2 subpackage and don't build it on EL > 7 and Fedora > 28 (mhroncok) + +* Tue Mar 20 2018 David Lehman - 1:3.0.0-0.6.b1 +- Don't use a 'wwn' kwarg for MDBiosRaidArrayDevice (#1557957) (awilliam) + +* Sat Mar 17 2018 Iryna Shcherbina - 1:3.0.0-0.5.b1 +- Update Python 2 dependency declarations to new packaging standards + (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) + +* Mon Mar 12 2018 David Lehman - 1:3.0.0-0.4.b1 +- Allow device specification by node to udev.get_device. (#1524700) + +* Tue Mar 06 2018 Vojtech Trefny - 1:3.0.0-0.3.b1 +- Dasd is a valid label type on s390x (#1538550) + +* Fri Feb 09 2018 Fedora Release Engineering - 1:3.0.0-0.2.b1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Nov 08 2017 David Lehman - 3.0.0-0.1.b1 +- Add some reasonable default value for LANG variable in size_test (vtrefny) +- Remove ksdata from Blivet. (dlehman) +- Fix AttributeError in fsminsize (#1502587) (vtrefny) +- Remove Blivet.write_dasd_conf and now-unused Blivet.write. (dlehman) +- Move blivet.partspec into pyanaconda. (dlehman) +- Make uboot partition weight match analogs on other platforms. (dlehman) +- Move some cmdline option checking into Flags. (dlehman) +- Move platform module into pyanaconda. (dlehman) +- Add and use new platform detection functions in arch. (dlehman) +- Move disklabel selection logic into DiskLabel. (dlehman) +- Move new partition weight calculation into PartitionDevice. (dlehman) +- Move osinstall and autopart into pyanaconda. (dlehman) +- Move default thin pool space reservation into devices.lvm. (dlehman) +- DM device subsystem is now obtained by libblockdev (japokorn) +- Document DBus interface. (dlehman) +- Mark the DBus interface as unstable. (dlehman) +- Do not try to use protected disks for autopart (vtrefny) +- Use InstallerStorage in setupDiskImagesNonZeroSizeTestCase (vtrefny) +- Clearpart test tag fixes (japokorn) +- Added support for device tags (japokorn) +- Use Ansible playbook to install test dependencies (vtrefny) +- Use addCleanup for VM tests too (vtrefny) +- Skip tests when SELinux is disabled (japokorn) +- Revert "Use libmount for MountsCache" (vtrefny) +- Only run log_method_call when flags.debug is set. (dlehman) +- Adjust Makefile and spec file for Python 2 compatibility (vtrefny) +- Adapt to anaconda_log rename (mkolman) +- Followup for custom six move for mock. (dlehman) +- Silence pylint with regard to custom six move of mock. (dlehman) +- Allow overriding PYTHONPATH when running unit tests. (dlehman) +- Supply some missing patches during device name tests. (dlehman) +- Allow time for event handling in unit tests. (dlehman) +- python2: Don't try to call unbound method w/ wrong class type. (dlehman) +- python2: threading compatibility. (dlehman) +- python2: compatibility for wraps when used on methods. (dlehman) +- python2: adapt to absence of inspect.signature. (dlehman) +- python2: python2 has no unittest.assertLogs. (dlehman) +- python2: Handle unittest.assertRaisesRegex rename. (dlehman) +- python2: Add a custom six move for mock. (dlehman) +- python2: EddEntry support for len() and indexing. (dlehman) +- python2: Don't use 'default' kwarg to 'min' (dlehman) +- python2: Use six.wraps instead of functools.wraps. (dlehman) +- python2: Use six.raise_from for chained exceptions. (dlehman) +- python2: Use six.next for iterator advancement. (dlehman) +- python2: Explicit args to super function. (dlehman) +- python2: Explicitly declare new-style classes. (dlehman) +- python2: Use six.add_metaclass instead of metaclass kwarg. (dlehman) +- Catch AttributeError if pyanaconda is missing in populator_test. (dlehman) +- Use relative imports in blivet.dbus.blivet. (dlehman) +- pylint: disable pylint warning for InstallerStorage.get_free_space (vtrefny) +- pylint: ignore some pylint warnings in tests (vtrefny) +- Use "flags.keep_empty_ext_partitions" instead of "installer_mode" (vtrefny) +- Add a WWN attr to all disk device classes. (dlehman) +- Fix flag access in selinux test. (dlehman) +- Collect HW RAID info before populating devicetree. (dlehman) +- Add HW RAID properties to DiskDevice. (dlehman) +- Add a devicelibs module for disks. (dlehman) +- Add 'jbod' as an alias for 'linear' RAID level. (dlehman) +- Add some tests for DependencyGuard (dlehman) +- Introduce the discard_new flag and use it (vpodzime) +- Use the 'C.UTF-8' locale instead of '' (vpodzime) +- Add anaconda-core, libvirt and paramiko to TEST_DEPENDENCIES (vpodzime) +- Get rid of the merge-pr script (vpodzime) +- Adjust vmtest to new DeviceFactory constructor API (vtrefny) +- Obtain factory defaults from passed-in device, if there is one. (dlehman) +- Use **kwargs for device factory ctor. (dlehman) +- Use a property to adjust factory size based on encrypted bool. (dlehman) +- Functional testing: Add support for libvirt authentication (vtrefny) +- Fixed merge error (japokorn) +- Enable LVMOnMDTestCase (vtrefny) +- LVMThinSnapShotTestCase: Fix creating of the thin snapshot (vtrefny) +- Create a better test summary when running tests in a VM (vtrefny) +- Add a script to run tests in a virtual machine (vtrefny) +- Move BlivetResetTestCases from ImageBackedTestCase to VMBackedTestCase + (vtrefny) +- Add a test case for tests running in a virtual machine (vtrefny) +- Do not try to create format for snapshots in create_device (vtrefny) +- Use None as mountpoint for new snapshots (vtrefny) +- Do not try to unset flags on other devices than partitions (vtrefny) +- Fix TypeError when calling blivet.reset() (vtrefny) +- Broke backwards API compatibility of LUKS handling (japokorn) +- Default to LVM in the device factory. (dlehman) +- Add callbacks for populate (vpodzime) +- Fix checks when changing fslabel using actions (vtrefny) +- Remove deprecated method udev.device_is_realdisk (vtrefny) +- Use libmount for MountsCache (vtrefny) +- Fix initialization of ignored, exclusive disks. (dlehman) +- Fix devicetree tests to use callbacks instead of record_change. (dlehman) +- Change udev.device_is_disk to match disks only (vtrefny) +- Fix udev.resolve_glob to match device path too (vtrefny) +- Add tests for configuration actions (vtrefny) +- Allow changing format label using configuration actions (vtrefny) +- Add new actions for configuring formats and devices (vtrefny) +- Quickfix of merge bugs (japokorn) +- Remove action objects before resetting via dbus. (dlehman) +- Clean up dbus object management a bit. (dlehman) +- Only overwrite current format if the new one is different. (dlehman) +- Add a Factory method to DBusBlivet. (dlehman) +- Update example dbus client to account for Format interface. (dlehman) +- Adjust zanata version for new branch. (dlehman) +- Allow custom chunk size specification for MDRaidArrayDevice (vtrefny) +- Add zanata-python-client to TEST_DEPENDENCIES (bcl) +- Allow custom chunk size specification for MDRaidArrayDevice (vtrefny) +- Add zanata-python-client to TEST_DEPENDENCIES (bcl) +- Add a Commit method to DBusBlivet. (dlehman) +- Update unit tests. (dlehman) +- Move removed devices and formats into different subtrees. (dlehman) +- Use the object manager to look up objects. (dlehman) +- Add mappings of objects by id and object path to ObjectManager. (dlehman) +- Add an id property to DBusObject. (dlehman) +- Add an Action interface to the dbus service. (dlehman) +- Make sure DBusFormat's Type property is always a string. (dlehman) +- Pass blivet objects to blivet methods. (dlehman) +- Fix root detection on btrfs in rescue mode (vtrefny) +- Use device's mount options when mounting existing systems (vtrefny) +- Add a Commit method to DBusBlivet. (dlehman) +- Update unit tests. (dlehman) +- Move removed devices and formats into different subtrees. (dlehman) +- Use the object manager to look up objects. (dlehman) +- Add mappings of objects by id and object path to ObjectManager. (dlehman) +- Add an id property to DBusObject. (dlehman) +- Add an Action interface to the dbus service. (dlehman) +- Make sure DBusFormat's Type property is always a string. (dlehman) +- Pass blivet objects to blivet methods. (dlehman) +- Move some more installer-specific methods and values into blivet.osinstall. + (sbueno+anaconda) +- Mv copy_to_system from blivet.util to blivet.osinstall (sbueno+anaconda) +- Get rid of flags.installer_mode (sbueno+anaconda) +- Create flags.keep_empty_ext_partitions (sbueno+anaconda) +- Create flags.selinux_reset_fcon (sbueno+anaconda) +- Create flags.auto_dev_updates (sbueno+anaconda) +- Add a Format interface to the dbus service. (dlehman) +- Always require the rounding mode to be specified for Size (vpodzime) +- Add method DBusBlivet.InitializeDisk. (dlehman) +- Add a unit test for DBusBlivet.RemoveDevice. (dlehman) +- Maintain a mapping of object path to DBusDevice in DBusBlivet. (dlehman) +- Correctly handle failures in ResolveDevice. (dlehman) +- Add a RemoveDevice method to DBusBlivet. (dlehman) +- Convert event handling change accounting to use blivet callbacks. (dlehman) +- Add a set of callbacks for changes to blivet's view of things. (dlehman) +- Allow replacing an active format within blivet's model. (dlehman) +- Add the beginnings of an example client. (dlehman) +- Add a Device interface to the dbus service. (dlehman) +- Add an ObjectManager interface to the dbus service. (dlehman) +- Make DBusBlivet names more dbus-like. (dlehman) +- Clean up org.freedesktop.DBus.Properties code in DBusObject a bit. (dlehman) +- Move constants into a separate module. (dlehman) +- Convert some private methods to public properties. (dlehman) +- Import the whole dbus module in a couple of places. (dlehman) +- Add a minimal dbus interface. (dlehman) +- Rearrange the setup call to minimize changes on updates. (dlehman) +- Remove unused readthedocs code from setup.py. (dlehman) +- Ignore all merge commits when making rpm log. (dlehman) +- Isolate some boot device operations in blivet.partitioning. (sbueno+anaconda) +- Move bootloader stuff from Blivet to InstallerStorage. (sbueno+anaconda) +- Some small, stupid bugfixes to first installer isolation patch set. + (sbueno+anaconda) +- LVM data are now global (japokorn) +- Update api to reflect changes from isolating installer-specific code. + (sbueno+anaconda) +- Update examples and test cases for changes from isolating installer code. + (sbueno+anaconda) +- Get rid of blivet.blivet's last deps on blivet.osinstall (sbueno+anaconda) +- Get rid of blivet.blivet's dependence on blivet.osinstall.FSSet + (sbueno+anaconda) +- Mv installer-specific functions to install. Create InstallerStorage. + (sbueno+anaconda) +- Move StorageDiscoveryConfig from blivet.blivet to blivet.osinstall + (sbueno+anaconda) +- Move some StorageDiscoveryConfig attrs into Blivet. (sbueno+anaconda) +- Retrieve udev info as needed in handle_format. (dlehman) + +* Tue Sep 19 2017 Vojtech Trefny - 2.1.11-1 +- Remove build requires for pocketlint (rkuska) +- edd_test: don't run on non-x86 (pjones) +- Added support for device tags (japokorn) +- fcoe: don't use dcb for autoconnecting of bnx2x and bnx2fc (#1261703) + (rvykydal) +- fcoe: replace fipvlan with fcoemon (#1085325) (rvykydal) +- Do not use read-only mode for e2fsck (vpodzime) +- Fixed behavior when selinux is disabled (japokorn) +- Do file system check before resize (#1484575) (vpodzime) + +* Thu Aug 17 2017 Vojtech Trefny - 2.1.10-1 +- Use addCleanup for test cleanup instead of clening in tearDown (vtrefny) +- No longer skip test w/o selinux; mocked (japokorn) +- Skip tests when SELinux is disabled (japokorn) +- New test for selinux context setting when mounting (japokorn) +- Add tests for disklabel type selection and partition weight. (dlehman) +- Do not use package version to check version of installed tools (vtrefny) +- Update the upstream git URL (vpodzime) +- Stop enforcing obsolete limits on partition count. (#1460668) (dlehman) +- Do not run FS check as part of updating (re)size info (vpodzime) +- Change how we run e2fsck to check ext filesystems (vpodzime) +- Round the recommended thpool metadata size to extents (vpodzime) +- Respect thin pool's min size when setting its req_size (vpodzime) +- Don't crash during populate when lvm plugin is missing. (dlehman) +- Actually add space for LUKS metadata when encrypting a VG (vpodzime) +- Only consider old and new device sizes when not growing to max (vpodzime) +- Do not reserve space for LVM metadata twice (vpodzime) +- Do not create a temporary list for sum() (vpodzime) +- Refer to self.container as self.vg in the LVMFactory (vpodzime) +- Add a couple of extra comments and docstrings to factories (vpodzime) +- Use existing VG's PE size if available in LVMFactory (vpodzime) +- Add comments warning before a weird nomenclature in factories (vpodzime) +- Don't let device state block modification of the model. (dlehman) +- Fix error message for format create w/ missing external dep. (dlehman) +- Expand coverage of devices_test.dependencies_test a bit. (dlehman) +- Account for external dep availabilty in StorageDevice.controllable. (dlehman) +- Add the appropriate external dependency to LUKSDevice. (dlehman) + +* Thu Jun 01 2017 Vojtech Trefny - 2.1.9-1 +- Adapt to logging module name change (mkolman) +- Updated calls to avoid log spamming (japokorn) +- Add a script for generating and pushing updated documentation (vtrefny) +- pylint: ignore some false positive warnings in blivet.py and lvm.py (vtrefny) +- pylint: remove unused false positives from pocketlint config (vtrefny) +- pylint: disable false positive "not-context-manager" for threading.Lock + (vtrefny) +- pylint: ignore "arguments-differ" warnings in blivet.size.Size (vtrefny) +- pylint: fix various "arguments-differ" warnings (vtrefny) +- pylint: remove init from platform.X86 (vtrefny) +- pylint: fix various errors in tests (vtrefny) +- pylint: ignore "arguments-differ" warning for "do_tasks" method (vtrefny) +- pylint: fix false positive for "catching-non-exception" (vtrefny) +- pylint: fix argument name for Device._remove_parent/_add_parent (vtrefny) +- Always mount & unmount an XFS file system when writing new UUID (vpodzime) +- Do not remove manually created extended partitions (#1440150) (vtrefny) +- Look the disk up for a partition by name not sys_name (vpodzime) +- Disable pylint "no-member" warnings for re module constants (vtrefny) +- Allow custom chunk size specification for MDRaidArrayDevice (vtrefny) +- Add RAID chunk size to the generated kickstart file (vtrefny) +- Use structured logging for the anaconda logger (mkolman) +- Use distutils.spawn.find_executable instead of our custom code (vpodzime) +- Add a method to reset file system's UUID (vpodzime) +- Try to mount and unmount an XFS FS when writing UUID (vpodzime) +- Add a method for a file system to generate a new UUID (vpodzime) +- tests/fsuuid: Implement checking invalid UUIDs (aszlig) +- formats/swap: Support setting UUID (aszlig) +- tests: Add a series of tests for setting UUIDs (aszlig) +- tests: Add tests to check the UUID format checkers (aszlig) +- tasks: Implement setting UUID after FS creation (aszlig) +- formats/fs: Implement setting UUID during mkfs (aszlig) +- formats/fs: Add functionality for checking UUIDs (aszlig) +- tasks/fsmkfs: Add arguments for setting UUID (aszlig) +- Properly unset mountpoint of a snapshot's format (vpodzime) +- Update snapshot's format's exists flag based on its origin (vpodzime) + +* Wed Apr 19 2017 Vojtech Trefny - 2.1.8-1 +- Fix "unknown" SAS device sysfs parsing. (adamw) +- Reserve space in a VG when using LVMThinPFactory (vpodzime) +- Reserve space in a VG instead of padding thin pools on autopart (vpodzime) +- Focus the nonzero disk image size test a bit. (dlehman) +- Add missing tearDown method to luks resize test case. (dlehman) +- Fix some flag stomping in tests. (dlehman) +- Remove the useless method requiredDiskLabelType (vponcova) +- FBA DASD should use the msdos disk label type (vponcova) +- Be more careful when checking for udisks-iscsi availability (vpodzime) +- Do not allow resize of devices with no/unrecoginized formatting. (#1033778) + (dlehman) +- Clean up parent/child relations on partition ctor error. (#1383873) (dlehman) +- Use all ancestors when adding RAID disks to exclusiveDisks (vtrefny) +- Fix detection of linear MD RAID (vtrefny) +- Add 'discard' option to crypttab for newly created LUKS (vpodzime) +- Loop devices w/o backing file are now ignored (japokorn) +- Set parted boot flag when creating EFI filesystem (vtrefny) +- formats/fs: Set NTFS to be formattable (aszlig) +- Do not try to search for 'tmpfs' devices in udev database (vtrefny) +- Fix resize test in fstesting (vtrefny) +- Fix task availability test (vtrefny) +- Shallow copy another alignment property (#1408282) (awilliam) +- Fix the test dependencies (vpodzime) +- Add 'systemd-udev' to dependencies (#1392591) (vtrefny) + +* Sat Feb 11 2017 Fedora Release Engineering - 1:2.1.7-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Sat Dec 24 2016 Adam Williamson - 1:2.1.7-6 +- Actually apply the patch mentioned in -5 + +* Fri Dec 23 2016 Adam Williamson - 1:2.1.7-5 +- backport GH#530 to fix #1408282 (crash with Python 3.6) + +* Mon Dec 19 2016 Miro Hrončok - 1:2.1.7-4 +- Rebuild for Python 3.6 + +* Tue Dec 6 2016 Vratislav Podzimek - 2.1.7-3 +- Add 'systemd-udev' to dependencies (#1392591) (vtrefny) + +* Mon Nov 21 2016 Vratislav Podzimek - 2.1.7-2 +- Fix "unknown" SAS device sysfs parsing. (#1394026) (awilliam) + +* Mon Nov 21 2016 Vratislav Podzimek - 2.1.7-1 +- Require BlockDev 2.0 in the gi.require_version() call (vpodzime) +- Fix detection of 'macefi' partitions (#1393846) (awilliam) +- Add device symlinks to the PVs dictionary for MD RAID PVs (#1389130) + (vpodzime) +- iSCSI: turn `iscsi.initiator_set` into a property (awilliam) +- iSCSI: Store auth info in NodeInfo tuples (awilliam) +- Use correct type for port in GVariant tuple (awilliam) +- Use a list comprehension for _to_node_infos (awilliam) +- Device name now checked only for new devices (japokorn) +- Remove several redundant teardown calls. (dlehman) +- Cache and reuse data about multipath members (vpodzime) +- Remove some obsolete pvscan calls. (dlehman) + +* Tue Oct 04 2016 David Lehman - 2.1.6-1 +- add missing populators to populator.helpers (awilliam) + +* Mon Sep 26 2016 David Lehman - 2.1.5-1 +- Move parted changes to after format destroy. (#1378162) (dlehman) +- Add translators comment for unsupported disklabel names (vtrefny) + +* Tue Sep 20 2016 David Lehman - 2.1.4-1 +- Revert unsupported clearing of parted partition 'system'. (dlehman) +- Make sure we create a proper GVariant tuple as args (#1375712) (vpodzime) +- Do not include both size and percent in logvol ks cmd. (dlehman) +- Ignore NVDIMMs at OS installation time. (dlehman) +- Don't crash if lvm refuses to activate an lv. (dlehman) + +* Wed Sep 14 2016 David Lehman - 2.1.3-1 +- Remove some deprecated/obsolete bits from spec file. (dlehman) +- Use %%global instead of %%define for specfile macros. (dlehman) +- Fix URLs pointing to blivet resources. (dlehman) +- UUID is now cleaned when destroying format (japokorn) +- Support disk tags as disk specification for new partitions. (dlehman) +- Add tags property to Device with some defaults for disk variants. (dlehman) +- Add checks to git-multi-merge script (jkonecny) +- UUID now set correctly when reformatting partition (japokorn) +- Eliminate mountpoint symlinks when looking for mounted device (vtrefny) +- iscsi: allow installing bootloader on offload iscsi disks (qla4xxx) + (#1325134) (rvykydal) + +* Fri Aug 05 2016 David Lehman - 2.1.2-1 +- Update release notes to include previous two releases. (dlehman) +- Allign the LV's size up to set the base size for growing (vpodzime) +- Ensure biosboot shows up in kickstart (#1242666) (rmarshall) +- Add tests for the new LV from LVs actions (vpodzime) +- Make sure to add/remove internal LVs when adding/removing a compound LV + (vpodzime) +- Make sure all LVs to create a new LV from are in the DT (vpodzime) +- Make sure internal LVs are added/removed to/from DT properly (vpodzime) +- Make LVs depend on their internal LVs (vpodzime) +- Do not add the LV to devicetree in new_lv_from_lvs() (vpodzime) +- Require libblockdev version with all the functions we need (vpodzime) +- Allow for cascade creation of LVs from LVs (vpodzime) +- Fix removing PVs after removing VG (#1358067) (vtrefny) +- Pass arguments to get_member_raid_sets() in the correct order (#1225184) + (vpodzime) +- Use the new way extra information is provided for LVs (vpodzime) +- Add a method to determine if a udev device is a disk. (vtrefny) +- Fix udev.resolve_glob to match device path too (vtrefny) +- Adapt to the old-new storaged API paths (vpodzime) +- Handle an mpath name as lone exclusive disk. (#984059) (dlehman) +- Add unit tests for disk filter. (dlehman) +- Allow creation of a new LV from other LVs (vpodzime) +- Removed test for snapshot origin existance (jkonecny) +- Don't require existing origin when modeling snapshot (jkonecny) +- Update size for dmraid arrays found during populate. (#1269662) (dlehman) +- Restore the correct default partition table type for AArch64 EFI. (dmarlin) +- Fix args to cancel_disk_actions call from hide(). (dlehman) +- Fix not enough free space after creating extended partition (#1252350) + (vtrefny) +- Add some more unit tests for DeviceTree. (dlehman) +- Add tests for critical format methods. (dlehman) +- Split and include cache data and metadata sizes properly (vpodzime) +- Use internal LVs (if any) to calculate space used by existing LVs (vpodzime) +- Remove an unused calculation of VG's RAID PVs (vpodzime) +- Only include padding to nonexisting thin pools' vg_space_used (vpodzime) +- Require pyudev 0.18 or newer (vtrefny) +- Do not use deprecated pyudev methods (vtrefny) +- Show changes for each branch in git-multi-merge before pushing (vpodzime) + +* Mon Jun 06 2016 David Lehman - 2.1.1-1 +- Ignore all merge commits when making rpm log. (dlehman) +- Try harder to identify a partition's disk when necessary. (dlehman) +- Add some fallback methods for finding a partition's disk. (dlehman) +- Include devices on disklabels unsupported by parted in the devicetree. + (dlehman) +- Don't traceback if we fail to examine an md member. (dlehman) +- Disklabel commit errors can occur for disks, too. (dlehman) +- Add unit tests for device methods. (dlehman) +- ARM platforms: support both msdos and gpt partitions (pbrobinson) +- LUKS data moved to singleton (japokorn) +- Add the P_ keyword to xgettext. (dshea) +- Add xfs to default filesystem types (rmarshall) +- Fix blivet constructor fs support check (rmarshall) +- Do not put LVM stuff into syslog (vpodzime) +- Kickstart missing bootloader partitions (#1242666) (rmarshall) + +* Thu May 12 2016 David Lehman - 2.1.0-1 +- Add name of problematic device to UnusableConfigurationError (vtrefny) +- LVM data are now global (japokorn) +- Allow custom chunk size specification for MDRaidArrayDevice (vtrefny) +- Mock all blockdev's listing functions for populator tests (vpodzime) +- Add zanata-python-client to TEST_DEPENDENCIES (bcl) + +* Thu May 12 2016 David Lehman - 2.0.3-1 +- Fix protected status for extended partitions (vtrefny) +- Improve documentation of the udev.resolve_glob() function (vpodzime) +- Remove the locale list from zanata.xml (dshea) +- Do not test translated strings during make ci. (dshea) +- Squashed 'translation-canary/' changes from 5a45c19..3bc2ad6 (dshea) +- Fix root detection on btrfs in rescue mode (vtrefny) +- Use device's mount options when mounting existing systems (vtrefny) +- Ignore pylint being confused with our mixins' properties (vpodzime) +- Get back to use ROUND_HALF_UP by default (vpodzime) +- Let Python import the formats for us (vpodzime) +- Only call resolve_devspec() in _get_active_mounts() for real devices + (vpodzime) +- Call is_mpath_member() only when it makes sense (dlehman) +- Break the cycle in LVMPhysicalVolume.destroy (#1331630) (vpodzime) +- Use libbytesize's translations for Size tests (vpodzime) +- Compare sizes instead of numbers of sectors (vpodzime) +- Obsolete python-blivet and blivet-data packages. (dlehman) +- Increase the default size of /boot to 1 GB. (#377) (clumens) +- Do not add btrfs volume subvolid to subvolumes mountopts (#1306808) (vtrefny) +- A simple script for multi-merges we now do (vpodzime) +- Update CONTRIBUTING file to match current practices. (dlehman) +- Only import the 'iscsi' singleton when really needed (vpodzime) +- Correctly recognize internal RAID LVs (vpodzime) +- Do not add mdarray with no slave (#1321393) (vtrefny) +- Make sure to add hyperPAV aliases to dasd.conf. (sbueno+anaconda) +- LVM data are now global (japokorn) +- Preserve traceback when re-raising exceptions (vpodzime) + +* Mon Apr 04 2016 David Lehman - 2.0.2-1 +- Fix mistake from PEP8 conversion. (#1323012) (dlehman) +- Set both req_size and size of thin pool when growing LVM (vpodzime) +- Retrieve udev info as needed in handle_format. (#1322943) (dlehman) +- Fix requires after subpackage switcharoo. (dlehman) +- Fix package naming in spec file. (dlehman) + +* Tue Mar 29 2016 David Lehman - 2.0.1-1 +- Make sure EddMatcher.root is a string. (dlehman) +- Move per-thread change accounting to a function. (dlehman) +- Add missing conf kwarg in call to PopulatorMixin ctor. (dlehman) +- Fixes found while porting anaconda to blivet-2.0 (dlehman) +- Mock all blockdev's listing functions for populator tests (vpodzime) + +* Wed Mar 09 2016 David Lehman - 2.0.0-1 +- Bump version to 2.0.0 + +* Wed Mar 09 2016 David Lehman - 2.0.0-0.1.b1 +- Make sure we use the Size class properly (vpodzime) +- Don't store size as int in SameSizeSet (vpodzime) +- Use libbytesize's Size class as a base for our Size class (vpodzime) +- Remove the second section about LUKS resize from release notes (vpodzime) +- Streamline the TOC to only include top-level sections. (dlehman) +- Adjust section hierarchy in intro doc. (dlehman) +- Move testing docs into a file of their own. (dlehman) +- Add an api specification to the docs. (dlehman) +- Add luks resize and API stability efforts to release notes. (dlehman) +- Clean up some of the singleton usage. (dlehman) +- Drop sphinx mocking. (dlehman) +- Reset container_uuid when removing PV from a VG (vtrefny) +- Remove "destroy_format" method from docs (vtrefny) +- Fix AttributeError in pv_free_info (vtrefny) + +* Wed Feb 24 2016 David Lehman - 2.0.0-0.1.a1 +- Update zanata config for 2.0 branches. (dlehman) +- Remove cleanup of rc-release relics from ci target. (dlehman) +- Don't run rc-release as part of ci for now. (dlehman) +- Regenerate blivet.pot. (dlehman) +- Specify encoding of pvtask.py to placate gettext. (dlehman) +- Silence pylint complaint about passed callable. (dlehman) +- Tear down devices on disk images before tearing down the images. (dlehman) +- Update check for thin pool to work with new lv classes. (dlehman) +- Use Blivet.do_it instead of calling ActionList.process in factory example. (dlehman) +- Get rid of examples.common. (dlehman) +- Allow for pre-release builds. (dlehman) +- Fix load_module call in translation-canary. (dlehman) +- Remove a couple of stray python2 invocations. (dlehman) +- Do not call pvmove when removing an empty PV from VG. (vtrefny) +- Add task for finding LVMPhysicalVolume format size (vtrefny) +- Fix TypeError/AttributeError when adding thinpools and snapshots (vtrefny) +- Fix current_size name in StorageDevice.update_size (vtrefny) +- Ignore PEP8 errors E402 and E731 (vtrefny) +- Make sure all checks run on 'make check' (vtrefny) +- PEP8 fixes (vtrefny) +- Add LUKS resize to release notes (vtrefny) +- Add test for LUKS format resize (vtrefny) +- Add a task for finding the size of a LUKS device (vtrefny) +- Use DeviceFormatError and FormatResizeError in DeviceFormat (vtrefny) +- Add LUKS resize support to resize_device method (vtrefny) +- Define min_size for encrypted devices (vtrefny) +- Do not teardown partition when resizing encrypted partition (vtrefny) +- Make partitions with children resizable (vtrefny) +- Make LUKS format resizable (vtrefny) +- Make LUKSDevice resizable (vtrefny) +- Make lukstasks and dfresize task pep8 compliant (vtrefny) +- Add a LUKS resize task. (amulhern) +- Make a top level device format resizing task class. (amulhern) +- Move resize related methods from FS to DeviceFormat (vtrefny) +- Disable spurious import-error from pylint. (dlehman) +- Add blivet.events package to setup.py. (dlehman) +- Remove unused util import from prepboot.py. (dlehman) +- Remove deprecated methods and properties. (dlehman) +- Flesh out the release notes. (dlehman) +- Include python3-bugzilla when running tests (bcl) +- Cleanup wildcard import in misc_test.py (bcl) +- Add an example of event monitoring. (dlehman) +- Mask uevents when updating parted.Disk. (dlehman) +- Handle first-time open of luks devices. (dlehman) +- Add a device populator for opened/decrypted LUKS devices. (dlehman) +- Update sysfs path before updating size in StorageDevice ctor. (dlehman) +- Validate event handling callbacks. (dlehman) +- Hook up the event notify callback. (dlehman) +- Account for changes made in response to each event. (dlehman) +- Add facilities for reporting exceptions that occur in threads. (dlehman) +- Add event handlers via a DeviceTree mixin class. (dlehman) +- Add PopulatorHelper method to update device/formats. (dlehman) +- Add classes for managing external events. (dlehman) +- Add methods to wrap helper getters. (dlehman) +- Only settle udev queue in get_devices when not handling events. (dlehman) +- Allow passing a device to any PopulatorHelper constructor. (dlehman) +- Implement DiskLabelFormatPopulator._get_kwargs. (dlehman) +- Add a property indicating the type to pass to get_format. (dlehman) +- Add functions for resolving between block major and device type. (dlehman) +- Plumb modparent through DeviceTree.recursive_remove. (dlehman) +- Add a flag to preserve the root device in recursive_remove. (dlehman) +- Add container_uuid r/w property to container member format classes. (dlehman) +- Set VG format as existing as part of VG creation. (dlehman) +- Remove old hack meant to remove stale metadata. (dlehman) +- Store disklabel and partition UUIDs when available. (dlehman) +- Add a method to re-read the disklabel from disk. (dlehman) +- Use wipefs to remove disklabels. (dlehman) +- Add support for passing the new size into StorageDevice.updateSize. (dlehman) +- Add a method to cancel all actions related to a specified disk. (dlehman) +- Add a flag to ActionList to indicate in-progresss action processing. (dlehman) +- Avoid failure to generate unit test API docs. (dlehman) +- Add a console logger and a function to activate it. (dlehman) +- Make LoopDevice size consistent with other device types. (dlehman) +- Don't try to use a name bound via 'as' outside the try/except block. (dlehman) +- Remove code for notifying the kernel of changes to block devices. (dlehman) +- Add dependency checks for iSCSI operations (vpodzime) +- Add decorator for guarding methods with external dependency checks (vpodzime) +- Add a function for testing if some DBus object is available (vpodzime) +- Use namedtuple for target info and tiny class for login infos (vpodzime) +- Use the storaged's iSCSI DBus API instead of libiscsi (vpodzime) +- Use the ) +- Add a module for doing DBus operations in the safest possible way (vpodzime) +- Do not retry interruptible system calls. (dshea) +- Document the LV class unification changes in the release notes (vpodzime) +- Adapt our tests to the changes in representation of LVs (vpodzime) +- Adapt our code to changes in the representation of LVs (vpodzime) +- Rewrite the code for representing LVs (vpodzime) +- Add a test for the to-be-used ) +- Add a decorator for guarding methods and properties with a property (vpodzime) +- Transform the is_name_valid() into an instance method (vpodzime) +- Add tests for FS overhead methods (jkonecny) +- Add more class methods for better use of metadata (jkonecny) +- Remove python2 assert regex method name hacks. (dlehman) +- Fix various pylint errors introduced with python-3.5. (dlehman) +- Add a file with release notes (vpodzime) +- Blacklisted attrs should be unwrapped, not omitted. (dlehman) +- Return the device when returning early from degraded md handler. (dlehman) +- Fix application of synchronization metaclass to DeviceTree. (dlehman) +- Fix AttributeError in populator LUKS helper (vtrefny) +- Update spec file for blivet 2.0 builds (vtrefny) +- Add populator.helpers to package (vtrefny) +- Add translator comments to the byte size prefixes. (dshea) +- Integrate translation-canary with blivet. (dshea) +- Update blivet.pot during scratch-bumpver. (dshea) +- Always use setup.py sdist to generate source tarballs. (dshea) +- Squashed 'translation-canary/' content from commit 5a45c19 (dshea) +- Update class and methods in "Introduction to Blivet" (vtrefny) +- Build documentation with python3 sphinx (vtrefny) +- Fix PEP8 violations introduced in the LVM RAID commits (vpodzime) +- Make the main class hierarchies thread-safe. (dlehman) +- Add unit tests for changes related to non-linear LVs (vpodzime) +- Make sure we try to match LVM RAID levels with all their names (vpodzime) +- Don't bother user code with LVM RAID meta data (vpodzime) +- Inherit the RaidDevice mixin in the LVMLogicalVolumeDevice class (vpodzime) +- Account for a pmspare LV creation or growth when determining the cache size (vpodzime) +- Refresh the PV free space info after LV creation (vpodzime) +- Add an early check of the requested LV segment type (vpodzime) +- Add example of LVM cache creation (vpodzime) +- Make sure the slow_pvs+fast_pvs list we pass to libblockdev has no dups (vpodzime) +- Use pv.path instead of constructing it from name and "/dev/" (vpodzime) +- Account for LVM cache space in PVs (vpodzime) +- Fix the twisted logic of lv.metadata_size (vpodzime) +- Replace the 'copies' property of LVs with something more accurate (vpodzime) +- Track information about free space in existing PVs (vpodzime) +- Add guards making sure we are not being tricked with LV seg_type (vpodzime) +- Define and use a new is_raid_lv property of LVMLogicalVolumeDevice (vpodzime) +- Add an example of non-linear LV creation (vpodzime) +- Create non-linear LVs before linear LVs (vpodzime) +- Account for LVM RAID metadata (vpodzime) +- Define RAID level for LV and use it to determine required PV space (vpodzime) +- Add a definition for the striped "RAID level" (vpodzime) +- Track information about free space in a PV (vpodzime) +- Honor the LV segment type when creating it (vpodzime) +- Let LVMLogicalVolumeDevice specify PVs it should be allocated from (vpodzime) +- Define the Device.parent property with the ) +- Adjust to Device now having a list of child devices. (dlehman) +- Maintain a list of child devices in Device. (dlehman) +- Add unit tests to explicitly cover container member set changes. (dlehman) +- Remove ParentList.replace and its usage. (dlehman) +- Improve logging of failure to validate new default fstype. (dlehman) +- Remove unused populated attribute from Populator. (dlehman) +- Stop passing around the iscsi singleton. (dlehman) +- Make the iscsi singleton satisfactory to pylint. (dlehman) +- Remove the various DASD lists from Blivet and DeviceTree. (dlehman) +- Convert Populator to a mixin class. (dlehman) +- Move disk filter bits from Populator into DeviceTree. (dlehman) +- Move the LVM data cache from DeviceTree to Populator. (dlehman) +- Rename per-device Populator entry points. (dlehman) +- Make Populator.udev_device_is_disk a private method. (dlehman) +- Stop writing an mdadm.conf. (dlehman) +- Group disk-image-related methods together in source code. (dlehman) +- Move some code from _populate into separate methods. (dlehman) +- Split various parts of add_udev_device into separate methods. (dlehman) +- Remove some extraneous methods related to ignored devices. (dlehman) +- Only handle loop devices with a backing file. (dlehman) +- Add unit tests for populator helpers. (dlehman) +- Use helper getter functions to find populator helpers. (dlehman) +- Add functions to return a helper class based on device data. (dlehman) +- Move format-type-specific bits into populator helpers. (dlehman) +- Split DiskDevicePopulator up by disk type. (dlehman) +- Move device-type-specific populator bits to populator helpers. (dlehman) +- Add base classes for type-specific Populator helpers. (dlehman) +- Use the mpath_member ID_FS_TYPE set up by the multipath udev rules. (dlehman) +- Make blivet.populator into a subpackage. (dlehman) +- Convert device_get_dm_partition_disk to not be dm-specific. (dlehman) +- Use DeviceTree.__str__ when printing devices in examples. (dlehman) +- Disk image test can only be run as root. (dlehman) +- Fix few more camelCase leftovers (vpodzime) +- Fix various PEP8 violations in recent EDD commits. (dlehman) +- Add PEP8 compliance checking to 'check' target. (dlehman) +- Teardown all devices before tearing disk images down (vpodzime) +- Change doc Introduction to reflect PEP8 compliance changes (vtrefny) +- Few PEP8 compliance related fixes (vtrefny) +- Pass devices arg when calling actions.process (vtrefny) +- Do not catch CryptoError when decrypting LUKS format (#1280239) (vtrefny) +- Fix makebumpver for new conf.py (bcl) +- Bump version numbers to 2.0 before we forget. (bcl) +- Only prepend the root to get the ondisk path if there is some (vpodzime) +- Ignore unused memo_dict arguments in __deepcopy__ methods. (clumens) +- Update the getattr calls with PEP8 property/attribute names (vpodzime) +- Do not create a copy of singleton objects (vpodzime) +- Fix pylint problems with the new default namedtuple stuff. (clumens) +- Do not try to get LVM cache's size from stats for inactive LV (vpodzime) +- edd: Add mostly fixed virt data (pjones) +- edd: Add another terrible seabios dataset (pjones) +- edd: Add test data from a Strawberry Mountain machine w/ lots of SATA. (pjones) +- edd: Fix the error case in the "absurd_virt" test. (pjones) +- edd: Add absurd_virt tests back in (pjones) +- edd: Try to detect multiple ATA/SATA matches and log them. (pjones) +- edd: Split up VirtIO and VirtIO SCSI matching (pjones) +- edd: Log every glob.glob() match in our test data log. (pjones) +- edd: Eradicate fsroot entirely. (pjones) +- edd: add EddEntry.bios_device_number (pjones) +- edd: Make our own assertVerboseListEqual to get rid of truncated output. (pjones) +- edd: Add sysfslink for mbr matches (pjones) +- Make get_sysfs_attr() use our path joiners and add sysfs_readlink() (pjones) +- Make a "Path" object that handles separate fs root for us. (pjones) +- edd: Minor PEP8 fix (pjones) +- Add a much much simpler path normalizer and joiner. (pjones) +- Improve clarity of error when setting new default fstype fails. (dlehman) +- Fix missed rebase of populator test from 169dc6b6. (dlehman) +- Add a class constructor for namedtuples with default values (vpodzime) +- Use lvm.round_size_to_pe() instead of get_lv_physical_size() with the VG size (vpodzime) +- Account for LVM metadata in the LVMFactory (vpodzime) +- Put the LVM metadata size calculation into a separate property (vpodzime) +- Rename size->space in LVMFactory._get_total_space (vpodzime) +- Remove action-oriented wrapper methods from DeviceTree. (dlehman) +- Put DeviceTree methods into a sensible order. (dlehman) +- Fix remaining PEP8 violations. (dlehman) +- Fix PEP8 indentation issues. (dlehman) +- Fix the easy PEP8 violations. (dlehman) +- Make all names conform to PEP8. (dlehman) +- Update dmdev size when setting up disk images (atodorov) + +* Wed Oct 28 2015 Brian C. Lane - 1.16-1 +- Merge pull request #257 from vpodzime/master-singleton_decorator (vpodzime) +- Add pylint stuff to .gitignore (pjones) +- Minor cleanups in set_up_logging() (pjones) +- Make a logger for test data that we can automatically use later (pjones) +- edd: Fix one regexp so it matches against a real system /or/ test data. + (pjones) +- Merge pull request #253 from dashea/libblockdev-python (vpodzime) +- Make the function adding the deprecation doc text more generic (vpodzime) +- Merge pull request #242 from dwlehman/resolveDevice-regex (dlehman) +- Fix an overly inclusive regex in DeviceTree.resolveDevice. (dlehman) +- Merge pull request #244 from atodorov/master (vpodzime) +- Require the python libblockdev packages (dshea) +- Merge pull request #243 from dwlehman/flexible-alignment (dlehman) +- Merge pull request #230 from vpodzime/master-lvm_debug (vpodzime) +- Add a 'debug' flag and use it for LVM debugging (vpodzime) +- Bypass util.run_program to avoid logging deadlock. (dlehman) +- Add an edd test data harvester. (pjones) +- Do not save None as passphrase for LUKS devices (#1269646) (vtrefny) +- edd: make logging work usefully during tests (pjones) +- edd: Get rid of biosdev_to_edd_dir(), it is pointless. (pjones) +- Make distutils.filelist.findall() do the right thing with symlinks maybe. + (pjones) +- edd: Fix some minor 'make check' complaints. (pjones) +- edd: Make devicetree not use edd.edd_dict, instead use blivet's copy. + (pjones) +- edd: Remove the "absurd_virt" test cases for now. (pjones) +- Add a udev settle call after instantiating parted.Disk. (#1267858) (dlehman) +- edd: Add missing directories for absurd_virt test case. (pjones) +- produce coverage-report.log and enable coverage in CI (atodorov) +- Use minimal alignment as needed when allocating small partitions. (dlehman) +- Add support for minimal alignment of very small partitions. (dlehman) +- Add an error class for alignment errors. (dlehman) +- Deprecate createSubVolumes method (vtrefny) +- Change btrfs.do_self_mount to contextmanager (#1266673) (vtrefny) +- edd: Remove a bunch of nonfunctional EDD tests. (pjones) +- edd: Add another set of test cases for our QEMU data. (pjones) +- edd: Add another set of test data. (pjones) +- edd: Add some working tests for EDD. (pjones) +- edd: Add a real EDD dataset captured from a system. (pjones) +- edd: Make our edd matcher able to use a fake sysfs root. (pjones) +- edd: Add EDD 4 code and some logging cleanups. (pjones) +- edd: Try to make EDD support actually match what the kernel does. (pjones) +- Always build python2 and python3 versions. (bcl) +- Switch to using rd.iscsi.initiator (#1268315) (bcl) + +* Fri Oct 02 2015 Brian C. Lane - 1.15-1 +- Update Makefile to default to python3. (dlehman) +- Add test for extended partition minSize (vtrefny) +- Allow resizing of non-leaf partitions (vtrefny) +- Fix minSize for extended partitions (#1254875) (vtrefny) +- Fix calling non-existing method (#1252902) (jkonecny) +- Use the RAID classes to calculate btrfs sizes (#1264696) (dshea) +- Handle sysfs size if it is missing (#1265090) (bcl) +- Convert float to str for better precision in Size (jkonecny) +- Merge pull request #226 from dwlehman/lvactivate-lvmetad (dlehman) +- Wait for auto-activation of LVs when lvmetad is running. (#1261621) (dlehman) +- Add a function to tell us if the lvmetad socket exists. (dlehman) +- Don't teardown FSs when searching for installed systems (#1252902) (jkonecny) +- Merge pull request #218 from vpodzime/master-lvm_on_raid_improvements + (vpodzime) +- Account for bigger LVM meta data due to alignment on MD RAID (vpodzime) +- Calculate the MD RAID superblock size from the right size (vpodzime) +- Don't be naïve about liblvm (vpodzime) + +* Fri Sep 11 2015 Brian C. Lane - 1.14-1 +- Make sure devices are torn down in findExistingInstallations (#1261439) + (vpodzime) +- Merge pull request #211 from dwlehman/multipath-member-metadata (dlehman) +- Merge pull request #212 from dwlehman/recursive-teardown (dlehman) +- Mount efivarfs during os installation (#1260799) (bcl) +- Use --whatprovides when querying for if all requirements are installed. + (clumens) +- Add method for estimated size of formated device (#1224048) (jkonecny) +- Add support for mul,div,sub,add by float to Size (jkonecny) +- Merge pull request #220 from AdamWill/nodev-typo (vpodzime) +- fix typo in NoDevice: updateSize not udpateSize (awilliam) +- Duplicate VG names are problem even if their disks are ignored (#1198367) + (vpodzime) +- Merge pull request #215 from vpodzime/master-lvm_on_raid (vpodzime) +- Do not reserve extra space for metadata in a VG with RAID PVs (vpodzime) +- Merge pull request #207 from vpodzime/master-lvm_pmspare (vpodzime) +- Fix currentSize for extended partitions (#1254899) (vtrefny) +- Catch problems with chassis vendor names (#1256072) (bcl) +- Don't teardown protected devices (jkonecny) +- Don't store UUIDs or labels of multipath members. (dlehman) +- Continue with recursive teardown beyond inactive devices. (dlehman) +- Reserve space for the 'pmspare' LV in a VG (vpodzime) +- Add a property to get cached LVs in a VG (vpodzime) +- Fix VG free space check when shrinking an LV (vpodzime) +- Add a property for Requests to reserve some extra space (vpodzime) +- Use Size instances for sizes in LVM cache's stats (vpodzime) +- Implement metadata size reporting for the LVM cache (vpodzime) + +* Mon Aug 24 2015 Brian C. Lane - 1.13-1 +- Add CONTRIBUTING file to blivet. (sbueno+anaconda) +- Merge pull request #208 from vpodzime/master-luks_catch_exceptions (vpodzime) +- Fix the name of the variable specifying requested libblockdev plugins + (#1256273) (jstodola) +- Merge pull request #209 from vpodzime/master-thinp_fix (vpodzime) +- Change labelFormatOK to classmethods (vtrefny) +- Add 'build' and '.directory' to gitignore (vtrefny) +- Fix copy method (#1254135) (bcl) +- Add OSError to list of errors in updateSysfsPath (#1252949) (bcl) +- Remove the cacheRequest kwarg for thin(pool) LVs (#1254567) (vpodzime) +- Do not propagate low-level blockdev.CryptoError when setting up LUKS + (#1253925) (vpodzime) +- Merge pull request #199 from vpodzime/master-lvm_cache_tests (vpodzime) +- Merge pull request #201 from vpodzime/master-mountsCache_resolve_devspec + (vpodzime) +- Prefer code consistency over pylint's complaints in tests (vpodzime) +- Add a basic test for cached LVMLogicalVolumeDevice's properties (vpodzime) +- Add a basic test for LVMLogicalVolumeDevice's properties (vpodzime) +- Make sure LV's properties reporting size return a Size instance (vpodzime) +- Add unit tests for the LVM cache support (vpodzime) +- Use device name from udev only if it's available (#1252052) (vpodzime) +- Add test for getFreeSpace aligning (vtrefny) +- Allow aligning free regions to disk grainSize (#1244671) (vtrefny) +- Fix _unalignedMaxPartSize for logical partitions (#1250890) (vtrefny) + +* Fri Aug 07 2015 Brian C. Lane - 1.12-1 +- Remove unusable free regions from list when setting up growth. (dlehman) +- Merge pull request #190 from vpodzime/master-lvm_cache_creation (dlehman) +- Merge pull request #194 from dwlehman/mount-cache-symlinks (dlehman) +- Merge pull request #193 from dwlehman/md-fwraid-detection (dlehman) +- Add unit tests to cover md containers. (dlehman) +- Minor cleanup of blivet.formats.fs.BTRFS._preSetup. (dlehman) +- Fix isDisk and partitionable properties for md fwraid. (dlehman) +- Don't use MD_DEVNAME as device name for md partitions. (dlehman) +- Use udev to find name of md members' container. (dlehman) +- Call superclass ctor a bit later to get size attrs set up first. (dlehman) +- updateSize for md containers is a no-op. (dlehman) +- Fix UnboundLocalError in FSMinSize (#1249304) (vtrefny) +- Fix mount cache resolution of devices with symlinks. (#1247803) (dlehman) +- Add kwarg to udev.resolve_devspec to return canonical device name. (dlehman) +- Use slow as well as fast PVs for cached LV's non-cache part (vpodzime) +- Make VG determination in Blivet.newLV() less cryptic (vpodzime) +- Reserve space for LVM cache(s) when growing LVM requests (vpodzime) +- Create cached LVs before non-cached LVs (vpodzime) +- Add support for LVM cache creation to LVM device classes (vpodzime) +- Add generic class for cache creation requests (vpodzime) +- Two minor fixes in LVMLogicalVolumeDevice's constructor's docstring + (vpodzime) + +* Fri Jul 31 2015 Brian C. Lane - 1.11-1 +- Put MDRaidArrayDevice.devices back, but mark it as deprecated. (dlehman) +- Skip tearing down devices when unmounting filesystems (bcl) +- Include details when umount fails (bcl) +- Merge pull request #183 from dwlehman/tests-20150728 (dlehman) +- Merge pull request #182 from dwlehman/devicefactory-20150728 (dlehman) +- Merge pull request #184 from dwlehman/misc-20150728 (dlehman) +- Enable unit test suite in jenkins. (dlehman) +- Disable image-backed unit tests temporarily. (dlehman) +- Add some tests for DeviceFactory. (dlehman) +- Do basic child accounting when replacing a parent. (dlehman) +- Set new raid level on correct device in MDFactory. (dlehman) +- Fix container member switching when toggling member encryption. (dlehman) +- Don't adjust actual lv size based on md metadata space requirements. + (dlehman) +- Merge pull request #57 from vpodzime/master-luks_npass (vpodzime) +- Fix names of the keyword arguments for luks_add_key and luks_remove_key + (vpodzime) +- Make a better effort to clean up loop devices on failure. (dlehman) +- Correctly get current size of disk files. (dlehman) +- Don't warn about missing UUIDs for non-existent containers. (dlehman) +- Only check disks for membership in a multipath. (dlehman) +- Only update md array name if MD_DEVNAME is set. (#1212073) (dlehman) +- Weed out unresolved macros in the check-requires target. (clumens) +- Merge pull request #126 from vpodzime/master-translations_subpackage + (vpodzime) +- Put translations into a subpackage shared by Python 2 and 3 (vpodzime) +- Require pygobject3-base instead of pygobject (#1246842) (dshea) +- Add method to list primary partitions (vtrefny) +- Merge pull request #179 from dwlehman/size-followups (dlehman) +- Fix test for failure to find space for device. (dlehman) +- Make sure factory target size is within the limits of the fstype. (dlehman) +- Unset obsolete format before updating device size. (dlehman) +- Make sure size is numeric before comparing it with format minimum. (dlehman) +- Don't constrain thin lv sizes to vg free space. (dlehman) + +* Fri Jul 24 2015 Brian C. Lane - 1.10-1 +- Merge pull request #177 from AdamWill/1245446 (dlehman) +- use floor division in calculating amount to reclaim (#1245446) (awilliam) +- Remember to use the shell command when calling external stuff in Makefile. + (clumens) +- Add a new makefile target that does everything needed for jenkins. (clumens) +- Add missing gobject introspection Requires (bcl) +- Add install-requires Makefile target (bcl) +- Update md and btrfs unit tests to run with recent size changes. (dlehman) +- Set format attr after super ctor for md. (dlehman) +- Account for container layer in md fwraid array properties. (dlehman) +- Ensure format is a DeviceFormat during initialization. (dlehman) +- Set target size when setting other size attrs. (dlehman) +- Use 'members' attribute to list RAID member devices. (dlehman) +- BTRFS subvolumes shouldn't inherit from RAIDDevice. (dlehman) +- Require a non-empty member set for md disks. (dlehman) +- Mock mount cache while running action tests. (dlehman) +- Account for recent lvm snapshot format changes in tests. (dlehman) +- Bump size of non-existent devices to format minimum. (dlehman) +- Don't pass createOptions along when creating the btrfs device. (clumens) +- Merge pull request #59 from vpodzime/master-tab_tab (vpodzime) +- Implement the __dir__ method of the LazyImportObject class (vpodzime) + +* Thu Jul 16 2015 Brian C. Lane - 1.9-1 +- Apply default size for new partition earlier in constructor. (dlehman) +- Don't pass model to md fwraid constructor. (#1242610) (dlehman) + +* Fri Jul 10 2015 Brian C. Lane - 1.8-1 +- Add a bunch more gi.require_version calls (dshea) +- Merge pull request #170 from dwlehman/size-cleanups (dlehman) +- Add unit tests for device size setters and getters. (dlehman) +- Only return target size if it is set to something meaningful. (dlehman) +- Validate new formats against current device size. (dlehman) +- Device size checks do not apply to existing devices. (dlehman) +- Make sure subclasses size setters use the base setter as appropriate. + (dlehman) +- x-initrd.mount should only be set for /var (#1238603) (bcl) +- There's a python3 anaconda now, so ditch the temporary false positives. + (clumens) +- Fix a syntax error caused by my previous commit. (clumens) +- Fix a duplicate key caused by patch merging. (clumens) +- Add support for specifying arbitrary mkfs options. (clumens) +- Align free regions before choosing one. (dlehman) +- Align partition sizes earlier in the allocation process. (dlehman) +- Don't crash on cleanup with DASDs or iSCSI devices present. (#1166506) + (dlehman) +- Make check-requires errors more readable. (dshea) +- Merge pull request #166 from dwlehman/autopart-snapshot-branch (dlehman) +- Default to a string when sorting mountpoints in FSSet.umountFilesystems. + (dlehman) +- Fix order of arguments to blockdev.thsnapshotcreate. (dlehman) +- Snapshot format exists upon snapshot creation. (dlehman) +- Improve format handling for lvm snapshots. (dlehman) +- Merge pull request #160 from dwlehman/lookup-method-deprecations (dlehman) +- Deprecate some little-used devicetree lookup methods. (dlehman) +- Add a decorator to mark deprecated functions/methods. (dlehman) +- Log python warnings, including DeprecationWarning. (dlehman) +- Catch and relay more exception types from the iscsi process (dshea) +- Use the pipes as contextmanagers to ensure they are closed (dshea) +- Close the unused half of pipes after the fork (dshea) + +* Fri Jun 26 2015 Brian C. Lane - 1.7-1 +- Merge pull request #167 from mulkieran/master-format-copy-b (mulkieran) +- Merge pull request #156 from vpodzime/master-lvm_cache_actually (vpodzime) +- Add cache support to the LVMLogicalVolumeDevice class (vpodzime) +- Copy all DeviceFormat objects using deepcopy. (amulhern) +- Make use of FSTask and FSUnimplementedTask in FS* tasks. (amulhern) +- Add an abstract parent of all filesystem tasks. (amulhern) +- Merge pull request #162 from dwlehman/storage-device-format-type-consistency + (dlehman) +- Merge pull request #138 from dwlehman/partitionable-md (dlehman) +- Document the fact that StorageDevice.format is always a DeviceFormat. + (dlehman) +- Ignore some interruptible system call warnings (dshea) +- Retry interruptible calls (dshea) +- Ignore EINTR from os.close instead of retrying the call (dshea) +- Add kwargs to eintr_retry_call (dshea) +- Specify required version of GI-imported packages (vpodzime) +- Add classes for LVM cache related functionality (vpodzime) +- Add generic classes for cache and cache stats (vpodzime) +- Merge pull request #149 from vpodzime/master-lvm_cache (vpodzime) +- Implement the support for resizing internal metadata LVs of thin pools + (vpodzime) +- Use relations between LVs to determine parent LV (vpodzime) +- Make Blivet.lvs return all LVs not just traditional/thick LVs (vpodzime) +- Accept both list and ParentList when checking LVs parents (vpodzime) +- Create and use internal LVs instead of static values (vpodzime) +- Add classes for the internal LVs of various types (vpodzime) +- Merge pull request #137 from dwlehman/md-boot-metadata-branch (dlehman) +- Treat existing md arrays whose members are all disks like disks. (dlehman) +- Handle formatting after adding devices from format handlers. (dlehman) +- Merge pull request #158 from mulkieran/master-target-size (mulkieran) +- Move parents checking and update into a seprarate methods (vpodzime) +- Rearrange and group some of the StorageDevice's methods/properties (vpodzime) +- Don't crash when processing cached LVs (vpodzime) +- Make roundToNearest() slightly more robust. (amulhern) +- Extend Size.convertTo() to work with arbitrary Size() values. (amulhern) +- Changes to FS._setTargetSize(). (amulhern) +- Increase ext4 maximum size from 16 TiB to 1 EiB (#1231049) (bcl) +- Merge pull request #155 from atodorov/fix_issue_154 (mulkieran) +- Use len of set to check for duplicates in list of packages. (atodorov) +- Merge pull request #153 from mulkieran/master-task-names (mulkieran) +- Omit completely pointless setUp method. (amulhern) +- Make a size refer to a Size object. (amulhern) +- Add __str__ method to various subclasses of Task. (amulhern) +- Don't pass unused mountpoint dict to preCommitFixup. (dlehman) +- Use the default md metadata version for everything except /boot/efi. + (dlehman) + +* Wed Jun 10 2015 Brian C. Lane - 1.6-1 +- Fix indentation in action_test.py (dlehman) +- Merge pull request #133 from atodorov/fix_deprecation_warnings (mulkieran) +- Merge pull request #147 from vojtechtrefny/master_fix_undo_resize (vtrefny) +- Fix setting original size for format resize action. (#1225352) (vtrefny) +- Make unit test assertion expressions fully Python2/3 compatible. (atodorov) +- Merge pull request #151 from mulkieran/master-120 (mulkieran) +- Merge pull request #122 from atodorov/remove_doctest (mulkieran) +- Parameterize Makefile test targets on Python version. (atodorov) +- Merge pull request #148 from mulkieran/master-132 (mulkieran) +- Merge pull request #144 from mulkieran/master-128 (mulkieran) +- Remove facilities for running tests as standalone modules. (atodorov) +- Include automatic and manual test documentation. (atodorov) +- Remove an accidental variable assignment in LVMLogicalVolumeDevice (vpodzime) +- Merge pull request #143 from mulkieran/master-134 (mulkieran) +- Remove two files in tests directory. (atodorov) +- Fix typo in docstring. (atodorov) +- Merge pull request #112 from vpodzime/master-fixed_maps (vpodzime) +- Merge pull request #129 from mulkieran/master-keepers-c (mulkieran) +- Merge pull request #135 from mulkieran/master-test-fixes (mulkieran) +- Convert bytes value to str. (amulhern) +- Change new format lookup name from "msdos" to "disklabel". (amulhern) +- Get rid of pointless test case about arguments for labeling apps. (amulhern) +- Do not raise KeyError if ID_PART_ENTRY_DISK is missing. (amulhern) +- Manage backing store more independently in loop backed test cases. (amulhern) +- Pass floats as string to Decimal constructor everywhere. (amulhern) +- Fix a bug in reading a size specification with a radix in the numeric part. + (amulhern) +- remove mention of doctest b/c target was removed in + fed53d969af0eddaeeca58cdf3e40916497aa305 (atodorov) +- Beware of Python 3's version of the map() built-in function (vpodzime) + +* Thu May 28 2015 Brian C. Lane - 1.5-1 +- Get rid of an unused import in blivet.zfcp (sbueno+anaconda) +- Make appropriate changes to adapt for s390 libblockdev plugin. + (sbueno+anaconda) +- Drop check from the release build target (bcl) +- Merge pull request #127 from vpodzime/master-libblockdev_1.0 (vpodzime) +- Adapt to the new libblockdev initialization API (vpodzime) +- Merge pull request #111 from dwlehman/disk-model-branch (dlehman) +- Store vendor/model information for DiskDevice instances. (dlehman) +- Require new version of pyparted with Python 3 related fixes (vpodzime) +- Merge pull request #114 from vojtechtrefny/fix_lvmsnapshot_size2 (vtrefny) +- Merge pull request #118 from mulkieran/master-hawkey (mulkieran) +- Use python-hawkey instead of rpm-python. (amulhern) +- Add a dead simple test for some basic task and resource functionality. + (amulhern) +- Use COW device to get actual size of LVM snapshots (vtrefny) + +* Mon May 18 2015 Brian C. Lane - 1.4-1 +- Workaround for chrooted mountpoints (#1217578) (vtrefny) +- Merge pull request #116 from mulkieran/master-gerror (mulkieran) +- Filter GLib.GError instead of GLib.Error in pylint false positives. + (amulhern) +- Merge pull request #113 from mulkieran/master-tasks-20150513 (mulkieran) +- Guard tests against device support being missing. (amulhern) +- Add checks for filesystem availability in selinux tests. (amulhern) +- Fix some small mistakes in tests using availability information. (amulhern) +- Get rid of abitrary _resizable variable in tests. (amulhern) +- Don't use utilsAvailable to skip tests. (amulhern) +- Treat a missing plugin as an OK situation. (amulhern) +- Use availability information in device actions. (amulhern) +- Add a check to determine whether the device type is supported. (amulhern) +- If external dependencies are unavailable, cannot support RAID levels. + (amulhern) +- Add availability information to devicelibs files. (amulhern) +- Track external dependencies in devices. (amulhern) +- If lvm is not available, do not do the filtering. (amulhern) +- Add availability checking to non-FS formats. (amulhern) +- Use filesystem tasks in filesystem. (amulhern) +- Add filesystem tasks to tasks directory. (amulhern) +- Add tasks infrastructure to tasks directory. (amulhern) +- Add error to detect errors in discovering availability info. (amulhern) +- Add errors about reading and writing labels to error heirarchy. (amulhern) +- Make assignments that override abstract properties into simple attributes. + (amulhern) +- Move kernel_filesystems functionality into a little library. (amulhern) +- Make labeling(), relabels(), and labelFormatOK() instance methods. (amulhern) +- Merge pull request #108 from vojtechtrefny/progress_callbacks (vtrefny) +- Merge pull request #109 from mulkieran/master-btrfs-c (mulkieran) +- Set a subvolspec format args when making a new BTRFS volume. (amulhern) +- Cache data obtained from /proc/self/mountinfo. (amulhern) +- Add progress report callback for action processing (vtrefny) +- Do not have two ignored variables when one will do. (amulhern) +- Fix a typo in comment. (amulhern) +- Do not use type() in makebumpver. (clumens) +- Merge pull request #100 from mulkieran/master-lvm-a (mulkieran) +- Merge pull request #104 from mulkieran/master-1139222 (mulkieran) +- Include LUKSDevice information in kickstart data (#1139222) (amulhern) +- Un-escape '-'s in names or paths for _all_ lvm lv or vgs. (amulhern) +- Fix a few miscellaneous pylint-caught problems. (clumens) +- Only give Size objects a __div__ method under python2. (clumens) +- Protect against calling testMount on an object that may not have it. + (clumens) +- Add a bunch of false positives to make pylint succeed. (clumens) +- e.message -> str(e) (clumens) +- Disable a pointless override warning. (clumens) +- Ignore the environment-modify pylint warnings for size_test.py. (clumens) +- blockdevError -> BlockDevError (clumens) +- Remove uses of the string module we don't need, ignore warnings on those we + do. (clumens) +- unicode isn't undefined on the python2 code paths. (clumens) +- Use eintr_retry_call from anaconda. (clumens) +- Move blivet to using pocketlint. (clumens) +- Merge pull request #97 from mulkieran/master-1072060 (mulkieran) +- Merge pull request #93 from vojtechtrefny/fix_active_parted (vtrefny) +- If the parent volume has a label, use it in subvol's kickstart (#1072060) + (amulhern) +- Merge pull request #94 from mulkieran/master-raid (mulkieran) +- Allow adding new partitions to disks with active devices (#1212841) (vtrefny) +- Fix "anaconda hangs while trying to discover iscsi..." (#1166652) (jkonecny) +- Move definition of _level attribute above super-constructor call. (amulhern) +- Fix status for LVMPhysicalVolume format (vtrefny) + +* Wed Apr 22 2015 Brian C. Lane - 1.3-1 +- fix conf.py pylint errors (bcl) +- Fix BlockDev import in populator.py (bcl) +- Prevent pylint from going crazy because of libblockdev's ErrorProxy + (vpodzime) +- Make use of the new libblockdev error reporting (vpodzime) +- Add libselinux-python to package dependencies (#1211834) (vtrefny) +- Introduce a new doReqPartition method that is similar to doAutoPartition. + (clumens) +- Merge pull request #81 from mulkieran/master-mount-options (mulkieran) +- Merge pull request #66 from vpodzime/master-py3_final (martin.kolman) +- Encode input for os.write() (mkolman) +- Build the python3-blivet subpackage (vpodzime) +- Do not modify dict while iterating over its values (vpodzime) +- Do not try to compare strings and Nones when sorting mountpoints (vpodzime) +- Always return strings from regular capture output run functions (mkolman) +- Do not use variable from an inner comprehension in tests (vpodzime) +- Implement and test Python 3 division for the Size class (vpodzime) +- Replace python 2 build-in-function cmp() with custom method (vtrefny) +- Do not rely on __sub__ being implemented as __add__ (-1)* (vpodzime) +- Transform our compare functions into key functions and use these instead + (vpodzime) +- Fix the size_test to stop using byte strings (vpodzime) +- Do not define unit strings as byte strings (vpodzime) +- Do not pass context to Decimal numeric operations (vpodzime) +- Don't call object's (as a class) __new__ with extra arguments (vpodzime) +- Make translation to lowerASCII Python[23]-compatible (vpodzime) +- Replace __import__ call with importlib.import_module (vpodzime) +- In FS._postSetup() check the mountpoint options that were actually used. + (amulhern) +- Add kwargs to unmount and move mountpoint check into _preSetup (bcl) +- Do not try importing hidden/backup files as formats (vpodzime) +- Add back DeviceTree's support for saving LUKS passphrases (vpodzime) +- Do not try to stat FileDevice's path if it doesn't exist (vpodzime) +- Merge pull request #76 from dwlehman/unusable-storage-branch (dlehman) +- Add error handling around storageInitialize for unusable setups. (dlehman) +- Include suggestions in error classes for unusable storage configurations. + (dlehman) +- Use partially corrupt gpt disklabels. (dlehman) +- Consolidate common code in DeviceFormat class methods. (dlehman) +- Update get_mount_paths to use mountsCache (bcl) +- Add multiple mountpoint handling to MountsCache (bcl) +- Remove obsolete FIXME from FS.status (bcl) +- Check to see if mountpoint is already mounted (bcl) +- Add isMountpoint to MountsCache (bcl) +- Add ability to unmount specific mountpoints (bcl) +- Fix pylint errors for six.moves import (vtrefny) +- Merge pull request #72 from vojtechtrefny/picklable-size (vpodzime) +- Merge pull request #74 from mulkieran/master-trivia (mulkieran) +- Fix two instances where check_equal() returned True incorrectly. (amulhern) +- Fix typo in 66f2ddb11e85ec6f48535d670dd6f24cb60cbe55. (amulhern) +- Make sure installer_mode is reset to original value. (amulhern) +- Test for Size pickling support (vtrefny) +- Pickling support for Size. (vtrefny) +- Disable pylint bad-super-call in MDRaidArrayDevice.updateSize. (dlehman) +- Merge pull request #68 from dwlehman/parted-device-branch (dlehman) +- Require reallocation after changing an allocated partition's size. (dlehman) +- Move mediaPresent out of Device and into StorageDevice. (dlehman) +- Don't use parted.Device to obtain size info. (dlehman) +- Merge pull request #70 from mulkieran/master-1208536 (mulkieran) +- Prepend /sys to sysfs path for udev lookup (#1208536) (amulhern) +- Fall back on mdadm info if udev info is missing for the array (#1208536) + (amulhern) +- Catch DeviceError as well as ValueError (#1208536) (amulhern) +- Make an MDContainerDevice if that is the right model (#1208536) (amulhern) +- Change raid variable name to raid_items (#1208536) (amulhern) +- Fix swapped args to processActions. (dlehman) +- Merge pull request #63 from dwlehman/disk-selection-branch (dlehman) +- Use VGname-LVname as key for LVinfo cache (vpodzime) +- Add back DeviceTree's methods and properties used from the outside (vpodzime) +- Wrap keys() with a list so that the dictionary can be changed (martin.kolman) +- Add a method to list disks related by lvm/md/btrfs container membership. + (dlehman) +- Make getDependentDevices work with hidden devices. (dlehman) + +* Fri Mar 27 2015 Brian C. Lane - 1.2-1 +- Fix pylint unused variable warnings (vtrefny) +- Add test for mountpoints (vtrefny) +- Replace _mountpoint with systemMountpoint in other modules (vtrefny) +- New method to handle nodev filesystems (vtrefny) +- Add dynamic mountpoint detection support (vtrefny) +- New method to compute md5 hash of file (vtrefny) +- Add information about subvolume to BTRFS format (vtrefny) +- Don't specify priority in fstab if -1 (default) is used (#1203709) (vpodzime) +- Catch GLib.GError in places where we catch StorageError (#1202505) (vpodzime) +- slave_dev is undefined here, use slave_devices[0] instead. (clumens) +- Clean out the mock chroot before attempting to run the rest of the test. + (clumens) +- Move recursiveRemove from Blivet to DeviceTree. (dlehman) +- Factor out adding of sysfs slave (parent) devices into its own method. + (dlehman) +- Add a __str__ method to DeviceTree. (dlehman) +- Allow changing the names of existing devices. (dlehman) +- Remove redundant block for adding fwraid member disks. (dlehman) +- Return a device from addUdevLVDevice if possible. (dlehman) +- Pass a sysfs path to MultipathDevice constructor from Populator. (dlehman) +- Resolve md names in udev info. (dlehman) +- LVMVolumeGroupDevice format should be marked as immutable. (dlehman) +- Don't catch and re-raise device create exceptions as DeviceCreateError. + (dlehman) +- Call superclass _preCreate from BTRFSVolumeDevice._preCreate. (dlehman) +- Move code that populates the device tree into a new class and module. + (dlehman) +- Move action list management into a separate class and module. (dlehman) +- Put an __init__.py in devices_tests directory. (amulhern) +- Require the Python 2 version of pykickstart (#1202255) (vpodzime) +- Use Size method to perform a Size operation (#1200812) (amulhern) +- Extend Size.roundToNearest to allow Size units (#1200812) (amulhern) +- Move code that populates the device tree into a new class and module. + (dlehman) +- Move action list management into a separate class and module. (dlehman) +- Remove a pointless override. (amulhern) +- Display the name of the overridden ancestor in error message. (amulhern) +- Check for simple function calls in pointless overrides. (amulhern) +- Simplify supported methods in FS.py. (amulhern) +- Make hidden property use superclass method where possible. (amulhern) +- Simplify some methods in DeviceFormat class. (amulhern) +- Do supercall in BTRFSVolumeDevice.formatImmutable. (amulhern) +- Add a comment to supported property. (amulhern) +- Get rid of some very old commented out code. (amulhern) +- Put all mock results into the top-level source dir. (clumens) +- Spell TestCase.teardown correctly as tearDown(). (amulhern) +- Make testMount() check return value of util.mount(). (amulhern) +- Remove unused fs_configs. (amulhern) +- Remove side-effects from mountType property. (amulhern) +- Do not make the mountpoint directory in fs.FS.mount(). (amulhern) +- Mount should not be satisfied with anything less than a directory. (amulhern) +- Do not return doFormat() value. (amulhern) +- Put previously removed mountExistingSystem() into osinstall.py. (amulhern) +- Revert "Revive the mountExistingSystem() function and all it needs" + (amulhern) +- Make sure the device is setup before formatting it (#1196397) (bcl) +- Use %%d format string for every value that should be an integer decimal. + (amulhern) +- Robustify PartitionDevice._wipe() method. (amulhern) +- Fix up scientific notation _parseSpec() tests. (amulhern) +- Make size._parseSpec a public method. (amulhern) +- Simplify StorageDevice.disks. (amulhern) +- Simplify StorageDevice.growable. (amulhern) +- Simplify and correct StorageDevice.packages property. (amulhern) +- Remove services infrastructure from devices and formats. (amulhern) +- Split devices tests out into a separate directory. (amulhern) +- Fix dd wipe call. (exclusion) +- Add a script to rebase and merge pull requests (dshea) +- Add pylint false positive to list of pylint false positives. (amulhern) +- Change all instances of GLib.Error to GLib.GError. (amulhern) +- Sort pylint-false-positives using sort's default options with LC_ALL=C. + (amulhern) +- Add ability to match scientific notation in strings. (amulhern) + +* Fri Mar 06 2015 Brian C. Lane - 1.1-1 +- Add scratch, scratch-bumpver and rc-release targets. (bcl) +- Add --newrelease to makebumpver (bcl) +- Add po-empty make target (bcl) +- Revive the mountExistingSystem() function and all it needs (vpodzime) +- Switch translations to use Zanata (bcl) +- Set EFIFS._check to True so that it gets correct fspassno (#1077917) + (amulhern) +- Use format string and arguments for logging function (vpodzime) +- Merge pull request #28 from vpodzime/master-libblockdev (vratislav.podzimek) +- Do not restrict MDRaidArrayDevice's memberDevices to type int (vpodzime) +- Adapt better to libblockdev's md_examine data (vpodzime) +- Set TmpFS._resizable to False. (amulhern) +- Add an additional test for TmpFS. (amulhern) +- Override NoDevFS.notifyKernel() so that it does nothing. (amulhern) +- Add TmpFS._resizefsUnit and use appropriately. (amulhern) +- Rewrite TmpFS class definition. (amulhern) +- Add TmpFS._getExistingSize() method. (amulhern) +- Make _getExistingSize() method more generally useful. (amulhern) +- Remove _getExistingSize() methods with body pass. (amulhern) +- Tidy up the definition of the device property throughout formats package. + (amulhern) +- Add a test to check properties of device paths assigned to formats. + (amulhern) +- Set TmpFSDevice object's _formatImmutable attribute to True. (amulhern) +- Remove no longer needed requires (vpodzime) +- Filter out pylint's "No name 'GLib' in module 'gi.repository'" messages + (vpodzime) +- Add a static method providing list of available PE sizes (vpodzime) +- Use BlockDev's crypto plugin to do LUKS escrow (vpodzime) +- Use BlockDev's DM plugin to work with DM RAID sets (vpodzime) +- Use BlockDev's DM plugin for DM map existence testing (vpodzime) +- Remove tests for the removed devicelibs functions (vpodzime) +- Set and refresh BlockDev's global LVM config if needed (vpodzime) +- Use BlockDev's LVM plugin instead of devicelibs/lvm.py (vpodzime) +- Use BlockDev's BTRFS plugin instead of devicelibs/btrfs.py (vpodzime) +- Use the BlockDev's DM plugin instead of devicelibs/dm.py (vpodzime) +- Use BlockDev's crypto plugin instead of devicelibs/crypto.py (vpodzime) +- Use BlockDev's loop plugin instead of devicelibs/loop.py (vpodzime) +- Use BlockDev's MD plugin instead of devicelibs/mdraid.py (vpodzime) +- Use BlockDev's swap plugin instead of devicelibs/swap.py (vpodzime) +- Use BlockDev's mpath plugin instead of devicelibs/mpath.py (vpodzime) +- First little step towards libblockdev (vpodzime) +- Move the Blivet class into its own module (vpodzime) +- Use a safer method to get a dm partition's disk name. (dlehman) +- Be more careful about overwriting device.originalFormat. (#1192004) (dlehman) + +* Fri Feb 13 2015 David Lehman - 1.0-1 +- Move autopart and installation-specific code outside of __init__.py + (vpodzime) +- Convert _parseUnits to public function (vtrefny) +- LVMFactory: raise exception when adding LV to full fixed size VG (#1170660) + (vtrefny) +- Do not unhide devices with hidden parents (#1158643) (vtrefny) + +* Fri Feb 06 2015 Brian C. Lane - 0.76-1 +- Revert "Switch to temporary transifex project" (bcl) +- Check parent/container type for thin volumes and normal volumes. (dlehman) +- drop useless entries from formatByDefault exceptlist (awilliam) +- Fix import of devicelibs.raid in platform.py (vpodzime) +- Use %%license in python-blivet.spec (bcl) +- Fix import of FALLBACK_DEFAULT_PART_SIZE (vpodzime) +- Make implicit partitions smaller if real requests don't fit anywhere + (vpodzime) +- Use list comprehension instead of filter+lambda in makebumpver (amulhern) +- Revert "Try to deactivate lvm on corrupted gpt disks." (dlehman) +- Virtualize options property methods in DeviceFormat.options definition. + (amulhern) +- Do not redefine size property in TmpFS. (amulhern) +- Do not set self.exists to True in TmpFS.__init__(). (amulhern) +- Simplify NoDevFS.type. (amulhern) +- Set format's mountpoint if it has the mountpoint attribute. (amulhern) +- Do not bother to set device.format.mountopts. (amulhern) +- Tighten up FS.mountable(). (amulhern) +- Simplify FS._getOptions(). (amulhern) +- Simplify setting options variable. (amulhern) +- Be less eager about processing all lines in /proc/meminfo. (amulhern) +- Make error message more useful. (amulhern) +- Add a tiny test for TmpFS. (amulhern) +- More fixes for alignment-related partition allocation failures. (dlehman) +- Do not mix stdout and stderr when running utilities unless requested + (vpodzime) +- Define the _device, _label and _options attributes in constructor (vpodzime) +- Get rid of the has_lvm function (vpodzime) +- Do not create lambda over and over in a cycle (vpodzime) +- Disable pylint check for cached LVM data in more places (vpodzime) +- Fix issue where too many mpath luns crashes installer (#1181336) (rmarshall) +- Allow user-specified values for data alignment of new lvm pvs. (#1178705) + (dlehman) +- Let LVM determine alignment for PV data areas. (#962961) (dlehman) +- Raise UnusableConfigurationError when unusable configuration is detected. + (dlehman) +- Don't raise an exception for failure to scan an ignored disk. (dlehman) +- Try to deactivate lvm on corrupted gpt disks. (dlehman) +- Remove an unused and outdated constant (vpodzime) +- Relax the blivet device name requirements (#1183061) (dshea) + +* Fri Jan 16 2015 Brian C. Lane - 0.75-1 +- Switch to temporary transifex project (bcl) +- Add docstrings to the methods in loop.py (bcl) +- get_loop_name should return an empty name if it isn't found (#980510) (bcl) +- Use dict() instead of dict comprehension. (riehecky) +- Fix the pylint errors in the examples directory. (amulhern) +- Add __init__ file to examples directory. (amulhern) + +* Fri Jan 09 2015 Brian C. Lane - 0.74-1 +- Use _resizefsUnit in resizeArgs() method implementations. (amulhern) +- Do not supply a default implementation for the resizeArgs() method. + (amulhern) +- Use convertTo in humanReadable(). (amulhern) +- Change convertTo() and roundToNearest() so each takes a units specifier. + (amulhern) +- Do not even pretend that ReiserFS is resizable. (amulhern) +- Get whole unit tuple in loop when searching for correct units. (amulhern) +- Make _parseUnits() return a unit constant, rather than a number. (amulhern) +- Add unitStr() method. (amulhern) +- Make _Prefix entries named constants. (amulhern) +- Hoist _BINARY_FACTOR * min_value calculation out of loop. (amulhern) +- Comment _prefixTestHelper() and eliminate some redundancies. (amulhern) +- Eliminate redundant test. (amulhern) +- Avoid using Size constant in FileDevice._create(). (amulhern) +- Do not compare the same two values twice. (amulhern) +- Make possiblePhysicalExtents() a bit more direct. (amulhern) +- Get rid of unnecessary use of long. (amulhern) +- Use _netdev mount option as needed. (#1166509) (dlehman) +- Don't crash when a free region is too small for an aligned partition. + (dlehman) +- Multiple loops shouldn't be fatal (#980510) (bcl) +- If allowing degraded array, attempt to start it (#1090009) (amulhern) +- Add a method that looks at DEVNAME (#1090009) (amulhern) +- Add mdrun method to just start, not assemble, an array. (#1090009) (amulhern) +- Change allow_degraded_mdraid flag to allow_imperfect_devices (#1090009) + (amulhern) +- Remove needsFSCheck() and what only it depends on. (amulhern) +- Remove allowDirty parameter and code that depends on it. (amulhern) +- Eliminate dirtyCB parameter from mountExistingSystem() params. (amulhern) +- Use correct package for FSError. (amulhern) + +* Fri Dec 19 2014 Brian C. Lane - 0.73-1 +- Mountpoint detection for removable devices (vtrefny) +- Fix adding partition after ActionDestroyDevice canceling (vtrefny) +- Avoid exception when aligned start and end are crossed over (exclusion) +- Substitute simple value for single element array. (amulhern) +- Change _matchNames so that it is less restrictive (amulhern) +- Change MDRaidArrayDevice to MDBiosRaidArrayDevice. (amulhern) +- Factor out MDRaidArrayDevice w/ type in ("mdcontainer", "mdbiosraidarray") + (amulhern) +- Make it possible for NTFS to recognize the label it reads. (amulhern) +- Make unnecessarily verbose properties into simple class attributes. + (amulhern) +- Change the generic badly formatted label to one that's bad for all. + (amulhern) +- Don't make overridden values actual properties. (amulhern) +- Check the status of the format being mounted. (amulhern) + +* Thu Dec 04 2014 Brian C. Lane - 0.72-1 +- Add a bunch of simple tests for filesystem formats. (amulhern) +- Get rid of long() related code. (amulhern) +- Add another check for resizable in FS.doResize() (amulhern) +- Simplify FS.free(). (amulhern) +- Make an early exit if self._existingSizeFields is [] (amulhern) +- Change "Aggregate block size:" to "Physical block size:" for JFS. (amulhern) +- Split output from infofs program for size on whitespace. (amulhern) +- Simplify _getSize() and currentSize(). (amulhern) +- Check resizable when assigning a new target size. (amulhern) +- Make default exists value a boolean in DeviceFormat.__init__. (amulhern) +- Remove pointless overrides. (amulhern) +- Add a simple pylint checker for pointless overrides. (amulhern) +- Run dosfsck in non-interactive mode (#1167959) (bcl) + +* Fri Nov 21 2014 Brian C. Lane - 0.71-1 +- Remove redundant import. (amulhern) +- Change inclusion to equality. (amulhern) +- Round filesystem target size to whole resize tool units. (#1163410) (dlehman) +- New method to round a Size to a whole number of a specified unit. (dlehman) +- Fix units for fs min size padding. (dlehman) +- Disable resize operations on filesystems whose current size is unknown. + (dlehman) +- Run fsck before obtaining minimum filesystem size. (#1162215) (dlehman) +- Fix setupDiskImages when the devices are already in the tree. (dlehman) +- Make logging a little less verbose and more useful in FS.mount() (amulhern) +- Make selinux test less precise. (amulhern) +- Do not translate empty strings, gettext translates them into system + information (vtrefny) +- Add a tearDown method to StorageTestCase. (dlehman) +- Remove pointless assignment to _formattable in Iso9660FS. (amulhern) +- Remove BTRFS._resizeArgs() (amulhern) +- Add more arguments to mpathconf (#1154347) (dshea) +- Check the minimum member size for BtrfsVolumeDevices. (amulhern) +- Get rid of FS._getRandomUUID() method. (amulhern) +- Eliminate TmpFS.minSize() (amulhern) +- Don't run selinux context tests when selinux is disabled. (dlehman) +- Temporarily disable a test that isn't working. (dlehman) +- Pass a path (not a name) to devicePathToName. (dlehman) +- devicePathToName should default to returning a basename. (dlehman) +- Fix test that guards forcible removal of dm partition nodes. (dlehman) +- Device status can never be True for non-existent devices. (#1156058) + (dlehman) +- Use super to get much-needed MRO magic in constructor. (#1158968) (dlehman) + +* Thu Nov 06 2014 Brian C. Lane - 0.70-1 +- Add a method that determines whether a number is an exact power of 2. + (amulhern) +- Put size values in Size universe eagerly. (amulhern) +- Update minSize method headers. (amulhern) +- Remove _minSize assignment to 0 where it's inherited from superclass. + (amulhern) +- Make _minInstanceSize, a source of minSize() value, always a Size. (amulhern) +- Fix int * Size operation and add tests (#1158792) (bcl) +- getArch should return ppc64 or ppc64le (#1159271) (bcl) +- Pack data for the wait_for_entropy callback (vpodzime) +- Allow the wait_for_entropy callback enforce continue (vpodzime) + +* Tue Nov 04 2014 Brian C. Lane - 0.69-1 +- Increase max depth of sphinx toc to show subpackage names. (dlehman) +- Temporarily disable the md devicetree tests due to mdadm issues. (dlehman) +- Add ability to set a default fstype for the boot partition (#1112697) (bcl) +- Pass a list of string items to log_method_return. (sbueno+anaconda) +- Require resize target sizes to yield aligned partitions. (#1120964) (dlehman) +- Split out code to determine max unaligned partition size to a property. + (dlehman) +- Allow generating aligned geometry for arbitrary target size. (dlehman) +- Align end sector in the appropriate direction for resize. (#1120964) + (dlehman) +- Specify ntfs resize target in bytes. (#1120964) (dlehman) +- Check new target size against min size and max size. (dlehman) +- Add a number of new tests. (amulhern) +- Add xlate parameter to humanReadable(). (amulhern) +- Rewrite _parseSpec() and convertTo() (amulhern) +- Make _lowerASCII() python 3 compatible and add a method header. (amulhern) +- Use b"", not u"", for _EMPTY_PREFIX. (amulhern) +- Strip lvm WARNING: lines from output (#1157864) (bcl) +- Add testing for MDRaidArrayDevice.mdadmFormatUUID (#1155151) (amulhern) +- Give mdadm format uuids to the outside world (#1155151) (amulhern) +- Make logSize, metaDataSize, and chunkSize always consistently Size objects. + (amulhern) + +* Wed Oct 22 2014 Brian C. Lane - 0.68-1 +- Only write label if there is a label AND labeling application. (amulhern) +- Handle unicode strings in Size spec parsing. (dshea) +- Fix typo in getting Thin Pool profile's name (vpodzime) +- Don't try to get no profile's name (#1151458) (vpodzime) +- Change signature of DiskLabel.addPartition to be more useful. (dlehman) +- Remove unused fallback code from DiskLabel. (dlehman) +- Let udev settle between writing partition flags and formatting. (#1109244) + (dlehman) +- Set _partedDevice attribute before calling device constructor (#1150147) + (amulhern) +- Fixed wrong Runtime Error raise in _preProcessActions (vtrefny) +- Set sysfsPath attribute before calling Device constructor (#1150147) + (amulhern) +- Return all translated strings as unicode (#1144314) (dshea) +- Force __str__ to return str. (dshea) +- Use the i18n module instead of creating new gettext methods (dshea) +- Take care when checking relationship of parent and child UUIDs (#1151649) + (amulhern) +- Further abstract loopbackedtestcase on block_size. (amulhern) +- Update tests to bring into line w/ previous commit (#1150147) (amulhern) +- Abstract ContainerDevice member format check into a method (#1150147) + (amulhern) +- Register DeviceFormat class (#1150147) (amulhern) +- Don't append btrfs mount options to None (#1150872) (dshea) +- Convert int to str before passing it to run_program (#1151129) (amulhern) + +* Thu Oct 09 2014 Brian C. Lane - 0.67-1 +- Don't pass --disable-overwrite to tx pull. (dlehman) +- Avoid unneccesarily tripping raid-level member count checks. (dlehman) +- Allow toggling encryption of raid container members. (#1148373) (dlehman) +- Include the new blivet.devices submodule in the built package. (clumens) +- Add a few test for setting dataLevel and metaDataLevel in BTRFS (amulhern) +- Add dataLevel and metaDataLevel attributes for testing. (amulhern) +- Add isleaf and direct to _state_functions (amulhern) +- Refactor setup of _state_functions into __init__() methods (amulhern) +- Move getting the attribute into the check methods. (amulhern) +- Adjust detection of exceptions raised. (amulhern) +- Update test setup so that it obeys RAID level requirements. (amulhern) +- Use new RaidDevice class in appropriate Device subclasses. (amulhern) +- Add new RaidDevice class for handling RAID aspects of devices. (amulhern) +- Do not set parents attribute if parents param is bad. (amulhern) + +* Wed Oct 08 2014 Brian C. Lane - 0.66-1 +- Organize installer block device name blacklist. (#1148923) (dlehman) +- Add likely to be raised exceptions to catch block (#1150174) (amulhern) +- Canonicalize MD_UUID* values in udev.py (#1147087) (amulhern) +- Split up devices.py. (dlehman) +- Fix some pylint errors introduced in recent commits. (dlehman) +- Return early when setting new size for non-existent partition. (dlehman) +- Raise an exception when we find orphan partitions. (dlehman) +- Fall back to parted to detect dasd disklabels. (dlehman) +- Omit pylint false positive (amulhern) +- Revert "pylint hack" (amulhern) +- Remove unused import (amulhern) +- Remove unused import (amulhern) +- pylint hack (amulhern) +- Make sure autopart requests fit in somewhere (#978266) (vpodzime) +- Work with free region sizes instead of parted.Geometry objects (vpodzime) +- Check that we have big enough free space for the partition request (vpodzime) +- Allow specifying thin pool profiles (vpodzime) +- Allow specifying minimum entropy when creating LUKS (vpodzime) +- Allow user code provide callbacks for various actions/events (vpodzime) +- Change default min_value from 10 to 1 in humanReadable() (amulhern) +- Rewrite of Size.humanReadable() method (amulhern) +- Factor out commonalities in xlated_*_prefix() methods. (amulhern) +- Use named constants for binary and decimal factors. (amulhern) +- Use UPPER_CASE for constants (amulhern) + +* Tue Sep 30 2014 Brian C. Lane - 0.65-1 +- Remove a problematic remnant of singlePV. (dlehman) +- Remove all traces of singlePV. (sbueno+anaconda) +- Change the default /boot part on s390x to not be lvm. (sbueno+anaconda) +- Remove redundant check for parents in Blivet.newBTRFS. (dlehman) +- Use Decimal for math in Size.convertTo. (dlehman) +- Filter out free regions too small for alignment of partitions. (dlehman) +- Disable LVM autobackup when doing image installs (#1066004) (wwoods) +- Add attribute 'flags.lvm_metadata_backup' (wwoods) +- lvm_test: refactoring + minor fix (wwoods) +- devicelibs.lvm: refactor _getConfigArgs()/lvm() (wwoods) +- devicelibs.lvm: fix pvmove(src, dest=DESTPATH) (wwoods) +- Only pad for md metadata if pvs use multiple disks. (dlehman) +- Align free regions used for partition growing calculations. (dlehman) +- Try to align end sector up when aligning new partitions. (dlehman) +- Remove obsolete conversion of size to float. (dlehman) +- Honor size specified for explicit extended partition requests. (dlehman) +- Honor zerombr regardless of clearpart setting. (dlehman) +- Fix treatment of percent as lvm lv size spec. (dlehman) +- Change variable keyword (#1075671) (amulhern) +- Remove unused import (#1075671) (amulhern) +- Don't mix target and discovery credentials (#1037564) (mkolman) +- Make sure /boot/efi is metadata 1.0 if it's on mdraid. (pjones) +- iscsi: fix root argument being overriden by local variable (#1144463) + (rvykydal) +- iscsi: add iscsi singleton back (#1144463) (rvykydal) + +* Fri Sep 19 2014 Brian C. Lane - 0.64-1 +- Fix pylint errors from recent btrfs commits. (dlehman) +- Only cancel actions on disks related to the one we are hiding. (dlehman) +- Cancel actions before hiding descendent devices. (dlehman) +- Improve handling of device removals/additions from the devicetree. (dlehman) +- The first format destroy action should obsolete any others. (dlehman) +- Do not allow modification or removal of protected devices. (dlehman) +- Propagate mount options for btrfs members to all volumes/subvolumes. + (dlehman) +- Properly identify dm devices even when udev info is incomplete. (dlehman) +- Do not mount btrfs to list subvolumes outside installer_mode. (dlehman) +- Reset default subvolume prior to removing the default subvolume. (dlehman) +- Increase max size for btrfs to 16 EiB. (#1114435) (dlehman) +- Improve adjustment for removal of a subvol in BTRFSFactory. (dlehman) +- Set dummy mountpoint in ksdata for lvm thin pools. (dlehman) +- Add an epoch to blivet. (sbueno+anaconda) +- Check if device has enough members when setting RAID level (#1019685) + (amulhern) +- Add BTRFSValueError error and use in btrfs related code (#1019685) (amulhern) +- iscsi: mount partitions in initramfs for root on iscsi (#740106) (rvykydal) +- Remove poolMetaData (#1021505) (amulhern) +- Revert "Allow use of a single path if multipath activation fails. (#1054806)" + (vpodzime) +- Add a release make target (bcl) +- Prefer ID_SERIAL over ID_SERIAL_SHORT (#1138254) (vpodzime) +- Allow use of a single path if multipath activation fails. (#1054806) + (dlehman) + +* Wed Sep 10 2014 Brian C. Lane - 0.63-1 +- Update makebumpver to include flags on first request (bcl) +- Condense and comment some devicelibs.dasd methods (#1070115) (amulhern) +- Add a test file for DASD handling (#1070115) (amulhern) +- Pylint inspired cleanup (#1070115) (amulhern) +- Add a property for read-only devices. (dshea) +- Get rid of misleading comment (#1066721) (amulhern) +- Allow user code creating free space snapshot (vpodzime) +- Add two functions to enable manual addition of ECKD DASDs. (sbueno+anaconda) +- Make prefering leaves the default in getDeviceByPath (#1122081) (amulhern) +- Make _filterDevices() return a generator consistently (#1122081) (amulhern) +- Split string of symlinks into array of strings (#1136214) (amulhern) +- Don't put "Linux" in a root's name if it's already there. (clumens) + +* Thu Aug 28 2014 Brian C. Lane - 0.62-1 +- Mock pyudev since libudev will not be on the builders. (dlehman) +- Update selinux tests for default context of mounts under /tmp. (dlehman) +- Clean up mocking done by udev tests when finished. (dlehman) +- Remove unused lvm and md activation code. (dlehman) +- Bypass size getter when mocking new devices. (dlehman) +- Simplify udev.device_get_uuid. (dlehman) +- Don't pass md array UUID as member format UUID. (dlehman) +- Update md name when lookup relied on UUID. (dlehman) +- Remove an obsolete block related to unpredictable md device names. (dlehman) +- Get md member and array UUIDs for format ctor from udev. (dlehman) +- Look in udev data for md member UUID. (dlehman) +- Remove some unused multipath-specific functions from blivet.udev. (dlehman) +- Adapt multipath detection code to external pyudev module. (dlehman) +- Keep lvm and md metadata separate from udev info. (dlehman) +- Replace our pyudev with the package python-pyudev. (dlehman) +- Add a bunch of tests for mdadd. (amulhern) +- Make has_redundancy() a method rather than a property and revise mdadd. + (amulhern) +- Omit unnecessary class hierarchy related boilerplate. (amulhern) +- Add a test for activation. (amulhern) +- Add a test for mddetail on containers. (amulhern) +- Still attempt to destroy even if remove failed. (amulhern) +- Use long messages for unittest errors. (amulhern) +- Fix mdnominate error message. (amulhern) +- Cosmetic changes for the swapSuggestion function (vpodzime) +- Break once metadata value is found. (amulhern) +- Fix issues reported by pyflakes (vpodzime) +- Remove tests for the sanityCheck (vpodzime) +- Move _verifyLUKSDevicesHaveKey and its exception to anaconda (vpodzime) +- Remove sanityCheck functions from blivet sources (vpodzime) +- Remove an unused closure function (vpodzime) +- Remove two methods that are never called (vpodzime) +- Add some tests for blivet.partitioning.addPartition. (dlehman) +- Add a couple of tests for blivet.partitioning.DiskChunk. (dlehman) +- Add a DiskFile class for testing partitioning code as a non-root user. + (dlehman) +- Add a contextmanager to create and remove sparse tempfiles. (dlehman) +- Fix sphinx formatting of code blocks in devicefactory docstrings. (dlehman) +- Mock selinux when building docs. (dlehman) +- Include doc files when installing on readthedocs. (dlehman) +- _maxLabelChars is no longer used by anything (bcl) +- tests: Add tests for HFSPlus labels (#821201) (bcl) +- Write a fs label for HFS+ ESP (#821201) (bcl) +- Mock non-standard modules so we can generate API docs on readthedocs. + (dlehman) +- Split mdadd into separate functions. (amulhern) +- Refactor mdraid tests. (amulhern) +- Add a method to extract information about an mdraid array (amulhern) +- Extend mdadm() to capture output (amulhern) +- Be more robust in the face of possible changes to mdadm's UUIDs. (amulhern) +- Factor canonicalize_UUID() into separate method. (amulhern) +- Add a docstring to mdraid.mdexamine (amulhern) +- Remove DeviceFormat.probe() method (amulhern) +- Remove all references to mdMinor in current code base. (amulhern) +- Generalize the error message for the array level (amulhern) +- Use super() instead of explicit parent name (amulhern) +- Remove commented out import. (amulhern) +- Make docstring more precise. (amulhern) +- Minor fix of a docstring. (rvykydal) +- Get rid of partedFlags field. (amulhern) + +* Fri Jul 11 2014 Brian C. Lane - 0.61-1 +- Fix conf.py version bumping (bcl) +- Add some tests for Chunk and Request class hierarchy. (dlehman) +- Honor the skip list when allocating leftover sectors. (dlehman) +- A Chunk is done growing when its pool is empty. (dlehman) +- Don't use integer division to calculate a fraction. (dlehman) +- Bump version in sphinx config from scripts/makebumpver. (dlehman) +- Remove spec= from Size usage in intro.rst. (dlehman) +- Attempt to reset the uuid of the mdraid member device (#1070095) (amulhern) +- Add new method udev.device_get_md_device_uuid() method (#1070095) (amulhern) +- Canonicalize mdadm generated UUIDS (#1070095) (amulhern) +- Add a udev.device_get_md_metadata() method to udev and use it. (amulhern) +- Change use of METADATA to MD_METADATA. (amulhern) +- Check for md_level of None (amulhern) +- Do not convert the result of udev.device_get_md_devices() to int. (amulhern) +- Add documentation to udev.device_get_md_*() methods. (amulhern) +- Document udev.device_get_uuid() method. (amulhern) +- Add a few small tests for mdexamine (amulhern) +- Add test for raid level descriptor None. (amulhern) +- Use context manager with assertRaises*() tests. (amulhern) +- Change uuid parameter to array_uuid (amulhern) +- Remove udev_ prefix from udev methods. (amulhern) +- Remove all references to DeviceFormat.majorminor (amulhern) +- Use add_metaclass instead of with_metaclass. (amulhern) +- Disable redefined-builtin warning. (amulhern) +- Use range instead of xrange in generateBackupPassphrase() (amulhern) +- Add a simple test of generateBackupPassphrase() result format (amulhern) +- Python3 compatibility (rkuska) +- Replace python-setuptools-devel BR with python-setuptools (bcl) + +* Wed Jul 02 2014 Brian C. Lane - 0.60-1 +- Do not use udev info to get the name of the device. (amulhern) +- Remove unnecessary fanciness about importing devices. (amulhern) +- Disable some pylint warnings that arise due to anaconda versions. (amulhern) +- Allow RAID1 on EFI (#788313) (amulhern) + +* Thu Jun 26 2014 Brian C. Lane - 0.59-1 +- When logging, indicate whether exception was ignored by blivet. (amulhern) + +* Wed Jun 25 2014 Brian C. Lane - 0.58-1 +- Only import ROOT_PATH if needed (bcl) +- Add early keyword to setUpBootLoader (#1086811) (bcl) +- Only log a warning about labeling if something is wrong (#1075136) (amulhern) +- When adding an md array, allow adding incomplete arrays (#1090009) (amulhern) +- Add a flag to control whether a degraded md raid array is used (#1090009) + (amulhern) +- Remove preferLeaves parameter from getDeviceByPath() (amulhern) +- Factor out commonalities among getDevice[s|]By* methods. (amulhern) +- Omit special check for md devices in addUdevDevice(). (amulhern) +- Remove unused 'slaves' variable. (amulhern) +- Move down or remove assignment to device in add* methods. (amulhern) +- Move DevicelibsTestCase up to the top level of the testing directory. + (amulhern) +- Accept None for btrfs raid levels (#1109195) (amulhern) +- Add a test for a btrfs error associated with small devices (#1109195) + (amulhern) + +* Thu Jun 19 2014 Brian C. Lane - 0.57-1 +- Make DevicelibsTestCase devices configurable. (amulhern) +- Use correct parameters in __init__() in subclasses of unittest.TestCase. + (amulhern) +- Add num_blocks parameter to makeLoopDev(). (amulhern) +- Move skipUnless decorator to the top level class of skipped classes. + (amulhern) +- Explicitly accept a string as well as a RAIDLevel object. (amulhern) +- Update BTRFS initializer comments for level type. (amulhern) +- Remove some extra imports. (amulhern) +- Add method to set the default disklabel (#1078537) (bcl) +- Do not try to activate dmraid sets if the dmraid usage flag is false + (mkolman) +- Use the value of the Anaconda dmraid flag to set the Blivet dmraid flag + (mkolman) +- Use the value of the Anaconda ibft flag to set the Blivet ibft flag (mkolman) +- Ignore _build directory in doc directory. (amulhern) +- Change intersphinx mapping to avoid linkcheck redirect errors. (amulhern) +- Remove doctest target from Makefile. (amulhern) +- Allow the table of contents to go one level deeper. (amulhern) +- Automate generation of the .rst files which just set up the modules. + (amulhern) + +* Thu Jun 12 2014 Brian C. Lane - 0.56-1 +- Skip device name validation for some device types. (dlehman) +- Add a property indicating whether a device is directly accessible. (dlehman) +- Add support for read-only btrfs snapshots. (dlehman) +- Add tests for snapshots. (dlehman) +- Special treatment for getting parted device for old-style lvm snapshots. + (dlehman) +- Some devices have immutable formatting. (dlehman) +- Detect existing btrfs snapshots. (dlehman) +- Drop special accounting for snapshot space usage in VG. (dlehman) +- Use LVMSnapshotDevice when populating the devicetree. (dlehman) +- Add Device classes for snapshots. (dlehman) +- Add ignore_skip keyword arg to lvactivate. (dlehman) +- Add optional kwarg to force removal of a logical volume. (dlehman) +- Add backend functions for creating and managing snapshots. (dlehman) +- Add docstrings for BTRFSVolumeDevice and BTRFSSubVolumeDevice. (dlehman) +- Remove duplicate portion of lvm config string. (dlehman) +- Reset the devicetree before tearing everything down in _cleanUp. (dlehman) +- Make sure disk filters are applied even if populate fails. (dlehman) +- Sync the spec file with downstream (vpodzime) + +* Mon Jun 09 2014 Vratislav Podzimek - 0.55-1 +- IPSeriesPPC now supports GPT in Open Firmware (hamzy) +- Fix device name validation for devices that can contain / (#1103751) (dshea) +- Add a getRaidLevel() convenience method to raid.py (amulhern) +- Make a StorageDevice.raw_device property and use it where appropriate + (amulhern) +- Simplify a small chunk of Blivet.updateKSData() (amulhern) +- Move the code for getting a space requirement from devicefactory to raid. + (amulhern) +- Make all devicefactory classes uses RAID objects instead of strings. + (amulhern) +- Remove devicefactory.get_raid_level from blivet (amulhern) +- Put get_supported_raid_levels in devicefactory.py (amulhern) +- Make BTRFS devices use RAID objects instead of strings for levels (amulhern) +- Add lists of supported RAID levels for btrfs and lvm (amulhern) +- Add "linear" to mdraid's list of supported raid levels. (amulhern) +- Remove getRaidLevel() from mdraid file and make RAID_levels public (amulhern) +- Check for required methods in MDRaidLevels.isRaidLevel. (amulhern) +- Use has_redundancy property to decide how to add a member to an array. + (amulhern) +- Update the mdraid.mdadd comments (amulhern) +- Use has_redundancy raid property when checking whether a device is removable + (amulhern) +- Make createBitmap() a property and update tests appropriately. (amulhern) +- Add a Dup class to the various descendants of RAIDLevel. (amulhern) +- Add an is_uniform property to the RAID levels. (amulhern) +- Add a has_redundancy method that returns True if there is actual redundancy + (amulhern) +- Add Linear and Single to the RAID classes. (amulhern) +- Move Container class to raid package and tidy it up (amulhern) +- Allow the RAID object itself to be a valid RAID descriptor for lookup. + (amulhern) +- Adjust RaidLevel hierarchy so that all raid level objects extend RAIDLevel + (amulhern) +- No longer use _standard_levels as the default set of RAID levels. (amulhern) +- Extract selection of members in complete() into a separate method. (amulhern) +- Remove DMRaidArrayDevice.members property. (amulhern) +- Comment mdraid.mdcreate() and update tests appropriately. (amulhern) +- Import name 'lvm' instead of names from lvm package. (amulhern) + +* Sat Jun 07 2014 Fedora Release Engineering - 0.54-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Wed May 28 2014 Brian C. Lane - 0.54-1 +- Add tests for setting device's parent list directly (vpodzime) +- Do not alter the ParentList being iterated over (#1083581) (vpodzime) +- Do not limit ThinLV's size to VG's free space (vpodzime) +- Take extra RAID metadata into account when growing LV (#1093144) (vpodzime) +- Move apply_chunk_growth outside of a for-cycle (vpodzime) +- Multiple arguments for string formatting need to be in parentheses (#1100263) + (mkolman) +- Make print statements Python 3 compatible (mkolman) +- Validate device names (dshea) +- Use a setter for Device.name as foretold by the prophecy of TODO (dshea) + +* Tue May 20 2014 Brian C. Lane - 0.53-1 +- Remove extra quotes from the xfs_db arguments. (dshea) +- Factor duplicate code in __deepcopy__ methods into one method (#1095244) + (amulhern) +- Rearrange code related to handleUdevDeviceFormat() (#1095329) (amulhern) +- Make dumpState catch and log all AttributeErrors (#1095329) (amulhern) +- Add sectorSize property to catch and handle missing partedDevice (#1095329) + (amulhern) +- Get rid of remaining uses of spec keyword for Size() in examples directory. + (amulhern) +- Generalize false positive regular expression for multiple pylint versions + (amulhern) +- Do not run some tests unless running on Jenkins. (amulhern) +- Miscellaneous pylint fixes. (amulhern) +- Globally disable pointless string statement warning (amulhern) +- Disable unused argument warning for 'args' in TmpFSDevice constructor + (amulhern) +- Omit 'args' parameter from formats constructors (amulhern) +- Disabled unused argument warning for kwargs in formats.destroy() (amulhern) +- Omit *args from parameters for format.create() and formats.destroy() + (amulhern) +- Omit *args from parameters in formats.setup() (amulhern) +- Make formats.teardown() not take any extra parameters. (amulhern) +- Make formats.mount use explicit keywords instead of kwargs. (amulhern) +- Remove non-self params from FS.doResize method (amulhern) +- Make doFormat use regular style keyword parameters (amulhern) +- Do not use *args, **kwargs idiom in scheduleCreateFormat. (amulhern) +- Do not use *args, **kwargs idiom in various schedule* auxiliary test methods. + (amulhern) +- Remove upgrading param from turnOnSwap() (amulhern) +- Disable unused-argument warning (amulhern) +- Disable pylint unused-argument warning. (amulhern) + +* Thu May 08 2014 Brian C. Lane - 0.52-1 +- Split ROOT_PATH usage into getTargetPhysicalRoot()/getSysroot() (walters) +- Update and fix copyright info for docs. (dlehman) +- Add some tests for extended partition management. (dlehman) +- Add some tests that verify the results of DeviceTree.populate. (dlehman) +- Add a base class for tests backed by disk image storage. (dlehman) +- Adapt examples to examples/common.py function dispersement. (dlehman) +- Change devices.SparseFileDevice._create to use util.create_sparse_file. + (dlehman) +- Move set_up_logging and create_sparse_file into blivet.util for reuse. + (dlehman) +- Make examples.common.tear_down_disk_images a DeviceTree method. (dlehman) +- Fix handling of devices activated as a side-effect of actions. (dlehman) +- Check for problematic active devices before processing any actions. (dlehman) +- Split some large blocks out of DeviceTree.processActions. (dlehman) +- Explicitly requested extended partitions already have an action. (dlehman) +- Fix handling of extended partitions across various modes of operation. + (dlehman) +- Handle the case of md arrays getting activated from outside blivet. (dlehman) +- Make an extra effort to remove dm partition nodes that want to stay. + (dlehman) +- Fix handling of clearing a partitioned disk and leaving it cleared. (dlehman) +- Don't check for disklabels on partitions. (dlehman) +- Update targetSize to reflect actual size after a device is created. (dlehman) +- Remove redundant msecs from logging timestamp. (dlehman) +- Make signature of Size.__new__ match signature of Decimal.__new__ (amulhern) +- Change Size so that it takes a single value parameter. (amulhern) +- Change all 'format' keyword args to 'fmt' in Device constructors (amulhern) +- Change format keyword argument to fmt in scheduleCreateFormat (amulhern) +- Change keyword parameters in devicetree.findActions (amulhern) +- Change ActionCreateFormat constructor keyword argument to 'fmt' (amulhern) +- Remove unused parameter 'ignoreErrors' from umountFilesystems() (amulhern) +- Remove parameter 'raiseErrors' from mountFilesystems() methods. (amulhern) +- Disable unused argument warning for 'major' and 'minor' (amulhern) +- Set dummy functions as values rather than via function definition syntax. + (amulhern) +- Pass size value to superconstructor for LVMVolumeGroupDevice. (amulhern) +- Sort the pylint-false-positives file (amulhern) +- Do not disable unused argument warning. (amulhern) +- Omit pylint warning about disabled warnings or errors from pylint log. + (amulhern) +- Put the pyblock warning in pylint-false-positives (amulhern) +- Remove obsolete documentation for parameter 'label'. (amulhern) + +* Mon May 05 2014 Brian C. Lane - 0.51-1 +- Adjust the available size on each disk using chunk size. (amulhern) +- Removed some now unused methods from devices (#1085474) (amulhern) +- Rename size() method to get_size() method. (amulhern) +- Remove unused get_size method (#1085474) (amulhern) +- Use raid.size method to get size of device (#1085474) (amulhern) +- Add a size() method to the raid classes (#1085474) (amulhern) +- Move line that might throw an MDRaid exception inside try block (#1085474) + (amulhern) +- Check whether type is mdbiosraidarray before checking smallest member + (#1085474) (amulhern) +- Log if there was a failure to calculate the size of the MDRaidArrayDevice + (#1085474) (amulhern) +- Rename get_raw_array_size to get_net_array_size (#1085474) (amulhern) +- Rename _get_size to _trim, which describes its function better (#1085474) + (amulhern) +- Improve comments on a few methods (#1085474) (amulhern) +- Make RAIDLevels iterable (#1085474) (amulhern) +- Update makebumpver for python-bugzilla 1.0.0 (bcl) +- Disable unused argument warning for 'key_file' in devicelibs.crypto methods + (amulhern) +- Disable unused argument warning for 'del_passphrase' in luks_remove_key + (amulhern) +- Disable unused argument warning for 'data' in doAutoPartition (amulhern) +- Disable unused argument warning for 'info' in handleUdevLuksFormat (amulhern) +- Disable unused argument warning for 'disks' in get_pv_space. (amulhern) +- Remove pointless parameters from unittest methods. (amulhern) +- Disable a no member warning for EddTestFS initializer. (amulhern) +- Get rid of unused argument 'args' in MakeBumpVer constructors (amulhern) +- Changes to _parseOneLine() and its single invocation. (amulhern) +- Remove obsolete comment (amulhern) +- Rename to avoid redefining parameter built-ins (amulhern) +- Change name to avoid redefining built-in (amulhern) +- Remove unused parameter in makeupdates. (amulhern) +- Removed unused argument 'options' from testMount (amulhern) +- Make signature of _setSize match that of the method it overrrides. (amulhern) +- Actually use argv parameter (amulhern) +- Pass fname as first argument to shutil.copy2 (amulhern) +- Remove minimumSector method and _minimumSector attribute (amulhern) +- Disable not-callable pylint warning. (amulhern) +- Set child_factory_fstype to None in DeviceFactory (amulhern) +- Suppress unpacking-non-sequence pylint warning (amulhern) +- Prefix name with defining package (amulhern) +- Update Platform instance from flags instead of replacing it. (#1090646) + (dlehman) +- Rename to avoid redefining built-ins where the redefinition is method local. + (amulhern) +- Set device.format in else block of try/except/else. (amulhern) +- Do not run pylint on sphinx generated conf.py (amulhern) +- Get rid of a redefined builtin while simplifying method. (amulhern) +- Compress loop into generator list comprehension (amulhern) +- Rewrite resize() method to depend on _resizable. (amulhern) +- Remove definition of LVMThinLogicalVolumeDevice._resizable (amulhern) +- Add an attribute docstring for _resizable. (amulhern) +- Correct comment on resizable property (amulhern) + +* Thu Apr 24 2014 Brian C. Lane - 0.50-1 +- Don't apply action until after all checks have passed. (dlehman) +- Apply action for extended partition creation. (dlehman) +- Fix an issue introduced in commit a210eb5c. (dlehman) +- Move changes from action ctors into apply methods. (dlehman) +- Tell lvm to prefer /dev/mapper/ and /dev/md/ to dm-X and mdX nodes. (dlehman) +- Use the right md UUID when trying to look one up from addUdevDevice. + (dlehman) +- Pass UUID of existing md array to superclass constructor. (dlehman) +- Fix accounting related to addition of md member devices. (dlehman) +- Add some more tests for the Size.humanReadable method (vpodzime) +- If size is an integer value, show it as an integer value (vpodzime) +- Make sure that using just k/m/g/... results in KiB/MiB/GiB/... (vpodzime) +- Make humanReadable size use binary prefixes and nicer units (vpodzime) +- Round sizes in humanReadable instead of flooring them (vpodzime) +- Do not assign result of evaluating EddTestFS() to a variable (amulhern) +- Rename bits() to numBits() (amulhern) +- Rename to avoid conflict with name in outer scope. (amulhern) +- Put module level code in a method (amulhern) +- Do not use strip() incorrectly (amulhern) +- Disable E1101 (no-member) error (amulhern) +- Use isResize in isShrink and isGrow. (amulhern) +- Suppress W0612 (unused-variable) false positives (amulhern) +- Suppress W0621 warnings (amulhern) +- Add a stub function for get_bootloader (amulhern) +- Suppress W0602 false positives (amulhern) +- Remove BootLoaderError definitions (amulhern) +- Disable E1003 warning. (amulhern) +- Do not cache the DeviceFormat object (amulhern) +- Suppress W0201 error where attribute is set in __new__. (amulhern) +- Add to false positives an error which is not suppressed by a pragma. + (amulhern) +- Suppress W0201 errors (amulhern) +- Make signature of Size.__str__ match signature of Decimal.__str__ (amulhern) +- Do not evaluate %% operator in log message arguments (amulhern) +- Remove suite() methods in tests (amulhern) +- Remove addKeyFromFile() method (amulhern) +- Import name 'deviceaction' where needed (amulhern) +- Setting variables in __init__ (amulhern) +- Log exception information and disable W0703 warning. (amulhern) +- Disable some W0703 warnings (amulhern) +- Disable some W0703 warnings. (amulhern) +- Add a function that logs available exception info. (amulhern) +- Restrict scope of pylint pragmas as much as possible (amulhern) +- Change all pylint numeric codes to mnemonic strings. (amulhern) + +* Thu Apr 17 2014 Brian C. Lane - 0.49-1 +- Slightly reduce loop and get rid of obsolete comment (amulhern) +- Slightly rewrite loop to avoid a redefining builtin error (amulhern) +- Simplify find_library and fix redefining built-in errors. (amulhern) +- Make loop variables a little more descriptive (amulhern) +- Make regular expressions raw strings. (amulhern) +- Suppress unused variable warning and check for failure. (amulhern) +- Add W0105 warning about attribute docstrings to false positives (amulhern) +- Make signature of setup() in parent class same as in children (amulhern) +- Suppress some correct pylint warnings (amulhern) +- Get _loopMap.values() when all that's needed is the values (amulhern) +- Obvious fix inspired by pylint E0602 error (amulhern) +- Suppress W0631 warning for abbr and prefix. (amulhern) +- Do not do formatting operation in the argument of the translation (amulhern) +- Remove unnecessary global statements (amulhern) +- Disable W0703 message in test (amulhern) +- Explicitly set the module level platform variable (amulhern) + +* Thu Apr 10 2014 Brian C. Lane - 0.48-1 +- Do not execute smallestMember property method twice. (amulhern) +- Remove unnecessary function definitions in abstract properties (amulhern) +- Pass format args as arguments to debug method (#1085057) (amulhern) +- Move udev_settle call from util into fs to break circular dependency + (amulhern) +- Change implicit relative imports to explicit relative imports (amulhern) +- Remove unused imports (amulhern) +- Get rid of os.path import (amulhern) +- Really avoid dynamic import of formats/__init__.py by itself (amulhern) +- Ignore E1101 errors in savePassphrase. (amulhern) +- Add a bunch of E1120 errors to the false positives file (amulhern) +- Make LabelingAsRoot class an abstract class and define two properties + (amulhern) +- Suppress false positive W0631 error. (amulhern) +- Use self.nic instead of nic (amulhern) +- Make sure _state_functions is a dictionary in base class (amulhern) +- Remove unnecessary lambda wrappers on assertion functions (amulhern) +- Obvious fix inspired by an "Undefined variable warning" (amulhern) +- Remove all references to lvm_vg_blacklist and blacklistVG. (amulhern) +- Update for changes in the anaconda errorHandler API. (dshea) +- Remove unused imports. (amulhern) +- Import from the defining module. (amulhern) +- Move import to top level. (amulhern) +- Do not use implicit relative imports (amulhern) +- Remove wildcard import (amulhern) +- Fix a bug and catch a change in lvm's thin pool layout. (dlehman) +- Plumb uuid down through DMDevice. (dlehman) + +* Wed Apr 02 2014 Brian C. Lane - 0.47-1 +- Change labelApp to a more concisely defined abstract property (amulhern) +- Change defaultLabel to a more concisely defined abstract property. (amulhern) +- Change _labelstrRegex to a more concisely defined abstract property. + (amulhern) +- Make reads property a bit more succinct. (amulhern) +- Make name an abstract property and omit _name (amulhern) +- Remove an unused import from devicelibs/raid.py (vpodzime) +- Fix all pylint errors in pylintcodediff (amulhern) +- Don't run test if the git branch is dirty (amulhern) +- Exit if the specified log file does not exist. (amulhern) +- Update lvm devicelibs tests to reflect recent changes. (dlehman) +- Add required LVs as needed instead of trying to sort by attrs. (dlehman) +- Fix missed conversion of rm->missing in vgreduce call. (dlehman) +- Only gather lvm information one time per DeviceTree.populate call. (dlehman) +- Add support for listing everything to pvinfo and lvs. (dlehman) +- Get lv list from lvm in a more straightforward format. (dlehman) +- Gather lv list where we use it to save from having to stash it. (dlehman) +- Split out common lvm parsing code. (dlehman) +- Add tests that use ParentList as part of Device. (dlehman) +- Parent list length doesn't reflect new member in _addParent. (dlehman) +- Rearrange _startEdd to be a little more obvious. (amulhern) +- Raise exceptions using the new syntax (amulhern) +- Do not import logging twice. (amulhern) +- Suppress unused variable warning (amulhern) +- Get rid of writeRandomUUID. (amulhern) +- Remove unused variable but retain call for its side-effects (amulhern) +- Put docstring in class (amulhern) +- Remove appendiceal assignment (amulhern) +- Keep first parameter "self" (amulhern) +- Omit compile flag (amulhern) +- Move lines beneath __main__ into a main method (amulhern) +- Indent with spaces, not tabs (amulhern) +- Change param default [] to None and convert in method (amulhern) +- Change to a semantically equivalent version of FileDevice.path (amulhern) +- Adapt existing tests to changed signature of some methods (amulhern) +- Don't assign return value to unused variable (amulhern) +- Be specific when catching exceptions (dshea) +- Remove appendiceal assignments (amulhern) +- Remove a lot of unused variables extracted from udev info (amulhern) +- Don't get return values from communicate() if they are ignored (amulhern) +- Use the disk's name in log message (amulhern) +- Get rid of old exception unpacking syntax (dshea) +- Rearranged some iffy exception checking (dshea) +- Replace with a semantically equivalent chunk. (amulhern) +- Remove some unused exception names. (amulhern) +- Remove unused assignment to boot. (amulhern) +- Delete method-local pruneFile function. (amulhern) +- Don't comment out function headers but leave their bodies uncommented + (amulhern) +- Get rid of unnecessary pass statements (amulhern) +- Put a field and a method in the base class (amulhern) +- Spell parameter self correctly (amulhern) +- Give abstract method the same signature as its overriding methods. (amulhern) +- Catch correct error and disable warning. (amulhern) + +* Wed Mar 26 2014 Brian C. Lane - 0.46-1 +- Adapt callers to use the new parent list interface. (dlehman) +- Change management of Device parents to use a simple list interface. (dlehman) +- Convert ContainerDevice to an abstract base class. (dlehman) +- Set device uuid before calling Device ctor. (dlehman) +- Improve the mechanism for VG completeness. (dlehman) +- Support mutually-obsoleting actions. (dlehman) +- Add some checking to MDRaidArrayDevice._setSpares. (dlehman) +- Make sorting by action type part of the action classes. (dlehman) +- Add action classes for container member set management. (dlehman) +- Add a property to provide consistent access to parent container device. + (dlehman) +- Add type-specific methods for member set management. (dlehman) +- Adapt callers to new method names for add/remove member device. (dlehman) +- Add a ContainerDevice class to consolidate member management code. (dlehman) +- Add backend functions for container member set management. (dlehman) +- Teardown RAID device once testing is over (amulhern) +- Make lvm tests runnable. (amulhern) +- Make crypt tests runnable. (amulhern) +- Replace unnecessarily complicated expression with string multiplication + (amulhern) +- Suppress unused variable warning for index in range (amulhern) +- Suppress some unused variable warnings. (amulhern) +- Suppress some unused variable warnings (amulhern) +- Update to the new raise syntax (dshea) +- Removed an unnecessary semicolon (dshea) +- Removed a redundant definition of NoDisksError (dshea) +- Specify regular expressions containing backslashes as raw strings (dshea) +- Fixed some questionable indentation (dshea) +- Fix logging function string format warnings. (dshea) +- All size specifications should be Size instances (#1077163) (vpodzime) +- Make sure StorageDevice's self._size is a Size instance (#1077179) (vpodzime) +- Allow creating Size instance from another Size instance (vpodzime) +- Force removal of hidden devices (#1078163) (amulhern) +- Get action_test into working order. (dlehman) +- Update action_test.py to specify sizes using blivet.size.Size. (dlehman) +- Don't corrupt the environment when setting up StorageTestCase. (dlehman) +- Make minSize, maxSize consistent and correct. (dlehman) +- Don't prevent grow actions on devices with no max size. (dlehman) + +* Thu Mar 20 2014 Brian C. Lane - 0.45-1 +- Changes to allow pylint checks to be run on a distribution of the source. + (amulhern) +- Remove non-doing check target (amulhern) +- Add a script to relate pylint errors to lines changed. (amulhern) +- Change output format so that it is suitable for diff-cover. (amulhern) +- Do an initial setup for running pylint tests in blivet. (amulhern) +- Handle None in devicePathToName(#996303) (dshea) +- Remove bootloader.packages from storage.packages (#1074522). (clumens) +- Whitespace fixes for the crypto devicelib module (vpodzime) +- Use random.choice for generating LUKS backup passphrase (vpodzime) +- Trivial fixes for the lvm devicelib module (vpodzime) +- Make vginfo work the same way as pvinfo and other LVM functions (vpodzime) +- Allow NTFS to be mountable. (#748780) (dshea) +- Limit the LV size to VG's free space size (vpodzime) + +* Fri Mar 07 2014 Brian C. Lane - 0.44-1 +- Fix an old typo in zeroing out a PReP partition. (#1072781) (dlehman) +- Only count with the extra metadata extents in new VGs and LVs (#1072999) + (vpodzime) +- Use container's parent's name for PV if available (#1065737) (vpodzime) +- Fix traceback with write_dasd_conf. (#1072911) (sbueno+anaconda) +- When copying a root, also copy hidden devices (#1043763) (amulhern) +- Add hidden flag to devicetree.getDeviceByID (#1043763) (amulhern) +- Only set device for mountpoint if it is not None (#1043763) (amulhern) +- Extend the list of things to be omitted if moddisk is False (#1043763) + (amulhern) +- Set req_name to None at the top of initializer (#1043763) (amulhern) +- Log action cancelation (#1043763) (amulhern) +- Make DeviceTree.hide() remove a larger set (#1043763) (amulhern) +- Re-write the DASD storage code. (#1001070) (sbueno+anaconda) +- Include image install flag when updating from anaconda flags. (#1066008) + (dlehman) + +* Fri Feb 28 2014 Brian C. Lane - 0.43-1 +- Include tmpfs mounts in post-install kickstart (#1061063) (mkolman) +- Count with the extra metadata extents for RAID consistently (#1065737) + (vpodzime) +- Make partitioning error message more friendly (#1020388) (amulhern) +- Fix partition handling across multiple processActions calls. (#1065522) + (dlehman) +- Let the udev queue settle before populating the devicetree. (#1049772) + (dlehman) +- Don't activate or deactivate devices from the action classes. (#1064898) + (dlehman) +- Improve handling of parted.DiskLabelCommitError slightly. (dlehman) +- Make teardownAll work regardless of flags. (dlehman) +- Fix maxSize test when setting device target size. (dlehman) +- Size.convertTo should return a Decimal. (dlehman) +- Don't use float for anything. (dlehman) +- Fix type of block count in PartitionDevice._wipe. (dlehman) +- Fix handling of size argument to devicelibs.lvm.thinlvcreate. (#1062223) + (dlehman) +- return empty set when no matching fcoe nic (#1067159) (bcl) +- Return str from Size.humanReadable (#1066721) (dshea) +- Add a coverage test target (#1064895) (amulhern) +- Filesystem labeling tests will not run without utilities (#1065422) + (amulhern) +- Rename misc_test.py to something more descriptive (#1065422) (amulhern) +- Refactor labeling tests (#1065422) (amulhern) +- Move SwapSpace tests into a separate class (#1065422) (amulhern) + +* Tue Feb 18 2014 Brian C. Lane - 0.42-1 +- Wait for udev to create device node for new md arrays. (#1036014) (dlehman) +- Fix detection of thin pool with non-standard segment types. (#1022810) + (dlehman) +- NFSDevice does not accept the exists kwarg. (#1063413) (dlehman) +- Don't run mpathconf for disk image installations. (#1066008) (dlehman) +- If /etc/os-release exists, check it to identify an installed system. + (clumens) +- Get the unit tests into a runnable state. (dlehman) +- Update Source URL in spec file to use github. (dlehman) + +* Tue Feb 11 2014 Brian C. Lane - 0.41-1 +- ntfs _getSize needs to use Decimal (#1063077) (bcl) +- Separate sanityCheck-ing from doAutoPartition (#1060255) (amulhern) +- Change messages to SanityExceptions objects (#1060255) (amulhern) +- Make a small SanityException hierarchy (#1060255) (amulhern) +- Remove unused exception class (#1060255) (amulhern) +- Add another .decode("utf-8") to humanReadable (#1059807) (dshea) +- makebumpver: Any failure should cancel the bump (bcl) + +* Tue Feb 04 2014 Brian C. Lane - 0.40-1 +- makebumpver: Only remove from list if action is not Resolves (bcl) +- Update bumpver to allow Related bugs (bcl) +- Remove all dependent devices of san device becoming multipath (#1058939) + (rvykydal) +- When repopulating multipath members mark them as multipath (#1056024) + (rvykydal) +- fcoe: parse yet another sysfs structure for bnx2fc devices (#903122) + (rvykydal) +- fcoe: add fcoe=: to boot options for nics added manually (#1040215) + (rvykydal) +- Convert the ntfs minsize to an int (#1060031) (dshea) +- Convert the string representation of Size to a str type. (#1060382) (dshea) +- don't display stage2 missing error as well if the real problem is stage1 + (awilliam) +- Provide a mechanism for platform-specific error messages for stage1 failure + (awilliam) +- Don't add None value to req_disks (#981316) (amulhern) +- Make error message more informative (#1022497) (amulhern) +- Check that file that loop device is going to use exists (#982164) (amulhern) +- Use os.path.isabs to check whether path name is absolute (#994488) (amulhern) + +* Tue Jan 28 2014 Brian C. Lane - 0.39-1 +- escrow: make sure the output directory exists (#1026653) (wwoods) +- provide a more useful error message if user fails to create an ESP (awilliam) +- Tell lvcreate not to ask us any questions and do its job. (#1057066) + (dlehman) + +* Fri Jan 24 2014 Brian C. Lane - 0.38-1 +- Some simple tests for _verifyLUKSDevicesHaveKey (#1023442) (amulhern) +- Verify that LUKS devices have some encryption key (#1023442) (amulhern) + +* Wed Jan 22 2014 Brian C. Lane - 0.37-1 +- Only do SELinux context resets if in installer mode (#1038146) (amulhern) +- Look up SELinux context for lost+found where it is needed (#1038146) + (amulhern) +- Don't reset the SELinux context before the filesystem is mounted (#1038146) + (amulhern) +- Test setting selinux context on lost+found (#1038146) (amulhern) +- Only retrieve the unit specifier once (dshea) +- Fix the Device.id usage. (dshea) +- Accept both English and localized sizes in Size specs. (dshea) +- Use a namedtuple to store information on unit prefixes (dshea) +- Remove en_spec Size parameters. (dshea) +- Fix potential traceback in devicetree.populate. (#1055523) (dlehman) +- Fall back on relabeling app where available (#1038590) (amulhern) +- Change the meaning of label field values (#1038590) (amulhern) +- Enable labeling on NTFS filesystem (#1038590) (amulhern) +- Enable labeling on HFS filesystem (#1038590) (amulhern) +- Add a method that indicates ability to relabel (#1038590) (amulhern) +- Use filesystem creation app to set filesystem label (#1038590) (amulhern) +- Import errors so FSError name is resolved (#1038590) (amulhern) +- Remove BTRFS._getFormatOptions (#1038590) (amulhern) +- Make an additional class for labeling abstractions (#1038590) (amulhern) +- Fix copyright date (#1038590) (amulhern) +- Remove redundant _defaultFormatOptions field (#1038590) (amulhern) +- Remove code about unsetting a label (#1038590) (amulhern) +- Return None if the filesystem has no label (#1038590) (amulhern) +- Removed redundant check for existance of filesystem (#1038590) (amulhern) +- Have writeLabel throw a more informative exception (#1038590) (amulhern) + +* Fri Jan 17 2014 Brian C. Lane - 0.36-1 +- Update the TODO list. (dlehman) +- Multipath, fwraid members need not be in exclusiveDisks. (#1032919) (dlehman) +- Convert parted getLength values to Size (dshea) +- Last of the Device._id -> Device.id (bcl) +- iscsi: in installer automatically log into firmware iscsi targets (#1034291) + (rvykydal) +- Use isinstance for testing numeric types (vpodzime) +- Device._id -> Device.id (clumens) +- Allow resetting partition size to current on-disk size. (#1040352) (dlehman) + +* Fri Jan 10 2014 Brian C. Lane - 0.35-1 +- Convert everything to use Size. (dlehman) +- Allow negative sizes. (dlehman) +- Fix return value of Size.convertTo with a spec of bytes. (dlehman) +- Discard partial bytes in Size constructor. (dlehman) +- Prefer binary prefixes since everything is really based on them. (dlehman) +- Fix a few minor problems introduced by recent raid level changes. (dlehman) +- Move label setter and getter into DeviceFormat class (#1038590) (amulhern) +- Add a test for labeling swap devices (#1038590) (amulhern) +- Default to None to mean none, rather than empty string (#1038590) (amulhern) +- Add a labelFormatOK method to the DeviceFormat's interface (#1038590) + (amulhern) +- Indicate whether the filesystem can label (#1038590) (amulhern) +- Restore ability to write an empty label where possible (#1038590) (amulhern) +- More tests to check writing and reading labels (#1038590) (amulhern) +- Remove fsConfigFromFile (#1038590) (amulhern) +- Changes to the handling of filesystem labeling (#1038590) (amulhern) +- Add some simple tests for file formats. (amulhern) +- Give DeviceFormat objects an id (#1043763) (amulhern) +- Refactor to use ObjectID class (#1043763) (amulhern) +- Make a class that creates a unique-per-class id for objects (#1043763) + (amulhern) +- Revert "Make a class that creates a unique-per-class id for objects + (#1043763)" (amulhern) +- Revert "Give DeviceFormat objects an object_id (#1043763)" (amulhern) +- Make the maximum end sector for PReP boot more benevolent (#1029893) + (vpodzime) +- Give DeviceFormat objects an object_id (#1043763) (amulhern) +- Make a class that creates a unique-per-class id for objects (#1043763) + (amulhern) +- Make get_device_format_class return None if class not found (#1043763) + (amulhern) +- A few simple unit tests for some formats methods (#1043763) (amulhern) +- Don't translate format names (dshea) + +* Thu Dec 19 2013 Brian C. Lane - 0.34-1 +- Forget existing partitions of device becoming a multipath member (#1043444) + (rvykydal) +- Include blivet.devicelibs.raid in the generated documentation. (amulhern) +- Upgrade the comments in raid.py to be compatible with sphinx. (amulhern) +- Make space for LUKS metadata if creating encrypted device (#1038847) + (vpodzime) +- fcoe: give error message in case of fail when adding device (#903122) + (rvykydal) +- fcoe: adapt bnx2fc detection to changed sysfs path structure (#903122) + (rvykydal) +- Update format of iscsi device becoming multipath member (#1039086) (rvykydal) + +* Tue Dec 17 2013 Brian C. Lane - 0.33-1 +- Add initial 64-bit ARM (aarch64) support (#1034435) (dmarlin) +- Convert to sphinx docstrings. (dlehman) +- Add some documentation. (dlehman) +- Move getActiveMounts from Blivet into DeviceTree. (dlehman) +- Add an example of creating lvs using growable requests. (dlehman) +- Remove a whole bunch of unused stuff from Blivet. (dlehman) +- Remove usage of float in Size.humanReadable. (dlehman) +- Add missing abbreviations for binary size units. (dlehman) +- Fix shouldClear for devices with protected descendants. (#902417) (dlehman) +- Use // division so that it continues to be floor division in Python 3. + (amulhern) + +* Thu Dec 12 2013 Brian C. Lane - 0.32-1 +- Work on devicelibs.btrfs methods that require that the device be mounted. + (amulhern) +- Remove some methods from devicelibs.btrfs. (amulhern) +- Add a comment to btrfs.create_volume. (amulhern) +- Add a file to run btrfs tests. (amulhern) +- Remove format.luks.LUKS.removeKeyFromFile. (amulhern) +- Changes to devicelibs.mdraid.mdactivate. (amulhern) +- Restore an import removed in a previous commit. (amulhern) +- Add a PE for LUKS metadata (#1038969) (bcl) +- Adjust currentSize methods slightly. (amulhern) +- Put additional constraints on the ActionResizeDevice initializer. (amulhern) +- Remove redundant checks in existing resize() methods. (amulhern) +- Add some baseline unit tests for BTRFS devices. (amulhern) +- Robustify use of defaultSubVolumeID field. (amulhern) +- Check that a BTRFS subvolume has exactly one parent in constructor. + (amulhern) +- BTRFSSubVolume.volume checks the class of its return value. (amulhern) +- Raise ValueError in BTRFS constructor if no parents specified. (amulhern) +- Add tests for a couple of additional properties for MDRaidArrayDevice. + (amulhern) +- Factor state testing behavior into a separate class. (amulhern) +- Remove redundant condition in if statement. (amulhern) + +* Thu Dec 05 2013 Brian C. Lane - 0.31-1 +- Make RAIDLevel an abstract class using abc. (amulhern) +- Restore a util import that was removed in a recent commit. (amulhern) + +* Wed Dec 04 2013 Brian C. Lane - 0.30-1 +- Always run action's cancel method as part of cancelAction. (dlehman) +- Show Invalid Disk Label for damaged GPT (#1020974) (bcl) +- Make error message in setDefaultFSType more informative (#1019766) (amulhern) +- Set sysfsPath of LUKSDevice when adding to device tree (#1019638) (jsafrane) +- Use given format type as format's name instead of type (vpodzime) + +* Wed Nov 27 2013 Brian C. Lane - 0.29-1 +- btrfs and xfs do not support fsck or dump at boot time (#862871) (bcl) +- Removed raid level constants from mdraid.py. (amulhern) +- Remove raidLevel and get_raid_min_members for mdraid.py. (amulhern) +- Remove raidLevelString in raid and mdraid. (amulhern) +- In devicefactory.py change mdraid procedures call to raid method calls. + (amulhern) +- Removed mdraid.raid_levels (amulhern) +- Removed mdraid.get_raid_max_spares. (amulhern) +- Change MDRaidArrayDevice to use raid package. (amulhern) +- Changed devicelibs.mdraid to make use of devicelibs.raid. (amulhern) +- Implement a RAID class hierarchy. (amulhern) +- A few small tests for MDFactory class. (amulhern) +- Add some additional unit tests in mdraid_tests.py. (amulhern) +- Make MDRaidArrayDevice initializer not except raid level of None. (amulhern) +- Add some basic unit tests for MDRaidArrayDevice. (amulhern) +- Move pyanaconda import into blivet.enable_installer_mode. (amulhern) + +* Mon Nov 25 2013 David Lehman - 0.28-1 +- Clear whole-disk formatting before initializing disks. (#1032380) (dlehman) +- Simplify calculation of vol size when adding a btrfs subvol. (#1033356) + (dlehman) +- Handle passing a btrfs volume as device to BTRFSFactory. (dlehman) +- Add support for detecting btrfs default subvolume. (dlehman) +- Handle nested btrfs subvolumes correctly. (#1016959) (dlehman) +- Mark all format names as translatable (dshea) +- Add parameters for untranslated Size specs. (dshea) +- Fix usage of _ vs N_ (dshea) +- Added a i18n module for gettext functions. (dshea) +- Allow non-ASCII characters in the size spec (dshea) + +* Tue Nov 19 2013 David Lehman - 0.27-1 +- Specify btrfs volumes by UUID in /etc/fstab. (dlehman) +- Catch any exception raised by findExistingInstallations. (#980267) (dlehman) +- Prevent md_node_from_name from raising OSError. (#980267) (dlehman) +- Tidy up tests in devicelibs_test directory. (amulhern) +- Preparation for lv resize is a subset of that for lv destroy. (#1027682) + (dlehman) +- Make sure new values of targetSize are within bounds. (dlehman) +- Devices with non-existent formatting are resizable. (#1027714) (dlehman) +- Do not hide non-existent devices. (#1027846) (dlehman) +- Change XFS maximum to 16EB (#1016035) (bcl) +- Add tmpfs support (#918621) (mkolman) +- Add support for returning machine word length (mkolman) +- Require cryptsetup instead of cryptsetup-luks (#969597) (amulhern) +- Fix initialization of disks containing sun or mac disklabels. (dlehman) +- Newly formatted devices are used unless mountpoint is empty. (#966078) + (dlehman) +- Fix detection of lvm setups. (#1026466) (dlehman) +- Fix handling of overcommitted thin pools in thinp factory. (#1024144) + (dlehman) +- Fix name checking for new thin lvs. (#1024076) (dlehman) + +* Wed Oct 30 2013 Brian C. Lane - 0.26-1 +- Add macefi format type (#1010495) (bcl) +- Allow hfs+ boot devices to have their name set (#1010495) (bcl) +- Update parted partitions on hidden disks when copying a Blivet. (#1023556) + (dlehman) +- Add ack flag checking to makebumpver (bcl) +- Add makebumpver script (bcl) + +* Fri Oct 25 2013 Brian C. Lane - 0.25-1 +- Remove requirement for btrfsctl which no longer exists. (#1012504) (dlehman) +- Allow for adjustment of factory vg after removal of thin pool. (#1021890) (dlehman) +- Add boot description for "disk" devices on s390. (#867777, #903237, #960143) (sbueno+anaconda) +- Add initial spport for aarch64 as we only plan to support UEFI this should be enough (dennis) + +* Wed Oct 16 2013 David Lehman - 0.24-1 +- Close file descriptors other than stdin,stdout,stderr on exec. (#1016467) (dlehman) +- Don't use hardcoded /tmp paths. (#1004404) (dlehman) +- Fix detection of lvm thinp setups. (#1013800) (dlehman) +- Generate a name if necessary when reconfiguring a factory device. (#1019500) (dlehman) +- Handle anaconda's cmdline option to disable mpath friendly names. (#977815) (dlehman) +- Allow specifying which swaps should appear in fstab (vpodzime) +- Do not limit swap size to 10 % of disk space for hibernation (vpodzime) + +* Wed Oct 09 2013 Brian C. Lane - 0.23-1 +- Make sure bootloader is setup after autopart (#1015277) (bcl) +- Let setUpBootLoader raise BootloaderError (#1015277) (bcl) +- Limit the maximum swap size to 10 % of disk space (if given) (vpodzime) +- support ppc64le architecture (hamzy) +- Don't call handleUdevDeviceFormat without udev device (#1009809) (dshea) + +* Fri Sep 06 2013 David Lehman - 0.22-1 +- Allow implicit inclusion of multipath/fwraid by including all members. (dlehman) +- If a device has been removed, omit it from the copied root. (#1004572) (dlehman) +- Thinp metadata and chunk size default to 0 -- not None. (#1004718) (dlehman) +- Revert "Do not try to align partitions to optimal_io_size. (#989333)" (dlehman) + +* Thu Sep 05 2013 Brian C. Lane - 0.21-1 +- Only force luks map names to include UUID during OS installation. (#996457) (dlehman) +- Allow DiskLabelCommitError to reach the caller. (#1001586) (dlehman) +- Do not try to align partitions to optimal_io_size. (#989333) (gustavold) +- Fix rpmlog make target (bcl) +- Add missing changelog lines to spec (bcl) + +* Fri Aug 23 2013 Brian C. Lane - 0.20-1 +- Fix typo in examples/list_devices.py (dlehman) +- Use iscsi-iname instead of trying to reimplemnt it in python. (dlehman) +- Catch exceptions raised while finding old installations. (#981991) (dlehman) +- Keep the dasd list in sync with the devicetree's device list. (#965694) (dlehman) +- Don't save luks keys unless installer_mode flag is set. (#996118) (dlehman) +- Pass mount options to resolveDevice in _parseOneLine (#950206) (vpodzime) +- Fix handling of devices in detected installations in Blivet.copy. (dlehman) +- Clean up detection of lvm raid. (dlehman) +- Tag the first build of each version without the release. (dlehman) +- Remove dangling code block from commit 737169b75af1. (dlehman) + +* Wed Jul 31 2013 Brian C. Lane - 0.19-1 +- Don't waste time looking for devices dependent on leaf devices. (dlehman) +- Add some example code for creation of disk partitions. (dlehman) +- Don't manipulate partition boot flags except in installer mode. (dlehman) +- Add an example of DeviceFactory usage. (dlehman) +- Cosmetic changes for the arch module (vpodzime) +- No more sparc support (vpodzime) +- Cleanup arch.py reredux (hamzy) +- Allow explicit requests for extended partitions. (#891861) (dlehman) +- Fix disklabel handling for multiple calls to processActions. (dlehman) +- Add support for explicit start/end sectors in partition requests. (#881025) (dlehman) +- Store current mount options in getActiveMounts. (#914898) (dlehman) +- Lack of formatting does not preclude device resize. (dlehman) +- Handle negative sizes correctly. (dlehman) +- Fix handling of clearpart type linux in shouldClear. (dlehman) +- Add some tests for clearpart and related functionality. (dlehman) +- Update unit tests and add a make target to run them. (dlehman) +- Don't pass dracut args for lvm thin pools. (dlehman) +- Update the TODO list. (dlehman) +- Fix a copy/paste error. (dlehman) +- Remove transifex-client BuildRequires. (dlehman) + +* Tue Jul 09 2013 Brian C. Lane - 0.18-1 +- Raise XFS max size limit to 100TB. (sbueno+anaconda) +- Add a device factory class for thinly-provisioned lvm. (dlehman) +- Add support for automatic partitioning using lvm thin provisioning. (dlehman) +- Add convenience methods related to lvm thin provisioning. (dlehman) +- Add support for detection of lvm thinp setups. (dlehman) +- Add classes for lvm thin pool and thin volume. (dlehman) +- Add backend support for lvm thinp operations. (dlehman) +- Fix return value of get_pv_space for size of 0. (dlehman) +- Fix ksdata for lvm created in custom spoke based on autopart. (dlehman) +- Only put max size in ksdata if partition is growable. (dlehman) +- Allow subclasses to inherit ksdata classes. (dlehman) + +* Mon Jun 24 2013 Brian C. Lane - 0.17-1 +- Used Python type instead of variable name (#968122) (hamzy) +- Fix detection of valid EFI system partition during autopart. (dlehman) +- New version: 0.16 (bcl) + +* Thu Jun 13 2013 Brian C. Lane - 0.16-1 +- Install utilities for all devices -- not just those being used. (#964586) (dlehman) +- Add a method to apply Blivet settings to ksdata. (dlehman) +- Increase padding for md metadata in lvm factory. (#966795) (dlehman) +- Move lvm-on-md into LVMFactory. (dlehman) +- Switch to a minimum of four members for raid10. (#888879) (dlehman) +- Update the TODO list. (dlehman) +- Deactivate devices before hiding those on ignored disks. (#965213) (dlehman) +- Allow udev queue to settle after writing zeros to disk. (#969182) (hamzy) +- Run lsof when umount fails (bcl) +- Run udev settle before umount (bcl) + +* Mon Jun 03 2013 Brian C. Lane - 0.15-1 +- Switch to the LGPLv2+. (dlehman) +- Clear md arrays' sysfs path after deactivating them. (#954062) (dlehman) +- Factories with existing containers use the container's disk set. (dlehman) +- Don't set up a child factory if the container is set and exists. (dlehman) +- Set a non-zero size for new btrfs subvols in an existing volume. (dlehman) +- Open as many luks devs as possible with any given passphrase. (#965754) (dlehman) +- Make sure container changes worked before applying device changes. (#965805) (dlehman) +- Re-initialize platform in storageInitialize (#962104) (bcl) +- Make a copy of devicetree._devices before using the append operator. (clumens) +- Handle incomplete devices becoming complete on device rescan. (clumens) +- Don't allow a device to be on the hidden list more than once. (clumens) + +* Wed May 15 2013 David Lehman - 0.14-1 +- total_memory calculation needs to round up (#962231) (bcl) +- The dev.node attribute for iscsi devices is not copyable (#962865). (clumens) +- Wipe partitions before they are created (#950145) (bcl) +- Pass ROOT_PATH as an argument instead of importing it. (clumens) +- If no iscsi nodes are discovered, return an empty list instead of None. (clumens) + +* Thu May 09 2013 Brian C. Lane - 0.13-1 +- Make sure createBitmap is updated when level changes (#960271) (bcl) +- Update biosboot error message (#960691) (bcl) + +* Fri May 03 2013 David Lehman - 0.12-1 +- Fix a bug in renaming lvm lvs. (dlehman) +- Add container size policies for unlimited growth and fixed size. (dlehman) +- Remove device factory methods to change container name. (dlehman) +- Override any default subvol when mounting main btrfs volume. (#921757) (dlehman) +- Fix detection of multipath. (#955664) (dlehman) +- When a btrfs subvol's name is changed, change its subvol argument too. (clumens) +- Allow returning hidden disks from the getDeviceBy* methods, if asked. (clumens) +- Fix fipvlan -f argument once more and for good (#836321) (rvykydal) +- Remove the intf parameters from the iscsi class. (clumens) +- Don't relly on /proc/mdstat when enumeraing RAID levels. (jsafrane) +- Set product names in non-installer mode. (jsafrane) +- Fixed checking status of MD RAID which was just deleted. (jsafrane) +- Account for the fact that md's metadata usage is unpredictable. (dlehman) +- Remove members from their containers before destroying them. (dlehman) +- Make get_container work even if there are duplicate names. (dlehman) +- LVMFactory with a container_raid_level means use LVMOnMDFactory. (dlehman) +- Add a check for enough raid members after allocating partitions. (dlehman) +- Make parent_factory an attribute of the DeviceFactory instance. (dlehman) +- All container settings use container_ kwargs. (dlehman) +- Add ability to find raid level of an lvm vg. (dlehman) +- Always pass -f to wipefs since it lies about in-use devices. (#953329) (dlehman) +- Fix a bug extended partition management. (#951765) (dlehman) +- Don't return incomplete devices from getDeviceByFoo methods by default. (dlehman) +- Don't traceback when degraded md raid arrays are present. (#953184) (dlehman) + +* Mon Apr 15 2013 David Lehman - 0.11-1 +- Fix handling of isohybrid media. (#950510) (dlehman) +- Fix getting dracut setup args from dasd.conf. (#950964) (dlehman) + +* Tue Apr 09 2013 David Lehman - 0.10-1 +- Extended partitions containing logical partitions are not leaves. (#949912) (dlehman) +- Remove devices in reverse order in Blivet.recursiveRemove. (#949912) (dlehman) +- Rewrite the DeviceFactory classes. (dlehman) +- Hook up error handling in installer-specific methods. (#948250) (dlehman) +- Don't traceback if fcoe.startup is called without fcoe utils present. (dlehman) +- Fix logic error that causes us to ignore disks in exclusiveDisks. (dlehman) +- Slightly improve currentSize for btrfs volumes. (dlehman) +- Simplify multipath handling. (dlehman) +- Don't expect anaconda udev rules to be in use. (dlehman) +- Drop requires for things only needed for OS installation. (dlehman) +- New version: 0.9 (bcl) +- Only install packages for devices and filesystems used by the OS. (dlehman) +- Fix LVMLogicalVolumeDevice.maxSize. (dlehman) +- Fix handling of name=None in newLV, newMDArray, newVG. (dlehman) +- Allow calls to suggestDeviceName with only a prefix argument. (dlehman) +- Move mdadm superblock size calculation into devicelibs.mdraid. (dlehman) + +* Thu Mar 28 2013 Brian C. Lane - 0.9-1 +- NTFS.minSize is supposed to be a property. (#924410) (dlehman) +- Mount /run during install and fix /sys mount (#922988) (bcl) +- Fix two excptions triggered by calls to copy_to_system. (hamzy) + +* Wed Mar 13 2013 David Lehman - 0.8-1 +- Check for "ip=ibft" cmdline option, not for "ibft". (rvykydal) +- run_program returns an int. (#920584) (dlehman) +- Fix units for lvs output. (dlehman) +- Don't pass an intf arg to ISCSI.stabilize. (#920041) (dlehman) +- Add __version__ to blivet/__init__.py. (dlehman) +- Only run info prog (eg: dumpe2fs) once per filesystem. (dlehman) +- Processing of a PV with no VG metadata is easy. (dlehman) +- Add some convenience properties for displaying DeviceAction info. (dlehman) +- Ignore MTDs, as we do not have the tools to write to them (#916771). (clumens) +- Include udev's list of symbolic links in StorageDevice. (#914724) (dlehman) +- Set a DeviceFormat instance's type attribute to the requested type. (dlehman) +- Allow size specs that do not include a 'b' or 'B'. (#888851) (dlehman) +- Fix reference to 'factory' from within DeviceFactory class. (dlehman) +- Fix problems detecting lvm and md devices. (#914730) (dlehman) +- Allow passing size=None to device factories for unbounded growth. (dlehman) +- Provide a way to set the default fstype for a Blivet instance. (#838145) (dlehman) +- Allow changing the size of encrypted devices via DeviceFactory. (#913169) (dlehman) +- Don't dump storage state except in installer mode. (dlehman) +- Fix device resolution for btrfs. (dlehman) +- Fix device resolution to find named md devices. (dlehman) +- Account for active mounts in normal mode. (#914898) (dlehman) +- Add an example script which lists all devices. (dlehman) +- Add scripts/makeupdates script (bcl) + +* Thu Feb 21 2013 Brian C. Lane - 0.7-1 +- Merge branch 'master' of git+ssh://git.fedorahosted.org/git/blivet (bcl) +- Bring in productName from pyanaconda in installer mode. (#913559) (dlehman) + +* Wed Feb 20 2013 Brian C. Lane - 0.6-1 +- parse buffer output from resize (#913141) (bcl) +- prevent traceback when root device is not defined #rhbz883768 (sbueno+anaconda) +- Move empty_disk to a top-level function, and rename. (clumens) +- Add some high-level comments to DeviceFactory.configure_device. (dlehman) +- Refactor DeviceFactory.set_container_members for clarity. (dlehman) +- Rename the main blivet logger from "storage" to "blivet". (dlehman) +- Use the blivet domain for translations. (dlehman) +- Move DeviceFactory classes and related code into a new file. (dlehman) +- New version: 0.5 (dlehman) + +* Fri Feb 08 2013 David Lehman - 0.5-1 +- Add mountOnly to turnOnFilesystems (bcl) +- Update lvm scanning to account for new ignored device handling. (dlehman) +- Scan in all devices and then hide those that use ignored disks. (dlehman) +- Adjust child counts correctly when unhiding a device. (dlehman) +- Generate lvm config args each time they're needed/used. (dlehman) +- Add ability to grab 70-anaconda.rules udev data directly. (dlehman) +- Add support for active luks mappings at populate time. (dlehman) +- Don't require nss, required only for escrow key support. (dlehman) +- Update the TODO list. (dlehman) +- Add missing constant DMI_CHASSIS_VENDOR. (dlehman) +- Allow for multiple calls to DeviceTree.processActions. (#881023,#846573) (dlehman) +- Use CGit snaphot URL for Source in specfile. (dlehman) +- Streamline some logic in storageInitialize. (dlehman) +- Don't re-add deleted or hidden devices during DeviceTree.populate. (dlehman) +- Only run findExistingInstallations and start iscsi, &c in installer mode. (dlehman) +- Do not change device status during populate in normal mode. (#817064) (dlehman) +- Drop old code related to saving clearPartType from pre-f18. (dlehman) +- check for skipping bootloader in doIt (bcl) +- check for stage1 when not installing bootloader (#882065,#895232) (bcl) +- explicitly detect iso9660 on a disk (#903158) (bcl) +- Fix several problems in python-blivet.spec. (dlehman) +- Remove #!/usr/bin/python from tsort.py (dlehman) +- Update COPYING file. (dlehman) +- Add a Requires for dmidecode on x86. (dlehman) + +* Sun Jan 20 2013 David Lehman - 0.4-1 +- Use a two-part version number instead of three. (dlehman) +- Rename the rpm package from blivet to python-blivet. (dlehman) +- Move get_mount_device, get_mount_paths from pyanaconda.packaging to util. (dlehman) +- Update the TODO list. (dlehman) +- Carry over s390 exclusion of fcoe-utils from anaconda. (dlehman) +- Enable translations via transifex. (dlehman) + +* Fri Jan 18 2013 David Lehman - 0.2-1 +- Add Requires: iscsi-initiator-utils, fcoe-utils, device-mapper-multipath. (dlehman) +- Use a threading lock to control program log output. (dlehman) +- Fix reference to data to refer to ksdata in Blivet constructor. (dlehman) +- Remove the loop around proc.communicate in util._run_program. (dlehman) + +* Tue Jan 15 2013 David Lehman 0.2-1 +- Updated source from final pre-split anaconda source. +- Renamed pyanaconda.storage to blivet throughout. +- Updated spec file to include runtime Requires. + +* Fri Jan 04 2013 David Lehman 0.1-1 +- Created package from anaconda storage module.