From f6522d9deff1e02ac34a094e66f24d2c35d3092c Mon Sep 17 00:00:00 2001 From: Tim Small Date: Wed, 6 May 2020 11:56:59 +0100 Subject: Use canonical device name (e.g. for /dev/disk/by-path/ etc.). Previously, symbolic links to device files were not recognised, and so could not be used with the --output switch (unless an additional kpartx step was also used). --- vmdb/plugins/mkpart_plugin.py | 1 + 1 file changed, 1 insertion(+) diff --git a/vmdb/plugins/mkpart_plugin.py b/vmdb/plugins/mkpart_plugin.py index bf33694..6b0a602 100644 --- a/vmdb/plugins/mkpart_plugin.py +++ b/vmdb/plugins/mkpart_plugin.py @@ -53,6 +53,7 @@ class MkpartStepRunner(vmdb.StepRunnerInterface): tag = values['tag'] or values['part-tag'] or None fs_type = values['fs-type'] + device = os.path.realpath(device) orig = self.list_partitions(device) vmdb.runcmd(['parted', '-s', device, 'mkpart', part_type, fs_type, start, end]) new = self.list_partitions(device) -- cgit v1.2.1