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
(cherry picked from commit 319efe2c2d)
This commit is contained in:
kartikeyaj0 2021-02-16 15:40:50 +05:30 committed by Dmitry Tantsur
parent 0ff572600e
commit d1a365e62f
2 changed files with 8 additions and 1 deletions

View File

@ -586,7 +586,7 @@ def _install_grub2(device, root_uuid, efi_system_part_uuid=None,
'ramdisk was unable to complete the setup. '
'falling back to bootloader installation from'
'deployed image.')
if not os.path.ismount(root_partition):
if not os.path.ismount(path):
LOG.debug('Re-mounting the root partition.')
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.