Skip to content

Commit

Permalink
Merge pull request #252 from stackhpc/upstream/zed-2024-02-26
Browse files Browse the repository at this point in the history
Synchronise zed with upstream
  • Loading branch information
markgoddard committed Feb 26, 2024
2 parents 776903b + a780292 commit f5f4b81
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
12 changes: 9 additions & 3 deletions ansible/roles/wipe-disks/library/blockdevice_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,14 @@
from ansible.module_utils.basic import AnsibleModule

def _has_mounts(device):
if device["mountpoint"]:
return True
try:
if device["mountpoint"]:
return True
# If unmounted, the JSON output contains "mountpoints": [null] so we handle
# the KeyError here.
except KeyError:
if device["mountpoints"][0]:
return True
for child in device.get("children", []):
if _has_mounts(child):
return True
Expand Down Expand Up @@ -69,4 +75,4 @@ def main():


if __name__ == '__main__':
main()
main()
7 changes: 7 additions & 0 deletions releasenotes/notes/wipe-disks-0e72c9c8b7bf7e18.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
fixes:
- |
Fixes the ``wipe-disks`` role which was failing on supported host operating
systems due to a change in the output format of ``lsblk -J`` in
``util-linux`` version ``2.37``. LP#2051859
<https://bugs.launchpad.net/kayobe/+bug/2051859>__

0 comments on commit f5f4b81

Please sign in to comment.