Skip to content

Commit

Permalink
Remove before merging
Browse files Browse the repository at this point in the history
  • Loading branch information
vojtechtrefny committed Sep 19, 2024
1 parent bf09674 commit 89ca297
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions blivet/devicelibs/stratis.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ def create_pool(name, devices, encrypted, passphrase, key_file, clevis):
if encrypted and not (passphrase or key_file):
raise StratisError("Passphrase or key file must be specified for encrypted pool")

print("calling pool create with options:\nname=%s, device=%s, encrypted=%s" % (name, devices, encrypted))

raid_opt = GLib.Variant("(bq)", (False, 0))

if encrypted:
Expand Down
4 changes: 4 additions & 0 deletions blivet/devices/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,10 @@ def update_sysfs_path(self):
try:
udev_device = pyudev.Devices.from_device_file(udev.global_udev,
self.path)
if self.path.startswith("/dev/nvme"):
print("udev info for %s" % self.path)
print(dict(udev_device))
os.system("ls -la /dev/sda*")

# from_device_file() does not process exceptions but just propagates
# any errors that are raised.
Expand Down
4 changes: 3 additions & 1 deletion plans/tests.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@ prepare:

execute:
how: tmt
script: sudo make test
script:
- sudo make test
- cat /tmp/blivet.log
3 changes: 3 additions & 0 deletions tests/storage_tests/devices_test/stratis_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,16 @@ def _clean_up(self):
class StratisTestCase(StratisTestCaseBase):

def test_stratis_basic(self):
print("self.vdevs: %s" % self.vdevs)
disk = self.storage.devicetree.get_device_by_path(self.vdevs[0])
self.assertIsNotNone(disk)
self.storage.initialize_disk(disk)

bd = self.storage.new_partition(size=blivet.size.Size("1 GiB"), fmt_type="stratis",
parents=[disk])
self.storage.create_device(bd)
print("bd: %s" % bd)
print("disk: %s" % disk)

blivet.partitioning.do_partitioning(self.storage)

Expand Down

0 comments on commit 89ca297

Please sign in to comment.