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/fuel-mirror/0003-kernel-flavor-Add-linux-image-generic-lts-xenial.patch26
-rw-r--r--patches/opnfv-fuel/000098-FIXME-build-fuel-main-Decouple-patches-Makefile.patch44
-rw-r--r--patches/opnfv-fuel/0002-deploy-Delete-old-Fuel-env-if-present.patch58
-rw-r--r--patches/opnfv-fuel/0015-build-Makefile-Overrideable-product-commit-hash.patch35
-rw-r--r--patches/opnfv-fuel/0023-bootstrap-Add-armband-rtc-efi-fix-package.patch38
-rw-r--r--patches/opnfv-fuel/0028-bootstrap-Add-lshw-package.patch3
-rw-r--r--patches/opnfv-fuel/0040-Backport-dpkg-checkbuilddeps-to-mk-build-deps.patch2
9 files changed, 198 insertions, 84 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/fuel-mirror/0003-kernel-flavor-Add-linux-image-generic-lts-xenial.patch b/patches/fuel-mirror/0003-kernel-flavor-Add-linux-image-generic-lts-xenial.patch
new file mode 100644
index 00000000..6be21dac
--- /dev/null
+++ b/patches/fuel-mirror/0003-kernel-flavor-Add-linux-image-generic-lts-xenial.patch
@@ -0,0 +1,26 @@
+From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+Date: Wed, 13 Jul 2016 21:33:04 +0200
+Subject: [PATCH] kernel-flavor: Add linux-image-generic-lts-xenial
+
+Ubuntu arm64: While keeping kernel 4.2 for Trusty
+(linux-image-generic-lts-trusty), add 4.4 backported from Xenial
+(linux-image-generic-lts-xenial) to local mirror in Armband ISO.
+
+Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+---
+ contrib/fuel_mirror/data/ubuntu.yaml | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/contrib/fuel_mirror/data/ubuntu.yaml b/contrib/fuel_mirror/data/ubuntu.yaml
+index 2ec4f1d..b8c0ae4 100644
+--- a/contrib/fuel_mirror/data/ubuntu.yaml
++++ b/contrib/fuel_mirror/data/ubuntu.yaml
+@@ -98,6 +98,8 @@ packages: &packages
+ - "linux-firmware-nonfree"
+ - "linux-headers-generic-lts-trusty"
+ - "linux-image-generic-lts-trusty"
++ - "linux-headers-generic-lts-xenial"
++ - "linux-image-generic-lts-xenial"
+ - "live-boot"
+ - "livecd-rootfs"
+ - "lshw"
diff --git a/patches/opnfv-fuel/000098-FIXME-build-fuel-main-Decouple-patches-Makefile.patch b/patches/opnfv-fuel/000098-FIXME-build-fuel-main-Decouple-patches-Makefile.patch
index 8b464b47..53ceaa5b 100644
--- a/patches/opnfv-fuel/000098-FIXME-build-fuel-main-Decouple-patches-Makefile.patch
+++ b/patches/opnfv-fuel/000098-FIXME-build-fuel-main-Decouple-patches-Makefile.patch
@@ -42,7 +42,6 @@ Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
build/bootstrap_admin_node.sh.patch | 167 +++++++++++++++--------------------
build/fuel-main_docker_version.patch | 20 -----
build/isolinux.cfg.patch | 43 +++++----
- build/repo-mirror-cz.patch | 32 +++----
5 files changed, 113 insertions(+), 166 deletions(-)
delete mode 100644 build/fuel-main_docker_version.patch
@@ -50,16 +49,12 @@ diff --git a/build/Makefile b/build/Makefile
index 956183c..69e5690 100644
--- a/build/Makefile
+++ b/build/Makefile
-@@ -109,9 +109,9 @@ $(ISOCACHE):
+@@ -109,7 +109,7 @@ $(ISOCACHE):
cd /tmp && git clone $(FUEL_MAIN_REPO); \
fi
cd /tmp/fuel-main && git checkout $(FUEL_MAIN_TAG)
- @echo "fuel" `git -C /tmp/fuel-main show | grep commit | head -1 | cut -d " " -f2` >> $(VERSION_FILE)
-- # Patch for using the Czech Fuel mirror
-- cd /tmp/fuel-main && patch -p0 < $(TOPDIR)/repo-mirror-cz.patch
+ @echo "fuel" `git -C /tmp/fuel-main rev-parse HEAD` >> $(VERSION_FILE)
-+ # Patch for using the Czech Fuel mirror (non-committed)
-+ cd /tmp/fuel-main && git apply $(TOPDIR)/repo-mirror-cz.patch
# Remove Docker optimizations, otherwise multistrap will fail during
# Fuel build.
sudo rm -f /etc/apt/apt.conf.d/docker*
@@ -327,40 +322,3 @@ index ebd991b..7ca7a5c 100644
+ kernel vmlinuz
+- append initrd=initrd.img inst.repo=cdrom:LABEL=will_be_substituted_with_ISO_VOLUME_ID:/ inst.ks=cdrom:LABEL=will_be_substituted_with_ISO_VOLUME_ID:/ks.cfg ip=10.20.0.2::10.20.0.1:255.255.255.0:fuel.domain.tld:adminif:off::: nameserver=10.20.0.1 ifname=adminif:XX:XX:XX:XX:XX:XX
++ append initrd=initrd.img inst.repo=cdrom:LABEL=will_be_substituted_with_ISO_VOLUME_ID:/ inst.ks=cdrom:LABEL=will_be_substituted_with_ISO_VOLUME_ID:/ks.cfg ip=10.20.0.2::10.20.0.1:255.255.255.0:fuel.domain.tld:adminif:off::: nameserver=10.20.0.1 ifname=adminif:XX:XX:XX:XX:XX:XX showmenu=yes
-diff --git a/build/repo-mirror-cz.patch b/build/repo-mirror-cz.patch
-index aa8eaf9..4b5643c 100644
---- a/build/repo-mirror-cz.patch
-+++ b/build/repo-mirror-cz.patch
-@@ -1,19 +1,13 @@
--*** config.mk.orig Thu Jan 7 23:30:38 2016
----- config.mk Thu Jan 7 23:32:36 2016
--***************
--*** 153,159 ****
-- # 'msk', 'srt', 'usa', 'hrk', 'cz'
-- # Setting any other value or removing of this variable will cause
-- # download of all the packages directly from internet
--! USE_MIRROR?=ext
--
-- ifeq ($(USE_MIRROR),ext)
-- MIRROR_FUEL?=http://mirror.fuel-infra.org/mos-repos/centos/$(PRODUCT_NAME)$(PRODUCT_VERSION)-centos$(CENTOS_MAJOR)-fuel/os/x86_64/
----- 153,159 ----
-- # 'msk', 'srt', 'usa', 'hrk', 'cz'
-- # Setting any other value or removing of this variable will cause
-- # download of all the packages directly from internet
--! USE_MIRROR?=cz
--
-- ifeq ($(USE_MIRROR),ext)
-- MIRROR_FUEL?=http://mirror.fuel-infra.org/mos-repos/centos/$(PRODUCT_NAME)$(PRODUCT_VERSION)-centos$(CENTOS_MAJOR)-fuel/os/x86_64/
-+diff --git a/config.mk b/config.mk
-+index 2a512cf..3193ecf 100644
-+--- a/config.mk
-++++ b/config.mk
-+@@ -133,7 +133,7 @@ LOCAL_MIRROR_UBUNTU_OS_BASEURL:=$(LOCAL_MIRROR_UBUNTU)
-+ # 'msk', 'srt', 'usa', 'hrk', 'cz'
-+ # Setting any other value or removing of this variable will cause
-+ # download of all the packages directly from internet
-+-USE_MIRROR?=ext
-++USE_MIRROR?=cz
-+
-+ ifeq ($(USE_MIRROR),ext)
-+ MIRROR_FUEL?=http://mirror.fuel-infra.org/mos-repos/centos/$(PRODUCT_NAME)$(PRODUCT_VERSION)-centos$(CENTOS_MAJOR)/os/x86_64/
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()
diff --git a/patches/opnfv-fuel/0015-build-Makefile-Overrideable-product-commit-hash.patch b/patches/opnfv-fuel/0015-build-Makefile-Overrideable-product-commit-hash.patch
new file mode 100644
index 00000000..1c9bd82a
--- /dev/null
+++ b/patches/opnfv-fuel/0015-build-Makefile-Overrideable-product-commit-hash.patch
@@ -0,0 +1,35 @@
+From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+Date: Mon, 18 Jul 2016 23:50:30 +0200
+Subject: [PATCH] build/Makefile: Overrideable product, commit hash.
+
+For Armband's build system, using only the Fuel commit ID is not
+enough to fully describe the state of the source code, as patches
+are also applied to other fuel modules (as git submodules).
+Instead, a pointer to a valid Armband commit ID should be used.
+
+While at it, allow product name to be overriden, to signal the
+commit ID should be looked up inside the Armband repository.
+
+Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+---
+ build/Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/build/Makefile b/build/Makefile
+index ec5d27a..ba117da 100644
+--- a/build/Makefile
++++ b/build/Makefile
+@@ -21,11 +21,11 @@ SHELL = /bin/bash
+ export MOSVERSION = 9.0
+ export ISOSRC = file:$(shell pwd)/fuel-$(MOSVERSION).iso
+ export ISOCACHE = $(shell pwd)/$(shell basename $(ISOSRC))
+-export PRODNO = "OPNFV_FUEL"
++export PRODNO ?= "OPNFV_FUEL"
+ export REVSTATE = "P0000"
+ export USER ?= $(shell whoami)
+ export BUILD_DATE = $(shell date --utc +%Y-%m-%d:%H:%M)
+-export OPNFV_GIT_SHA = $(shell git rev-parse HEAD)
++export OPNFV_GIT_SHA ?= $(shell git rev-parse HEAD)
+ # Store in /etc/fuel_build_id on fuel master
+ export BUILD_ID := $(PRODNO)_$(BUILD_DATE)_$(OPNFV_GIT_SHA)
+
diff --git a/patches/opnfv-fuel/0023-bootstrap-Add-armband-rtc-efi-fix-package.patch b/patches/opnfv-fuel/0023-bootstrap-Add-armband-rtc-efi-fix-package.patch
deleted file mode 100644
index 813fbafb..00000000
--- a/patches/opnfv-fuel/0023-bootstrap-Add-armband-rtc-efi-fix-package.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
-Date: Sun, 17 Apr 2016 15:37:38 +0200
-Subject: [PATCH] bootstrap: Add armband-rtc-efi-fix package.
-
-Older ThunderX and possibly other UEFI-enabled targets do not support
-rtc-efi properly, so they end up filling dmesg with useless
-complaints about not being able to read system time.
-
-armband-rtc-efi-fix validates rtc-efi can be used on the system,
-otherwise it rmmods rtc_efi kernel module via rcS script.
-
-This patch hardcodes the addition of armband-rtc-ef-fix package during
-bootstrap image build.
-
-NOTES:
-This could be later removed or, if other fixes need to be delivered
-like this, grouped in a meta package.
-
-Fuel 9.0 moved default package list to openstack.yaml fixture, see [1].
-
-[1] https://github.com/openstack/fuel-web/commit/
- 4ee42effe27694bd231663e3d0f10c0c42877177
----
- build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml b/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml
-index 2e4843d..15d9e9d 100644
---- a/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml
-+++ b/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml
-@@ -7,6 +7,7 @@
- output_dir: /tmp/
- kernel_flavor: linux-image-generic-lts-trusty
- packages:
-+ - armband-rtc-efi-fix
- - fuel-agent
- - hwloc
- - hpsa-dkms
diff --git a/patches/opnfv-fuel/0028-bootstrap-Add-lshw-package.patch b/patches/opnfv-fuel/0028-bootstrap-Add-lshw-package.patch
index 7120086e..a811f2f3 100644
--- a/patches/opnfv-fuel/0028-bootstrap-Add-lshw-package.patch
+++ b/patches/opnfv-fuel/0028-bootstrap-Add-lshw-package.patch
@@ -20,8 +20,7 @@ diff --git a/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml b/build/f_isoro
index 15d9e9d..b45a14a 100644
--- a/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml
+++ b/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml
-@@ -17,6 +17,7 @@
- - linux-headers-generic
+@@ -17,5 +17,6 @@
- live-boot
- live-boot-initramfs-tools
+ - lshw
diff --git a/patches/opnfv-fuel/0040-Backport-dpkg-checkbuilddeps-to-mk-build-deps.patch b/patches/opnfv-fuel/0040-Backport-dpkg-checkbuilddeps-to-mk-build-deps.patch
index ac27b733..9d4a2424 100644
--- a/patches/opnfv-fuel/0040-Backport-dpkg-checkbuilddeps-to-mk-build-deps.patch
+++ b/patches/opnfv-fuel/0040-Backport-dpkg-checkbuilddeps-to-mk-build-deps.patch
@@ -64,7 +64,7 @@ index 0000000..896f3cf
+ -v $(PACKAGE_VERSION)-`awk -F'=' '/DEBRELEASE/ {print $$$$2}' $(BUILD_DIR)/packages/sources/$1/version` \
+ "`awk -F'=' '/DEBMSG/ {print $$$$2}' $(BUILD_DIR)/packages/sources/$1/version`"
+- dpkg-checkbuilddeps $(BUILD_DIR)/repos/$1/debian/control 2>&1 | sed 's/^dpkg-checkbuilddeps: Unmet build dependencies: //g' | sed 's/([^()]*)//g;s/|//g' | sudo tee $$(SANDBOX_UBUNTU)/tmp/$1.installdeps
-+- sudo chroot $$(SANDBOX_UBUNTU) /bin/sh -c "cat /tmp/$1.installdeps | xargs --no-run-if-empty apt-get -y install"
++- sudo chroot $$(SANDBOX_UBUNTU) /bin/sh -c "cat /tmp/$1.installdeps | xargs --no-run-if-empty env LC_ALL=C DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get -y install"
++ sudo chroot $$(SANDBOX_UBUNTU) /bin/sh -c "mk-build-deps --install --remove --tool 'apt-get --yes --no-remove --no-install-recommends' /tmp/$1/debian/control"
+ sudo chroot $$(SANDBOX_UBUNTU) /bin/sh -c "cd /tmp/$1 ; DEB_BUILD_OPTIONS=nocheck debuild -us -uc -b -d"
+ cp $$(SANDBOX_UBUNTU)/tmp/*.deb $(BUILD_DIR)/packages/deb/packages