diff --git a/ironic_python_agent/hardware.py b/ironic_python_agent/hardware.py index 45414c6a1..7d6c16769 100644 --- a/ironic_python_agent/hardware.py +++ b/ironic_python_agent/hardware.py @@ -1051,7 +1051,7 @@ class GenericHardwareManager(HardwareManager): # types of communication media and protocols and effectively used for channel in range(1, 8): out, e = utils.execute( - "ipmitool lan print {} | awk '/IP Address[[:space:]]*:/" + "ipmitool lan print {} | awk '/IP Address[ \\t]*:/" " {{print $4}}'".format(channel), shell=True) if e.startswith("Invalid channel"): continue diff --git a/releasenotes/notes/fix-bmc-ip-detection-for-coreos-483be0286593e393.yaml b/releasenotes/notes/fix-bmc-ip-detection-for-coreos-483be0286593e393.yaml new file mode 100644 index 000000000..1a33130ff --- /dev/null +++ b/releasenotes/notes/fix-bmc-ip-detection-for-coreos-483be0286593e393.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Fixes detection of IPMI address in CoreOS-based images, by ensuring that + parsing of ``ipmitool`` output is compatible with the bundled + implementation of ``awk`` (``mawk``).