aboutsummaryrefslogtreecommitdiffstats
path: root/patches
diff options
context:
space:
mode:
Diffstat (limited to 'patches')
-rw-r--r--patches/fuel-astute/0001-Erase-EFI-boot-entry-on-EFI-systems.patch43
-rw-r--r--patches/fuel-library/0016-compute-Fix-virtlogd-not-started-after-install.patch33
-rw-r--r--patches/opnfv-fuel/0002-deploy-Delete-old-Fuel-env-if-present.patch58
3 files changed, 134 insertions, 0 deletions
diff --git a/patches/fuel-astute/0001-Erase-EFI-boot-entry-on-EFI-systems.patch b/patches/fuel-astute/0001-Erase-EFI-boot-entry-on-EFI-systems.patch
new file mode 100644
index 00000000..905834df
--- /dev/null
+++ b/patches/fuel-astute/0001-Erase-EFI-boot-entry-on-EFI-systems.patch
@@ -0,0 +1,43 @@
+From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+Date: Mon, 18 Jul 2016 16:02:20 +0200
+Subject: [PATCH] Erase EFI boot entry on EFI systems.
+
+On EFI-enabled systemd, grub-install from grub-efi-* package
+installs a boot entry named "ubuntu".
+
+Since this boot entry is saved in board flash memory, erasing
+the MBR bootloader code and/or partition signature will not
+clear the ubuntu boot entry, leaving it pointing to a loader
+on the ESP (EFI System Partition) that will try to load the
+kernel/initrd from an erased partition.
+
+In Fuel 8.0, the whole disk was erased, so the ubuntu EFI boot
+entry was skipped due to missing ESP, while for Fuel 9.0 and
+above we have to explicitly remove it to keep the system in a
+sane state.
+
+Note: efibootmgr is installed automatically on EFI systems
+as a dependency of grub-efi-*.
+
+Closes: ARMBAND-47
+
+Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+---
+ mcagents/erase_node.rb | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/mcagents/erase_node.rb b/mcagents/erase_node.rb
+index 3eb98e8..3bac36f 100644
+--- a/mcagents/erase_node.rb
++++ b/mcagents/erase_node.rb
+@@ -112,6 +112,10 @@ module MCollective
+ File.open('/proc/sys/kernel/panic','w') {|file| file.write("10\n")}
+
+ begin
++ # clear out EFI boot entry on EFI-enabled systems
++ system("(which efibootmgr > /dev/null 2>&1 && efibootmgr | "\
++ "grep -oP '(?<=Boot)[0-9]+(?=.*ubuntu)' | "\
++ "xargs -I{} efibootmgr --delete-bootnum --bootnum {}) || true")
+ get_devices(type='all').each do |dev|
+ debug_msg("erasing bootstrap code area in MBR of #{dev[:name]}")
+ # clear out the boot code in MBR
diff --git a/patches/fuel-library/0016-compute-Fix-virtlogd-not-started-after-install.patch b/patches/fuel-library/0016-compute-Fix-virtlogd-not-started-after-install.patch
new file mode 100644
index 00000000..752ef6f8
--- /dev/null
+++ b/patches/fuel-library/0016-compute-Fix-virtlogd-not-started-after-install.patch
@@ -0,0 +1,33 @@
+From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+Date: Fri, 15 Jul 2016 17:22:44 +0200
+Subject: [PATCH] compute: Fix virtlogd not started after install
+
+libvirt >= 1.3.0 installs additional services, including virtlogd,
+which need to be started explicitly after install, as the Ubuntu UCA
+package is currently broken.
+
+Fuel code already carries a fix for this, but only for UCA libvirt.
+Refactor the condition for the existing fix to check package version
+instead of origin.
+
+Closes-bug: https://jira.opnfv.org/browse/ARMBAND-37
+
+Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+---
+ deployment/puppet/openstack_tasks/manifests/roles/compute.pp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp
+index 33e851f..3647f9b 100644
+--- a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp
++++ b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp
+@@ -373,7 +373,8 @@ class openstack_tasks::roles::compute {
+
+ # TODO(aschultz): work around until https://review.openstack.org/#/c/306677/
+ # lands.
+- if $::os_package_type == 'ubuntu' {
++ # Armband: also apply for our libvirt-bin deb package (>=1.3.0 version)
++ if (versioncmp($::libvirt_package_version, '1.3.0') >= 0) {
+ ensure_resource('service', ['virtlogd','virtlockd'], {
+ ensure => running,
+ enable => true,
diff --git a/patches/opnfv-fuel/0002-deploy-Delete-old-Fuel-env-if-present.patch b/patches/opnfv-fuel/0002-deploy-Delete-old-Fuel-env-if-present.patch
new file mode 100644
index 00000000..e7867d48
--- /dev/null
+++ b/patches/opnfv-fuel/0002-deploy-Delete-old-Fuel-env-if-present.patch
@@ -0,0 +1,58 @@
+From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+Date: Mon, 18 Jul 2016 17:42:48 +0200
+Subject: [PATCH] deploy: Delete old Fuel env if present
+
+In order to clean up old partitioning and boot entries on target
+nodes, before removing the Fuel Master, try ssh-ing into it and
+removing all environments/nodes.
+
+This is especially important for EFI systems, where old boot
+entries are left behind without a proper env delete, leading to
+target nodes failing to PXE boot on Fuel Master re-install.
+
+This change assumes that:
+- all Fuel Master information is unchanged between old and new
+ deploy (fuel IP, password etc.);
+- Fuel Master is up and running, in a sane state (target nodes
+ are also online), when deploy starts;
+
+Closes: ARMBAND-51
+
+Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+---
+ deploy/deploy.py | 15 +++++++++++++++
+ 1 file changed, 15 insertions(+)
+
+diff --git a/deploy/deploy.py b/deploy/deploy.py
+index 48a53c3..184510f 100755
+--- a/deploy/deploy.py
++++ b/deploy/deploy.py
+@@ -110,6 +110,20 @@ class AutoDeploy(object):
+ self.iso_file = new_iso
+ self.install_iso()
+
++ def delete_old_fuel_env(self):
++ log('Delete old Fuel Master environments if present')
++ try:
++ old_dep = CloudDeploy(self.dea, self.dha, self.fuel_conf['ip'],
++ self.fuel_username, self.fuel_password,
++ self.dea_file, self.fuel_plugins_conf_dir,
++ WORK_DIR, self.no_health_check,
++ self.deploy_timeout,
++ self.no_deploy_environment, self.deploy_log)
++ with old_dep.ssh:
++ old_dep.check_previous_installation()
++ except Exception as e:
++ log('Could not delete old env: %s' % str(e))
++
+ def install_iso(self):
+ fuel = InstallFuelMaster(self.dea_file, self.dha_file,
+ self.fuel_conf['ip'], self.fuel_username,
+@@ -227,6 +241,7 @@ class AutoDeploy(object):
+ def deploy(self):
+ self.collect_fuel_info()
+ if not self.no_fuel:
++ self.delete_old_fuel_env()
+ self.setup_execution_environment()
+ self.create_tmp_dir()
+ self.install_fuel_master()