diff options
| author | Dmitry Tantsur <dtantsur@protonmail.com> | 2021-03-30 12:21:00 +0200 |
|---|---|---|
| committer | Dmitry Tantsur <dtantsur@protonmail.com> | 2021-03-30 12:25:14 +0200 |
| commit | afcc5d392cab2bf5649ec2bcfdc0cb26090b6a58 (patch) | |
| tree | aeec5f5f90e3f6a7812ce00ab4ea3a19a7ab3eb1 /ironic_python_agent/utils.py | |
| parent | 49d123dd6e32ea1455da1a2f11d6e624d435c308 (diff) | |
| download | ironic-python-agent-afcc5d392cab2bf5649ec2bcfdc0cb26090b6a58.tar.gz | |
Fix incorrect lsblk tag and add a virtual media job
Follow-up to 8dd6589e66d03e45e1d510601da9531a30842cff: PATH is not a
valid lsblk tag, we need to use KNAME with -p flag.
Also add a vmedia job to avoid breakages in the future. It's added
non-voting because we have a deadlock with this change:
https://review.opendev.org/c/openstack/ironic/+/783722
Change-Id: Ifffeac9c1c4d394526d655eaa14c9fe7bd3a1e5e
Diffstat (limited to 'ironic_python_agent/utils.py')
| -rw-r--r-- | ironic_python_agent/utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ironic_python_agent/utils.py b/ironic_python_agent/utils.py index f045a4fe..63d22e76 100644 --- a/ironic_python_agent/utils.py +++ b/ironic_python_agent/utils.py @@ -129,7 +129,7 @@ def _find_vmedia_device_by_labels(labels): """Find device matching any of the provided labels for virtual media""" candidates = [] try: - lsblk_output, _e = execute('lsblk', '-P', '-oPATH,LABEL') + lsblk_output, _e = execute('lsblk', '-p', '-P', '-oKNAME,LABEL') except processutils.ProcessExecutionError as e: _early_log('Was unable to execute the lsblk command. %s', e) return @@ -137,7 +137,7 @@ def _find_vmedia_device_by_labels(labels): for device in ironic_utils.parse_device_tags(lsblk_output): for label in labels: if label.upper() == device['LABEL'].upper(): - candidates.append(device['PATH']) + candidates.append(device['KNAME']) for candidate in candidates: # We explicitly take the device and run it past _check_vmedia_device |
