summaryrefslogtreecommitdiffstats
path: root/patches/opnfv-fuel/0019-states-maas-rm-Ubuntu-boot-entry-on-EFI-systems.patch
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-08-24 17:10:33 +0200
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-08-24 17:11:05 +0200
commit8d0731eecbb4c7f78e23c8a7e93004da7593afbe (patch)
tree3cd9b7079a159801ba072f4f26056bd09b6283b9 /patches/opnfv-fuel/0019-states-maas-rm-Ubuntu-boot-entry-on-EFI-systems.patch
parentaa6c72b42783a4226c07e0b7af37434f13dc8c64 (diff)
p/fuel: Rebase after MaaS retry got upstream
Change-Id: I321fcb4aa77ebcb4595a9468c2257fef8b9a8ed6 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'patches/opnfv-fuel/0019-states-maas-rm-Ubuntu-boot-entry-on-EFI-systems.patch')
-rw-r--r--patches/opnfv-fuel/0019-states-maas-rm-Ubuntu-boot-entry-on-EFI-systems.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/patches/opnfv-fuel/0019-states-maas-rm-Ubuntu-boot-entry-on-EFI-systems.patch b/patches/opnfv-fuel/0019-states-maas-rm-Ubuntu-boot-entry-on-EFI-systems.patch
new file mode 100644
index 00000000..792774f3
--- /dev/null
+++ b/patches/opnfv-fuel/0019-states-maas-rm-Ubuntu-boot-entry-on-EFI-systems.patch
@@ -0,0 +1,41 @@
+From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+Date: Thu, 24 Aug 2017 04:09:59 +0200
+Subject: [PATCH] states/maas: rm Ubuntu boot entry on EFI systems
+
+On EFI-enabled systems, grub-install from grub-efi-* package
+installs a boot entry named "ubuntu".
+
+MaaS relies on IPMI to set boot order to PXE first; however
+on systems with buggy firmware or without full IPMI support,
+that fails, leading to booting Ubuntu from hard disk instead.
+
+Work around this by clearing any previous Ubuntu boot entry
+from board flash.
+
+NOTE: This only runs against nodes that are online from a
+previous deploy, and already automatically registered with
+the new Salt master node.
+
+Closes: ARMBAND-47
+
+Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+---
+ mcp/config/states/maas | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/mcp/config/states/maas b/mcp/config/states/maas
+index 14f32ee..b9f3ac6 100755
+--- a/mcp/config/states/maas
++++ b/mcp/config/states/maas
+@@ -44,6 +44,11 @@ function maas_fixup() {
+ return 0
+ }
+
++# UEFI: Clean up Ubuntu boot entry if kvm node online from previous deploy
++salt -C 'kvm* or cmp*' cmd.run "(which efibootmgr > /dev/null 2>&1 && \
++ efibootmgr | grep -oP '(?<=Boot)[0-9]+(?=.*ubuntu)' | \
++ xargs -I{} efibootmgr --delete-bootnum --bootnum {}) || true"
++
+ # MaaS rack/region controller, node commissioning
+ salt -C 'mas01*' cmd.run "add-apt-repository ppa:maas/stable"
+