21 Commits

Author SHA1 Message Date
Zuul
3c91e55886 Merge "Software RAID: Add IPA deploy support" 2019-06-05 19:40:09 +00:00
Arne Wiebalck
8fe390ecdd Software RAID: Add IPA deploy support
This patch proposes to extend the IPA to be able to deploy on
software RAID devices. The IPA needs to be able to detect an
md device, find the underlying holder disks and configure grub
on them.

Change-Id: Ieb2c95ff130b5cc1e643fcde500066d9458ddbec
Story: #2004581
Task: #29102
2019-06-04 12:43:09 +02:00
Derek Higgins
9c35f02792 Bind mount /run into chroot when installing grub
grub-mkconfig runs a lvs command that attempts to access /run/lvm
once for each block device, currently it times out after 10 seconds
for each device and moves on. Multiple 10 second delays become
a problem (causing IPA API timeouts) when multiple block devices
are present. Bind mounting in /run avoids the delay and the
timeouts.

Task: 30616
Story: 2005507

Change-Id: Iae8b7808a35bff121f64971aadd4bd36b5f5bb71
2019-04-25 23:53:19 +01:00
Zuul
667589bb00 Merge "fall back to PARTUUID if UUID not found." 2018-08-03 15:40:51 +00:00
Matthew Thode
7e0bcbbeee fall back to PARTUUID if UUID not found.
Change-Id: Icbf1fd8179658bd8bcd15f99aaaee796288dbf6f
Story: 2002052
Task: 19714
2018-07-31 13:01:33 -07:00
Michael Turek
b32750f5c4 Install grub to PReP partition when prep_boot_part_uuid is provided
Installs the grub bootloader to the PreP Boot partition when the
prep_boot_partition_uuid is provided. This is required when
booting a partition image locally on ppc64* systems.

This change also passes the cpu_arch along to work_on_disk so
that the PReP partition is created when partitioning disks for
local boot on ppc64* systems,

Change-Id: I70667d43af962b357e6eeccba258f4fa5a91a09e
Depends-On: I2bc9f13ec605de7b7b96d96a1a4edebee0af76dc
Story: #1749057
Task: #22999
2018-07-20 16:07:16 +00:00
Dmitry Tantsur
db4694de24 Do not try unmounting the EFI partition if it was not mounted
If mounting the root partition fails for some reason, we try to unmount
the EFI partition, which is not mounted at this point. This results in
a new exception hiding the real failure. This change fixes it.

Change-Id: I0ec636a361eda71b4149e4a7ba1538a9bbf6ec34
Closes-Bug: #1732932
2017-12-14 19:52:53 -05:00
Vasyl Saienko
db5272cfea Remove hard-coded path to grub binaries
Use PATH variable to find grub binaries.

Closes-Bug: 1717255

Change-Id: Ic6a2bafdc87e33c4e1c4534fa355f995c824b945
2017-09-25 09:30:58 +03:00
Jenkins
7680625994 Merge "Use sh instead of bash when installing grub" 2017-01-18 10:27:56 +00:00
Pavlo Shchelokovskyy
a5370d52cd Use sh instead of bash when installing grub
there is no guarantee that 'bash' is present in a user's image,
while 'sh' as system shell must be there.
As we do not use any bash-specific syntax (just starting commands in a
subshell) when installing the bootloader from chroot-ed user image,
let's be more supportive and use 'sh' instead of 'bash' for that.

Change-Id: I1fb82068b9c55da35166d8d2ecf9f0ba41356adb
Closes-Bug: #1657096
2017-01-17 13:57:49 +02:00
Cao Xuan Hoang
6997907b07 Removes unnecessary utf-8 encoding
The following files added utf-8 encoding but never used. So we can
removes them at all.

ironic_python_agent/extensions/image.py
ironic_python_agent/extensions/iscsi.py
ironic_python_agent/tests/unit/extensions/test_image.py
ironic_python_agent/tests/unit/extensions/test_iscsi.py

Change-Id: Ifc98faf025ee81f885ea58d9203037c6357ea7f2
2017-01-16 08:25:10 +07:00
John L. Villalovos
0b8763e332 Update to hacking 0.12.0 and use new checks
Use hacking 0.12.0

Use the new checks that are available:
    [H106] Don’t put vim configuration in source files.
    [H203] Use assertIs(Not)None to check for None.
    [H904] Delay string interpolations at logging calls.

Fix code so tests pass.

Change-Id: If22ad272c332f30624ce10861408d377908b152b
Depends-On: I2aa44b62f900d4dfd67701b01eadd0523fbfaf07
2016-11-08 11:31:18 -08:00
Derek Higgins
cc5556d06b Install grub in the EFI "Fallback path"
In systems where the nvram may have been reset, add
\EFI\BOOT\BOOTx64.EFI to the EFI system partition so that
the image continues to boot. This will be particularly useful
if the NVRAM wasn't written correctly or if the baremetal
server is be simulated on virt and the NVRAM was been reset
on start (as is the case in libvirt).

Change-Id: I5005ae02c283cdc01540ea46c341a7b0bf9d4c42
Closes-Bug: #1632637
2016-10-20 13:50:02 +00:00
Nisha Agarwal
bb605784dd Fixes programmatic error in _install_grub()
The patch defines the variables before they are used in the
code.

Closes-bug: 1555547
Change-Id: I27c5e926cf4001211c4edd794a09b26559c63f71
2016-03-11 21:09:37 +00:00
Dmitry Tantsur
4cd64e28aa Delete the Linux-IO target before setting up local boot
Otherwise it fails with "device already mounted".

Change-Id: If959ba5a10e97f84be2f7498bed7589d13fa30c2
Closes-Bug: #1526304
2015-12-15 15:20:03 +01:00
Dan Prince
ebd7b076a5 Use mount -t sysfs to avoid host /sys dependencies
This patch updates the _install_grub2 function in image.py
so that we use 'mount -t sysfs' instead of bind mounting
the hosts /sys into the chroot.

This resolves issues which can occur with unmounting
the chroot mounts where 'target is busy' errors
may occur when you are debugging things with a serial
console.

Change-Id: I5c9a6546d048cbf54695329d9744fda55127bd30
Closes-bug: #1503385
2015-10-07 03:29:18 +00:00
Joshua Harlow
e9d2bfe580 Three attempts message is incorrect
The code that is covered in this exception block
does not actually retry three times, so it seems better
to have the message not reference that it does.

Change-Id: I0cc19aab65aa9ba4d73a8842390b712f7f63925c
2015-09-02 16:27:43 -07:00
Ghe Rivero
10a3a800e7 Use oslo_log lib
Module 'log' from oslo-incubator was removed after release of oslo_log
library.

Change-Id: Ia00e26071fc0cab4fd3f3334ca94860bc7b1c75c
2015-03-24 08:43:35 +01:00
Ramakrishnan G
ccda38a86e Do udevadm settle after running partx in image extn
This commit adds running 'udevadm settle' after
running partx so that the partition table is re-read
properly by lsblk which follows it.

Closes-bug: 1432918
Change-Id: I1c7dddd3ed8cab175e608e09ecc4ae7f289cfc31
2015-03-23 02:06:24 -07:00
Ramakrishnan G
ac4e9901d6 Add uefi support in image extension
This commit adds support for uefi systems in the image
extension so that grub can be installed onto efi system
partition for uefi machines.

Implements: blueprint local-boot-support-with-partition-images
Change-Id: I8fbb4b2ebdff991d41c7b618a4d654af26311a56
2015-03-17 18:21:22 +00:00
Lucas Alvares Gomes
d23e0170de Add the image extension (for local boot)
Initially this extension supports installing a bootloader so the user
image can boot from the local disk.

Change-Id: Ia588aafc240b55119c02f1254addc0cf796f88c5
2015-03-04 16:34:17 +00:00