Fixes local boot for partition images

IPA is not properly checking if the root partition is already
mounted. Device is being passed to os.path.ismount() instead
of the mount point.

Story: 2008631
Task: 41839
Change-Id: I37a6e7e6bbe0bbbb0317c6e55bb822dafe7cce20
This commit is contained in:
kartikeyaj0 2021-02-16 15:40:50 +05:30
parent a35761c21f
commit 319efe2c2d
2 changed files with 8 additions and 1 deletions

View File

@ -593,7 +593,7 @@ def _install_grub2(device, root_uuid, efi_system_part_uuid=None,
'ramdisk was unable to complete the setup. ' 'ramdisk was unable to complete the setup. '
'falling back to bootloader installation from' 'falling back to bootloader installation from'
'deployed image.') 'deployed image.')
if not os.path.ismount(root_partition): if not os.path.ismount(path):
LOG.debug('Re-mounting the root partition.') LOG.debug('Re-mounting the root partition.')
utils.execute('mount', root_partition, path) utils.execute('mount', root_partition, path)

View File

@ -0,0 +1,7 @@
---
fixes:
- |
IPA now properly checks if the root partition is already mounted.
See `Story 2008631
<https://storyboard.openstack.org/#!/story/2008631>`_
for details.