Skip to content

Commit

Permalink
storage: Set the default LUKS version for interactive partitioning
Browse files Browse the repository at this point in the history
During the interactive partititioning (via the Custom Partitioning GUI screen),
make sure that the LUKS version is set to the default one instead of None.
  • Loading branch information
poncovka committed Jan 5, 2024
1 parent b3b0969 commit e0d9a59
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pyanaconda/modules/storage/partitioning/interactive/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,7 @@ def change_encryption(storage, device, encrypted, luks_version):
return device.raw_device
else:
log.info("Applying encryption to %s.", device.name)
luks_version = luks_version or storage.default_luks_version
new_fmt = get_format("luks", device=device.path, luks_version=luks_version)
storage.format_device(device, new_fmt)
luks_dev = LUKSDevice("luks-" + device.name, parents=[device])
Expand Down Expand Up @@ -778,7 +779,7 @@ def get_device_factory_arguments(storage, request: DeviceFactoryRequest, subset=
"mountpoint": request.mount_point or None,
"fstype": request.format_type or None,
"label": request.label or None,
"luks_version": request.luks_version or None,
"luks_version": request.luks_version or storage.default_luks_version,
"device_name": request.device_name or None,
"size": Size(request.device_size) or None,
"raid_level": get_raid_level_by_name(request.device_raid_level),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ def test_get_device_factory_arguments(self):
"fstype": None,
"label": None,
"encrypted": False,
"luks_version": None,
"luks_version": "luks2",
"raid_level": None,
"container_name": "container1",
"container_size": Size("10 GiB"),
Expand Down

0 comments on commit e0d9a59

Please sign in to comment.