From 42f8585ebb8fffad19a89314659ab9129176c3e9 Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Sat, 1 Oct 2016 13:18:11 +0200 Subject: build: Rework patch mechanism for Fuel submodules While refactoring the patching mechanism, take care of: - Sync submodule handling with Fuel@OPFNV; - build: Investigate/prepare for moving patches to Fuel@OPNFV; - build: Investigate divergent fuel-mirror; - ISO build: cacheid for Fuel comps should not depend on Armband git commit; CHANGE: Rename/shuffle patches while grouping them in "features", preparing for upstreaming them to Fuel@OPNFV and beyond. CHANGE: Allow linking patches for better representing the dependency between one patch and different features. e.g. 0001-Add-arch-to-nailgun-release-and-target-image.patch: - part of `multiarch-fuel`, because it extends Fuel; - part of `direct-kernel-boot`, as arch is required for that; - part of `cross-bootstrap`, target image is arch-dependent; NOTE: Patch links are not staged to Fuel@OPNFV, they only serve as markers that a specific patch is part of a feature. CHANGE: Kill all Fuel component submodules, now handled in Fuel@OPNFV: - fuel-agent - fuel-astute - fuel-library - fuel-mirror - fuel-nailgun-agent - fuel-web CHANGE: Move armband-fuel-config.mk to armband git root. FIXME: m1.micro-Increase-profile-RAM-size-to-128MB.patch is NOT part of `cross-bootstrap` feature, but patch context says so ... FIXME: 0001-Add-arm64-deb-repositories-setup.patch is broken at `make patches-export` by removing spaces at EOL. v2 -> v3: * Phony patch support (links to show a patch belongs to a feature); * Updated README.md v3 -> v7: * Re-export Fuel submodules & plugins patches (update patch context); * Update Cavium mail addresses (s/caviumnetworks.com/cavium.com/); * Ignore submodule changes; * Add armband git repo info to gitinfo_fuel.txt at build time; Implements: ARMBAND-136 Closes-bug: ARMBAND-95 Closes-bug: ARMBAND-93 Closes-bug: ARMBAND-92 Change-Id: I1a236d9f43b2e6dca22055911f696b43c22b5973 Signed-off-by: Alexandru Avadanii --- ...ild-Use-OPNFV_GIT_SHA-for-ISO-preparer-ID.patch | 76 ++++++++++ .../0001-build-Add-ARMBAND_BASE-support.patch | 70 +++++++++ ...nel-flavor-linux-image-generic-lts-xenial.patch | 51 ------- ...deploy-EFI-Skip-re-ordering-boot-via-IPMI.patch | 31 ---- .../0002-Fuel-VM-for-the-Enea-Armband-lab.patch | 107 +++++++++++++ ...ea_base-replace-grub-pc-by-grub-efi-arm64.patch | 22 +++ .../0004-Fuel-VM-for-the-Enea-Armband-lab.patch | 111 -------------- ...ost-scripts-Allow-SSH-on-non-admin-ifaces.patch | 47 ++++++ ....py-add-a-time-stamp-to-the-new-ISO-image.patch | 39 +++++ ...006-build-docker-Use-host-s-network-stack.patch | 28 ++++ .../0006-deploy.sh-no-need-to-set-umask-0000.patch | 38 ----- .../opnfv-fuel/0007-Remove-check-for-root.patch | 85 ----------- ...ploy-Fix-add-bootstrap-DEA-override-delay.patch | 32 ++++ ...ea_base-replace-grub-pc-by-grub-efi-arm64.patch | 22 --- ...ost-scripts-Allow-SSH-on-non-admin-ifaces.patch | 47 ------ ...Makefile-Overrideable-product-commit-hash.patch | 35 ----- .../0020-Add-arm64-deb-repositories-setup.patch | 166 --------------------- .../0021-Build-bootstrap-image-for-arm64.patch | 27 ---- ...bootstrap-Use-public-Ubuntu-ports-mirrors.patch | 46 ------ ...date-bootstrap-target-build-time-estimate.patch | 38 ----- .../0028-bootstrap-Add-lshw-package.patch | 29 ---- ....py-add-a-time-stamp-to-the-new-ISO-image.patch | 39 ----- ...ipts-Enable-systemd-binfmt-for-first-boot.patch | 93 ------------ ...-Increase-max-shell-command-timeout-to-2h.patch | 49 ------ ...tstrap-Use-gzip-instead-of-xz-compression.patch | 52 ------- ...ilgun-Increase-target-image-build-timeout.patch | 36 ----- ....micro-Increase-profile-RAM-size-to-128MB.patch | 38 ----- ...ploy-Fix-add-bootstrap-DEA-override-delay.patch | 32 ---- ...port-dpkg-checkbuilddeps-to-mk-build-deps.patch | 58 ------- .../0043-build-Add-armband.mk-config.patch | 143 ------------------ ...ild-Use-OPNFV_GIT_SHA-for-ISO-preparer-ID.patch | 48 ------ ...fpb-Support-multiple-versions-of-packages.patch | 48 ------ ...et-check-add-support-for-faulty-operstate.patch | 63 -------- ...055-build-docker-Use-host-s-network-stack.patch | 28 ---- .../0001-bootstrap-Add-lshw-package.patch | 30 ++++ ...et-check-add-support-for-faulty-operstate.patch | 63 ++++++++ ...date-bootstrap-target-build-time-estimate.patch | 39 +++++ .../0002-Build-bootstrap-image-for-arm64.patch | 31 ++++ ...bootstrap-Use-public-Ubuntu-ports-mirrors.patch | 48 ++++++ ...ipts-Enable-systemd-binfmt-for-first-boot.patch | 94 ++++++++++++ ...-Increase-max-shell-command-timeout-to-2h.patch | 49 ++++++ ...tstrap-Use-gzip-instead-of-xz-compression.patch | 52 +++++++ ...ilgun-Increase-target-image-build-timeout.patch | 36 +++++ ....micro-Increase-profile-RAM-size-to-128MB.patch | 38 +++++ ...nel-flavor-linux-image-generic-lts-xenial.patch | 52 +++++++ ...deploy-EFI-Skip-re-ordering-boot-via-IPMI.patch | 31 ++++ .../0001-Add-arm64-deb-repositories-setup.patch | 166 +++++++++++++++++++++ ...fpb-Support-multiple-versions-of-packages.patch | 50 +++++++ ...oy.sh-Remove-check-for-root-rm-umask-0000.patch | 106 +++++++++++++ ...port-dpkg-checkbuilddeps-to-mk-build-deps.patch | 58 +++++++ 50 files changed, 1364 insertions(+), 1453 deletions(-) create mode 100644 patches/opnfv-fuel/0000-build-Use-OPNFV_GIT_SHA-for-ISO-preparer-ID.patch create mode 100644 patches/opnfv-fuel/0001-build-Add-ARMBAND_BASE-support.patch delete mode 100644 patches/opnfv-fuel/0001-kernel-flavor-linux-image-generic-lts-xenial.patch delete mode 100644 patches/opnfv-fuel/0002-FIXME-deploy-EFI-Skip-re-ordering-boot-via-IPMI.patch create mode 100644 patches/opnfv-fuel/0002-Fuel-VM-for-the-Enea-Armband-lab.patch create mode 100644 patches/opnfv-fuel/0003-dea_base-replace-grub-pc-by-grub-efi-arm64.patch delete mode 100644 patches/opnfv-fuel/0004-Fuel-VM-for-the-Enea-Armband-lab.patch create mode 100644 patches/opnfv-fuel/0004-post-scripts-Allow-SSH-on-non-admin-ifaces.patch create mode 100644 patches/opnfv-fuel/0005-deploy.py-add-a-time-stamp-to-the-new-ISO-image.patch create mode 100644 patches/opnfv-fuel/0006-build-docker-Use-host-s-network-stack.patch delete mode 100644 patches/opnfv-fuel/0006-deploy.sh-no-need-to-set-umask-0000.patch delete mode 100644 patches/opnfv-fuel/0007-Remove-check-for-root.patch create mode 100644 patches/opnfv-fuel/0007-deploy-Fix-add-bootstrap-DEA-override-delay.patch delete mode 100644 patches/opnfv-fuel/0009-dea_base-replace-grub-pc-by-grub-efi-arm64.patch delete mode 100644 patches/opnfv-fuel/0010-post-scripts-Allow-SSH-on-non-admin-ifaces.patch delete mode 100644 patches/opnfv-fuel/0015-build-Makefile-Overrideable-product-commit-hash.patch delete mode 100644 patches/opnfv-fuel/0020-Add-arm64-deb-repositories-setup.patch delete mode 100644 patches/opnfv-fuel/0021-Build-bootstrap-image-for-arm64.patch delete mode 100644 patches/opnfv-fuel/0022-bootstrap-Use-public-Ubuntu-ports-mirrors.patch delete mode 100644 patches/opnfv-fuel/0027-UX-Update-bootstrap-target-build-time-estimate.patch delete mode 100644 patches/opnfv-fuel/0028-bootstrap-Add-lshw-package.patch delete mode 100644 patches/opnfv-fuel/0030-deploy.py-add-a-time-stamp-to-the-new-ISO-image.patch delete mode 100644 patches/opnfv-fuel/0031-post-scripts-Enable-systemd-binfmt-for-first-boot.patch delete mode 100644 patches/opnfv-fuel/0032-mcagent-Increase-max-shell-command-timeout-to-2h.patch delete mode 100644 patches/opnfv-fuel/0033-bootstrap-Use-gzip-instead-of-xz-compression.patch delete mode 100644 patches/opnfv-fuel/0034-Nailgun-Increase-target-image-build-timeout.patch delete mode 100644 patches/opnfv-fuel/0035-m1.micro-Increase-profile-RAM-size-to-128MB.patch delete mode 100644 patches/opnfv-fuel/0039-deploy-Fix-add-bootstrap-DEA-override-delay.patch delete mode 100644 patches/opnfv-fuel/0040-Backport-dpkg-checkbuilddeps-to-mk-build-deps.patch delete mode 100644 patches/opnfv-fuel/0043-build-Add-armband.mk-config.patch delete mode 100644 patches/opnfv-fuel/0046-build-Use-OPNFV_GIT_SHA-for-ISO-preparer-ID.patch delete mode 100644 patches/opnfv-fuel/0048-fpb-Support-multiple-versions-of-packages.patch delete mode 100644 patches/opnfv-fuel/0054-net-check-add-support-for-faulty-operstate.patch delete mode 100644 patches/opnfv-fuel/0055-build-docker-Use-host-s-network-stack.patch create mode 100644 patches/opnfv-fuel/arm64-bug-fixes/0001-bootstrap-Add-lshw-package.patch create mode 100644 patches/opnfv-fuel/arm64-bug-fixes/0002-net-check-add-support-for-faulty-operstate.patch create mode 100644 patches/opnfv-fuel/cross-bootstrap/0001-UX-Update-bootstrap-target-build-time-estimate.patch create mode 100644 patches/opnfv-fuel/cross-bootstrap/0002-Build-bootstrap-image-for-arm64.patch create mode 100644 patches/opnfv-fuel/cross-bootstrap/0003-bootstrap-Use-public-Ubuntu-ports-mirrors.patch create mode 100644 patches/opnfv-fuel/cross-bootstrap/0004-post-scripts-Enable-systemd-binfmt-for-first-boot.patch create mode 100644 patches/opnfv-fuel/cross-bootstrap/0005-mcagent-Increase-max-shell-command-timeout-to-2h.patch create mode 100644 patches/opnfv-fuel/cross-bootstrap/0006-bootstrap-Use-gzip-instead-of-xz-compression.patch create mode 100644 patches/opnfv-fuel/cross-bootstrap/0007-Nailgun-Increase-target-image-build-timeout.patch create mode 100644 patches/opnfv-fuel/cross-bootstrap/0008-m1.micro-Increase-profile-RAM-size-to-128MB.patch create mode 100644 patches/opnfv-fuel/kernel-bump/0001-kernel-flavor-linux-image-generic-lts-xenial.patch create mode 100644 patches/opnfv-fuel/multiarch-efi/0001-FIXME-deploy-EFI-Skip-re-ordering-boot-via-IPMI.patch create mode 100644 patches/opnfv-fuel/multiarch-mirrors/0001-Add-arm64-deb-repositories-setup.patch create mode 100644 patches/opnfv-fuel/multiarch-plugins/0001-fpb-Support-multiple-versions-of-packages.patch create mode 100644 patches/opnfv-fuel/upstream-backports/0001-deploy.sh-Remove-check-for-root-rm-umask-0000.patch create mode 100644 patches/opnfv-fuel/upstream-backports/0002-Backport-dpkg-checkbuilddeps-to-mk-build-deps.patch (limited to 'patches/opnfv-fuel') diff --git a/patches/opnfv-fuel/0000-build-Use-OPNFV_GIT_SHA-for-ISO-preparer-ID.patch b/patches/opnfv-fuel/0000-build-Use-OPNFV_GIT_SHA-for-ISO-preparer-ID.patch new file mode 100644 index 00000000..27b00c71 --- /dev/null +++ b/patches/opnfv-fuel/0000-build-Use-OPNFV_GIT_SHA-for-ISO-preparer-ID.patch @@ -0,0 +1,76 @@ +From: Alexandru Avadanii +Date: Wed, 17 Aug 2016 21:56:22 +0200 +Subject: [PATCH] build: Use OPNFV_GIT_SHA for ISO preparer ID + +isoinfo -i lists the following information for Fuel@OPNFV ISO: +"Data preparer id: 86aafaf5454a846c417848bb94f264c4420160f3" +where the SHA hash is Fuel git repo HEAD SHA. + +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. + +However, Armband overrides OPNFV_GIT_SHA to the Armband git repo +commit hash, so the ISO metadata should also reflect this. + +While at it, allow product name to be overriden, to signal the +commit ID should be looked up inside the Armband repository. + +Change-Id: I33ad490f1afe28c1d439dda40e39cee1955e0ac2 +Signed-off-by: Alexandru Avadanii +--- + build/Makefile | 4 ++-- + build/docker/runcontext | 2 +- + build/install/install.sh | 6 +++++- + 3 files changed, 8 insertions(+), 4 deletions(-) + +diff --git a/build/Makefile b/build/Makefile +index 56acb40..ac85498 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/build/docker/runcontext b/build/docker/runcontext +index daad663..2d13562 100755 +--- a/build/docker/runcontext ++++ b/build/docker/runcontext +@@ -115,7 +115,7 @@ RUN_CONTEXT_OPT="--cidfile $CID_FILE --privileged=true --rm \ + -e HOME=$HOME -e CACHEDEBUG -e CACHETRANSPORT -e CACHEMAXAGE -e CACHEBASE \ + -e BUILD_FUEL_PLUGINS -e MIRROR_UBUNTU -e MIRROR_UBUNTU_ROOT \ + -e MIRROR_MOS_UBUNTU -e MIRROR_MOS_UBUNTU_ROOT -e MIRROR_FUEL \ +- -e LATEST_TARGET_UBUNTU -e UBUNTU_ARCH \ ++ -e LATEST_TARGET_UBUNTU -e UBUNTU_ARCH -e OPNFV_GIT_SHA \ + -u $USER_ID:$GROUP_ID -w $PWD \ + -v $GITROOT:$GITROOT -v /sys/fs/cgroup:/sys/fs/cgroup:ro $CACHEMOUNT" + +diff --git a/build/install/install.sh b/build/install/install.sh +index c632419..866d304 100755 +--- a/build/install/install.sh ++++ b/build/install/install.sh +@@ -196,8 +196,12 @@ make_iso_image() { + find . -name TRANS.TBL -exec rm {} \; + rm -rf rr_moved + ++ if [[ -z "$OPNFV_GIT_SHA" ]]; then ++ OPNFV_GIT_SHA=$(git rev-parse --verify HEAD) ++ fi ++ + mkisofs --quiet -r -V "$VOLUMEID" -publisher "$PUBLISHER" \ +- -p `git rev-parse --verify HEAD` -J -R -b isolinux/isolinux.bin \ ++ -p "$OPNFV_GIT_SHA" -J -R -b isolinux/isolinux.bin \ + -no-emul-boot \ + -boot-load-size 4 -boot-info-table \ + --hide-rr-moved \ diff --git a/patches/opnfv-fuel/0001-build-Add-ARMBAND_BASE-support.patch b/patches/opnfv-fuel/0001-build-Add-ARMBAND_BASE-support.patch new file mode 100644 index 00000000..17cfd689 --- /dev/null +++ b/patches/opnfv-fuel/0001-build-Add-ARMBAND_BASE-support.patch @@ -0,0 +1,70 @@ +From: Alexandru Avadanii +Date: Thu, 11 Aug 2016 15:34:32 +0200 +Subject: [PATCH] build: Add ARMBAND_BASE support + +Signed-off-by: Alexandru Avadanii +--- + build/Makefile | 10 ++++++++++ + build/docker/Dockerfile | 2 +- + build/docker/runcontext | 6 +++++- + 3 files changed, 18 insertions(+), 2 deletions(-) + +diff --git a/build/Makefile b/build/Makefile +index 4454c35..377ecc6 100644 +--- a/build/Makefile ++++ b/build/Makefile +@@ -14,4 +14,9 @@ SHELL = /bin/bash + ++# Only configure Armband specific stuff when ARMBAND_BASE is set ++ifdef ARMBAND_BASE ++ include ${ARMBAND_BASE}/armband-fuel-config.mk ++endif ++ + ############################################################################ + # BEGIN of variables to customize + # +@@ -140,6 +140,7 @@ $(ISOCACHE): + # fuel-main Makefiles do not like `make -C` + cd $(FUEL_MAIN_DIR) && make repos + cp f_repos/.cachefuelinfo gitinfo_fuel.txt ++ test -z $(ARMBAND_BASE) || $(REPOINFO) $(ARMBAND_BASE) >> gitinfo_fuel.txt + + # Repeat build up to three times + sudo -E ./fuel_build_loop +diff --git a/build/docker/Dockerfile b/build/docker/Dockerfile +index b38ea4c..624f233 100644 +--- a/build/docker/Dockerfile ++++ b/build/docker/Dockerfile +@@ -30,7 +30,7 @@ RUN echo "Defaults env_keep += \"ftp_proxy http_proxy https_proxy no_proxy RSYNC + # Keeping PWD is needed to build as root + RUN echo "Defaults env_keep += \"PWD\"" > /etc/sudoers.d/keep-pwd + # Keeping variables for ISO build +-RUN echo "Defaults env_keep += \"MIRROR_UBUNTU MIRROR_UBUNTU_ROOT MIRROR_MOS_UBUNTU MIRROR_MOS_UBUNTU_ROOT MIRROR_FUEL LATEST_TARGET_UBUNTU UBUNTU_ARCH\"" > /etc/sudoers.d/keep-mos ++RUN echo "Defaults env_keep += \"MIRROR_UBUNTU MIRROR_UBUNTU_ROOT MIRROR_MOS_UBUNTU MIRROR_MOS_UBUNTU_ROOT MIRROR_FUEL LATEST_TARGET_UBUNTU UBUNTU_ARCH ARMBAND_BASE\"" > /etc/sudoers.d/keep-mos + RUN chmod 0440 /etc/sudoers.d/open-sudo + RUN chmod 0440 /etc/sudoers.d/keep-proxies + RUN chmod 0440 /etc/sudoers.d/keep-pwd +diff --git a/build/docker/runcontext b/build/docker/runcontext +index daad663..e4874df 100755 +--- a/build/docker/runcontext ++++ b/build/docker/runcontext +@@ -42,6 +42,10 @@ GITROOT=`git rev-parse --show-toplevel` + CID_FILE=`mktemp -u -t runcontext.XXXXXXXXXX` + CONTEXT_DIR=`mktemp -d ${GITROOT}/.docker_contextXXXXXX` + ++if [[ $ARMBAND_BASE ]]; then ++ GITROOT=$ARMBAND_BASE ++fi ++ + # If RSYNC_CONNECT_PROG is used, we need to copy all of + # the SSH structure, should one of the keys need to be + # used. +@@ -115,7 +119,7 @@ RUN_CONTEXT_OPT="--cidfile $CID_FILE --privileged=true --rm \ + -e HOME=$HOME -e CACHEDEBUG -e CACHETRANSPORT -e CACHEMAXAGE -e CACHEBASE \ + -e BUILD_FUEL_PLUGINS -e MIRROR_UBUNTU -e MIRROR_UBUNTU_ROOT \ + -e MIRROR_MOS_UBUNTU -e MIRROR_MOS_UBUNTU_ROOT -e MIRROR_FUEL \ +- -e LATEST_TARGET_UBUNTU -e UBUNTU_ARCH -e OPNFV_GIT_SHA \ ++ -e LATEST_TARGET_UBUNTU -e UBUNTU_ARCH -e OPNFV_GIT_SHA -e ARMBAND_BASE \ + -u $USER_ID:$GROUP_ID -w $PWD \ + -v $GITROOT:$GITROOT -v /sys/fs/cgroup:/sys/fs/cgroup:ro $CACHEMOUNT" + diff --git a/patches/opnfv-fuel/0001-kernel-flavor-linux-image-generic-lts-xenial.patch b/patches/opnfv-fuel/0001-kernel-flavor-linux-image-generic-lts-xenial.patch deleted file mode 100644 index 70847ba7..00000000 --- a/patches/opnfv-fuel/0001-kernel-flavor-linux-image-generic-lts-xenial.patch +++ /dev/null @@ -1,51 +0,0 @@ -From: Alexandru Avadanii -Date: Thu, 4 Aug 2016 12:50:19 +0200 -Subject: [PATCH] kernel-flavor: linux-image-generic-lts-xenial - -Ubuntu arm64: switch from using kernel 4.2 for Trusty -(linux-image-generic-lts-trusty) to kernel 4.4 backported from Xenial -(linux-image-generic-lts-xenial). - -Signed-off-by: Alexandru Avadanii ---- - build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml | 4 ++-- - deploy/config/dea_base.yaml | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml b/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml -index daef3d5..2985619 100644 ---- a/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml -+++ b/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml -@@ -5,7 +5,7 @@ - extra_dirs: - - /usr/share/fuel_bootstrap_cli/files/trusty - output_dir: /tmp/ -- kernel_flavor: linux-image-generic-lts-trusty -+ kernel_flavor: linux-image-generic-lts-xenial - packages: - - fuel-agent - - hwloc -@@ -13,6 +13,6 @@ - - i40e-dkms - - linux-firmware - - linux-firmware-nonfree -- - linux-headers-generic -+ - linux-headers-generic-lts-xenial - - live-boot - - live-boot-initramfs-tools -diff --git a/deploy/config/dea_base.yaml b/deploy/config/dea_base.yaml -index 658b328..5f3c156 100644 ---- a/deploy/config/dea_base.yaml -+++ b/deploy/config/dea_base.yaml -@@ -474,9 +474,9 @@ settings: - - linux-firmware-nonfree - -- linux-headers-generic-lts-trusty -+ linux-headers-generic-lts-xenial - -- linux-image-generic-lts-trusty -+ linux-image-generic-lts-xenial - - lvm2 - diff --git a/patches/opnfv-fuel/0002-FIXME-deploy-EFI-Skip-re-ordering-boot-via-IPMI.patch b/patches/opnfv-fuel/0002-FIXME-deploy-EFI-Skip-re-ordering-boot-via-IPMI.patch deleted file mode 100644 index d6ff3818..00000000 --- a/patches/opnfv-fuel/0002-FIXME-deploy-EFI-Skip-re-ordering-boot-via-IPMI.patch +++ /dev/null @@ -1,31 +0,0 @@ -From: Alexandru Avadanii -Date: Fri, 9 Sep 2016 17:55:38 +0200 -Subject: [PATCH] FIXME: deploy: EFI: Skip re-ordering boot via IPMI - -On EFI systems deploys, altering the boot order via IPMI causes -issues on some specific targets. Until we agree on an uniform -solution for EFI systems + IPMI boot order handling, just skip -altering it via IPMI. - -Related-bug: https://jira.opnfv.org/browse/ARMBAND-71 - -Signed-off-by: Alexandru Avadanii ---- - deploy/deploy_env.py | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/deploy/deploy_env.py b/deploy/deploy_env.py -index 93dc395..1d2dfeb 100644 ---- a/deploy/deploy_env.py -+++ b/deploy/deploy_env.py -@@ -255,7 +255,9 @@ class CloudDeploy(object): - - def set_boot_order_nodes(self): - self.power_off_nodes() -- self.set_boot_order(['pxe', 'disk']) -+ # ARMBAND FIXME: See https://jira.opnfv.org/browse/ARMBAND-71 -+ # Until we choose an uniform design on EFI systems, just disable it -+ # self.set_boot_order(['pxe', 'disk']) - self.power_on_nodes() - - def get_put_deploy_log(self): diff --git a/patches/opnfv-fuel/0002-Fuel-VM-for-the-Enea-Armband-lab.patch b/patches/opnfv-fuel/0002-Fuel-VM-for-the-Enea-Armband-lab.patch new file mode 100644 index 00000000..cefc0625 --- /dev/null +++ b/patches/opnfv-fuel/0002-Fuel-VM-for-the-Enea-Armband-lab.patch @@ -0,0 +1,107 @@ +From: Josep Puigdemont +Date: Wed, 4 May 2016 14:27:23 +0200 +Subject: [PATCH] Fuel VM for the Enea Armband lab + +This is the initial VM description fit for Enea's Armband lab. + +Change-Id: Ia89f9728fff0ab1c279f6200fd558d9643cf4ea5 +Signed-off-by: Josep Puigdemont +--- + .../hardware_environment/vms/enea_lab/fuel.xml | 88 ++++++++++++++++++++++ + 1 file changed, 88 insertions(+) + create mode 100644 deploy/templates/hardware_environment/vms/enea_lab/fuel.xml + +diff --git a/deploy/templates/hardware_environment/vms/enea_lab/fuel.xml b/deploy/templates/hardware_environment/vms/enea_lab/fuel.xml +new file mode 100644 +index 0000000..8773ed4 +--- /dev/null ++++ b/deploy/templates/hardware_environment/vms/enea_lab/fuel.xml +@@ -0,0 +1,88 @@ ++ ++ fuel ++ 8290304 ++ 8290304 ++ 8 ++ ++ /machine ++ ++ ++ hvm ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ destroy ++ restart ++ restart ++ ++ ++ ++ ++ ++ /usr/libexec/qemu-kvm ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ diff --git a/patches/opnfv-fuel/0003-dea_base-replace-grub-pc-by-grub-efi-arm64.patch b/patches/opnfv-fuel/0003-dea_base-replace-grub-pc-by-grub-efi-arm64.patch new file mode 100644 index 00000000..fae14001 --- /dev/null +++ b/patches/opnfv-fuel/0003-dea_base-replace-grub-pc-by-grub-efi-arm64.patch @@ -0,0 +1,22 @@ +From: Josep Puigdemont +Date: Mon, 11 Jul 2016 15:21:56 +0200 +Subject: [PATCH] dea_base: replace grub-pc by grub-efi-arm64 + +Signed-off-by: Josep Puigdemont +--- + deploy/config/dea_base.yaml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/deploy/config/dea_base.yaml b/deploy/config/dea_base.yaml +index 0b8485b..658b328 100644 +--- a/deploy/config/dea_base.yaml ++++ b/deploy/config/dea_base.yaml +@@ -462,7 +462,7 @@ settings: + + gdisk + +- grub-pc ++ grub-efi-arm64 + + hpsa-dkms + diff --git a/patches/opnfv-fuel/0004-Fuel-VM-for-the-Enea-Armband-lab.patch b/patches/opnfv-fuel/0004-Fuel-VM-for-the-Enea-Armband-lab.patch deleted file mode 100644 index aa97aa69..00000000 --- a/patches/opnfv-fuel/0004-Fuel-VM-for-the-Enea-Armband-lab.patch +++ /dev/null @@ -1,111 +0,0 @@ -From 800aae6db0d0d79d01cec4df85075026073063dd Mon Sep 17 00:00:00 2001 -From: Josep Puigdemont -Date: Wed, 4 May 2016 14:27:23 +0200 -Subject: [PATCH] Fuel VM for the Enea Armband lab - -This is the initial VM description fit for Enea's Armband lab. - -Change-Id: Ia89f9728fff0ab1c279f6200fd558d9643cf4ea5 -Signed-off-by: Josep Puigdemont ---- - .../hardware_environment/vms/enea_lab/fuel.xml | 88 ++++++++++++++++++++++ - 1 file changed, 88 insertions(+) - create mode 100644 deploy/templates/hardware_environment/vms/enea_lab/fuel.xml - -diff --git a/deploy/templates/hardware_environment/vms/enea_lab/fuel.xml b/deploy/templates/hardware_environment/vms/enea_lab/fuel.xml -new file mode 100644 -index 0000000..8773ed4 ---- /dev/null -+++ b/deploy/templates/hardware_environment/vms/enea_lab/fuel.xml -@@ -0,0 +1,88 @@ -+ -+ fuel -+ 8290304 -+ 8290304 -+ 8 -+ -+ /machine -+ -+ -+ hvm -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ destroy -+ restart -+ restart -+ -+ -+ -+ -+ -+ /usr/libexec/qemu-kvm -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ --- -2.5.5 - diff --git a/patches/opnfv-fuel/0004-post-scripts-Allow-SSH-on-non-admin-ifaces.patch b/patches/opnfv-fuel/0004-post-scripts-Allow-SSH-on-non-admin-ifaces.patch new file mode 100644 index 00000000..e098d47c --- /dev/null +++ b/patches/opnfv-fuel/0004-post-scripts-Allow-SSH-on-non-admin-ifaces.patch @@ -0,0 +1,47 @@ +From: Alexandru Avadanii +Date: Tue, 12 Jul 2016 16:12:25 +0200 +Subject: [PATCH] post-scripts: Allow SSH on non-admin ifaces. + +By default, Fuel 9.0 configures iptables to only accept SSH connections +on admin interface. + +If more than the admin interface is configured (e.g. by transplant script +or manually in fuel menu), whitelist SSH connections on all ifaces. + +Signed-off-by: Alexandru Avadanii +--- + .../post-scripts/10_accept_ssh_all_ifaces.sh | 25 ++++++++++++++++++++++ + 1 file changed, 25 insertions(+) + create mode 100755 build/f_isoroot/f_bootstrap/post-scripts/10_accept_ssh_all_ifaces.sh + +diff --git a/build/f_isoroot/f_bootstrap/post-scripts/10_accept_ssh_all_ifaces.sh b/build/f_isoroot/f_bootstrap/post-scripts/10_accept_ssh_all_ifaces.sh +new file mode 100755 +index 0000000..b551516 +--- /dev/null ++++ b/build/f_isoroot/f_bootstrap/post-scripts/10_accept_ssh_all_ifaces.sh +@@ -0,0 +1,25 @@ ++#/bin/sh ++############################################################################## ++# Copyright (c) 2016 Enea AB and others. ++# Alexandru.Avadanii@enea.com ++# All rights reserved. This program and the accompanying materials ++# are made available under the terms of the Apache License, Version 2.0 ++# which accompanies this distribution, and is available at ++# http://www.apache.org/licenses/LICENSE-2.0 ++############################################################################## ++ ++# Only mess with iptables if we have additional interfaces configured ++if grep -q "DEFROUTE=no" "/etc/sysconfig/network-scripts/ifcfg-eth0"; then ++ echo "iptables: Allow SSH connections on all interfaces" ++ # By default, Fuel 9.0 configures iptables to only accept SSH connections ++ # on admin interface. Whitelist SSH connections on all ifaces. ++ while [ $? -eq 0 ]; do ++ # First, try removing the rule we want to add to prevent duplicates ++ iptables -D INPUT -p tcp --dport ssh -j ACCEPT > /dev/null 2>&1; ++ done ++ iptables -A INPUT -p tcp --dport ssh -j ACCEPT ++ service iptables save ++ echo "iptables: Done configuring SSH" ++else ++ echo "iptables: Skipping configuring SSH for non-admin ifaces" ++fi diff --git a/patches/opnfv-fuel/0005-deploy.py-add-a-time-stamp-to-the-new-ISO-image.patch b/patches/opnfv-fuel/0005-deploy.py-add-a-time-stamp-to-the-new-ISO-image.patch new file mode 100644 index 00000000..61847ab8 --- /dev/null +++ b/patches/opnfv-fuel/0005-deploy.py-add-a-time-stamp-to-the-new-ISO-image.patch @@ -0,0 +1,39 @@ +From: Josep Puigdemont +Date: Tue, 17 May 2016 14:40:48 +0200 +Subject: [PATCH] deploy.py: add a time stamp to the new ISO image + +Add a time stamp to the newly create ISO image. This is to prevent name +collisions with other ISO images from earlier deploy jobs. + +Ideally this will only be a temporary need, and releng will provide with +unique IDs for each job that we can use to this effect. + +Signed-off-by: Josep Puigdemont +--- + deploy/deploy.py | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/deploy/deploy.py b/deploy/deploy.py +index 041ba2f..cebef97 100755 +--- a/deploy/deploy.py ++++ b/deploy/deploy.py +@@ -13,6 +13,7 @@ import os + import io + import re + import sys ++import time + import yaml + import errno + import signal +@@ -100,8 +101,9 @@ class AutoDeploy(object): + + def install_fuel_master(self): + log('Install Fuel Master') +- new_iso = ('%s/deploy-%s' +- % (self.tmp_dir, os.path.basename(self.iso_file))) ++ stamp = time.strftime("%Y%m%d%H%M%S") ++ new_iso = ('%s/deploy-%s-%s' ++ % (self.tmp_dir, stamp, os.path.basename(self.iso_file))) + self.patch_iso(new_iso) + self.iso_file = new_iso + self.install_iso() diff --git a/patches/opnfv-fuel/0006-build-docker-Use-host-s-network-stack.patch b/patches/opnfv-fuel/0006-build-docker-Use-host-s-network-stack.patch new file mode 100644 index 00000000..69b0e82f --- /dev/null +++ b/patches/opnfv-fuel/0006-build-docker-Use-host-s-network-stack.patch @@ -0,0 +1,28 @@ +From: Alexandru Avadanii +Date: Mon, 29 Aug 2016 22:58:49 +0200 +Subject: [PATCH] build: docker: Use host's /etc/hosts + +The original motivation was pointing to local mirrors via host's +"/etc/hosts", for which an alternative solution tested was +"--net=host" (see [1] for full description), but lead to wierd +loss of connectivity after a few builds. + +[1] https://docs.docker.com/v1.8/articles/networking/ + +Signed-off-by: Alexandru Avadanii +--- + build/docker/runcontext | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/build/docker/runcontext b/build/docker/runcontext +index 07b0dc1..b0d6d37 100755 +--- a/build/docker/runcontext ++++ b/build/docker/runcontext +@@ -121,6 +121,7 @@ RUN_CONTEXT_OPT="--cidfile $CID_FILE --privileged=true --rm --net=host \ + -e MIRROR_MOS_UBUNTU -e MIRROR_MOS_UBUNTU_ROOT -e MIRROR_FUEL \ + -e LATEST_TARGET_UBUNTU -e UBUNTU_ARCH -e OPNFV_GIT_SHA -e ARMBAND_BASE \ + -u $USER_ID:$GROUP_ID -w $PWD \ ++ -v /etc/hosts:/etc/hosts \ + -v $GITROOT:$GITROOT -v /sys/fs/cgroup:/sys/fs/cgroup:ro $CACHEMOUNT" + + # Passing "debug" puts up an interactive bash shell diff --git a/patches/opnfv-fuel/0006-deploy.sh-no-need-to-set-umask-0000.patch b/patches/opnfv-fuel/0006-deploy.sh-no-need-to-set-umask-0000.patch deleted file mode 100644 index 9c005907..00000000 --- a/patches/opnfv-fuel/0006-deploy.sh-no-need-to-set-umask-0000.patch +++ /dev/null @@ -1,38 +0,0 @@ -From f67625ce6c607b47bc99c5118f5e52fe8a8e763b Mon Sep 17 00:00:00 2001 -From: Josep Puigdemont -Date: Fri, 6 May 2016 03:07:40 +0200 -Subject: [PATCH] deploy.sh: no need to set umask 0000 - -Change-Id: If3283a16139097db57b06c0535d33a88dc1b2ed2 -Signed-off-by: Josep Puigdemont ---- - ci/deploy.sh | 6 ------ - 1 file changed, 6 deletions(-) - -diff --git a/ci/deploy.sh b/ci/deploy.sh -index 8411714..c08a94b 100755 ---- a/ci/deploy.sh -+++ b/ci/deploy.sh -@@ -84,9 +84,6 @@ Input parameters to the build script is: - -i .iso image to be deployed (needs to be provided in a URI - style, it can be a local resource: file:// or a remote resource http(s)://) - --NOTE: Root priviledges are needed for this script to run -- -- - Examples: - sudo `basename $0` -b file:///home/jenkins/lab-config -l lf -p pod1 -s ha_odl-l3_heat_ceilometer -i file:///home/jenkins/myiso.iso - EOF -@@ -231,9 +228,6 @@ fi - # Enable the automatic exit trap - trap do_exit SIGINT SIGTERM EXIT - --# Set no restrictive umask so that Jenkins can removeeee any residuals --umask 0000 -- - clean - - pushd ${DEPLOY_DIR} > /dev/null --- -2.5.5 - diff --git a/patches/opnfv-fuel/0007-Remove-check-for-root.patch b/patches/opnfv-fuel/0007-Remove-check-for-root.patch deleted file mode 100644 index 2282f59d..00000000 --- a/patches/opnfv-fuel/0007-Remove-check-for-root.patch +++ /dev/null @@ -1,85 +0,0 @@ -From b7d5f0ca9a76de6d99fc5d6f5cbb8df864c62b7b Mon Sep 17 00:00:00 2001 -From: Josep Puigdemont -Date: Wed, 4 May 2016 14:27:23 +0200 -Subject: [PATCH] Remove check for root - -Change-Id: Ic6bfaf07c0d9d347aec2df8724184d0314665503 -Signed-off-by: Josep Puigdemont ---- - ci/deploy.sh | 5 ----- - deploy/deploy-config.py | 1 - - deploy/deploy.py | 2 -- - deploy/environments/virtual_fuel.py | 2 -- - 4 files changed, 10 deletions(-) - -diff --git a/ci/deploy.sh b/ci/deploy.sh -index c08a94b..081806c 100755 ---- a/ci/deploy.sh -+++ b/ci/deploy.sh -@@ -209,11 +209,6 @@ do - esac - done - --if [[ $EUID -ne 0 ]]; then -- echo "This script must be run as root" 1>&2 -- exit 1 --fi -- - if [ -z $BASE_CONFIG_URI ] || [ -z $TARGET_LAB ] || \ - [ -z $TARGET_POD ] || [ -z $DEPLOY_SCENARIO ] || \ - [ -z $ISO ]; then -diff --git a/deploy/deploy-config.py b/deploy/deploy-config.py -index 65d51b2..88a1111 100644 ---- a/deploy/deploy-config.py -+++ b/deploy/deploy-config.py -@@ -40,7 +40,6 @@ from common import ( - check_file_exists, - create_dir_if_not_exists, - delete, -- check_if_root, - ArgParser, - ) - -diff --git a/deploy/deploy.py b/deploy/deploy.py -index 56e5bd5..a021e28 100755 ---- a/deploy/deploy.py -+++ b/deploy/deploy.py -@@ -33,7 +33,6 @@ from common import ( - check_dir_exists, - create_dir_if_not_exists, - delete, -- check_if_root, - ArgParser, - ) - -@@ -234,7 +233,6 @@ class AutoDeploy(object): - return 0 - - def run(self): -- check_if_root() - if self.cleanup_only: - self.cleanup_execution_environment() - else: -diff --git a/deploy/environments/virtual_fuel.py b/deploy/environments/virtual_fuel.py -index b1a76e4..4ff68f6 100644 ---- a/deploy/environments/virtual_fuel.py -+++ b/deploy/environments/virtual_fuel.py -@@ -18,7 +18,6 @@ import time - from common import ( - exec_cmd, - check_file_exists, -- check_if_root, - delete, - log, - ) -@@ -135,7 +134,6 @@ class VirtualFuel(ExecutionEnvironment): - vm_definition_overwrite) - - def setup_environment(self): -- check_if_root() - self.cleanup_environment() - self.create_vm() - --- -2.5.5 - diff --git a/patches/opnfv-fuel/0007-deploy-Fix-add-bootstrap-DEA-override-delay.patch b/patches/opnfv-fuel/0007-deploy-Fix-add-bootstrap-DEA-override-delay.patch new file mode 100644 index 00000000..88ac7625 --- /dev/null +++ b/patches/opnfv-fuel/0007-deploy-Fix-add-bootstrap-DEA-override-delay.patch @@ -0,0 +1,32 @@ +From: Alexandru Avadanii +Date: Wed, 17 Aug 2016 16:18:26 +0200 +Subject: [PATCH] deploy: Fix/add bootstrap DEA override delay + +Previous change adding support for DEA to override bootstrap config +did not account for slow execution on remote servers, so add a +one minute sleep before checking for completition of fuel install. + +Signed-off-by: Alexandru Avadanii +--- + deploy/install_fuel_master.py | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/deploy/install_fuel_master.py b/deploy/install_fuel_master.py +index 808d0b1..1a7685a 100644 +--- a/deploy/install_fuel_master.py ++++ b/deploy/install_fuel_master.py +@@ -196,11 +196,13 @@ class InstallFuelMaster(object): + self.work_dir, os.path.basename(self.dea_file))) + + def wait_until_installation_completed(self): +- WAIT_LOOP = 360 ++ WAIT_LOOP = 720 + SLEEP_TIME = 10 + CMD = 'pgrep -f %s' % BOOTSTRAP_ADMIN + + install_completed = False ++ time.sleep(60) ++ self.wait_for_node_up() + with self.ssh: + for i in range(WAIT_LOOP): + ret = self.ssh.exec_cmd(CMD) diff --git a/patches/opnfv-fuel/0009-dea_base-replace-grub-pc-by-grub-efi-arm64.patch b/patches/opnfv-fuel/0009-dea_base-replace-grub-pc-by-grub-efi-arm64.patch deleted file mode 100644 index 08b84def..00000000 --- a/patches/opnfv-fuel/0009-dea_base-replace-grub-pc-by-grub-efi-arm64.patch +++ /dev/null @@ -1,22 +0,0 @@ -From: Josep Puigdemont -Date: Mon, 11 Jul 2016 15:21:56 +0200 -Subject: [PATCH] dea_base: replace grub-pc by grub-efi-arm64 - -Signed-off-by: Josep Puigdemont ---- - deploy/config/dea_base.yaml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/deploy/config/dea_base.yaml b/deploy/config/dea_base.yaml -index 0b8485b..658b328 100644 ---- a/deploy/config/dea_base.yaml -+++ b/deploy/config/dea_base.yaml -@@ -462,7 +462,7 @@ settings: - - gdisk - -- grub-pc -+ grub-efi-arm64 - - hpsa-dkms - diff --git a/patches/opnfv-fuel/0010-post-scripts-Allow-SSH-on-non-admin-ifaces.patch b/patches/opnfv-fuel/0010-post-scripts-Allow-SSH-on-non-admin-ifaces.patch deleted file mode 100644 index e098d47c..00000000 --- a/patches/opnfv-fuel/0010-post-scripts-Allow-SSH-on-non-admin-ifaces.patch +++ /dev/null @@ -1,47 +0,0 @@ -From: Alexandru Avadanii -Date: Tue, 12 Jul 2016 16:12:25 +0200 -Subject: [PATCH] post-scripts: Allow SSH on non-admin ifaces. - -By default, Fuel 9.0 configures iptables to only accept SSH connections -on admin interface. - -If more than the admin interface is configured (e.g. by transplant script -or manually in fuel menu), whitelist SSH connections on all ifaces. - -Signed-off-by: Alexandru Avadanii ---- - .../post-scripts/10_accept_ssh_all_ifaces.sh | 25 ++++++++++++++++++++++ - 1 file changed, 25 insertions(+) - create mode 100755 build/f_isoroot/f_bootstrap/post-scripts/10_accept_ssh_all_ifaces.sh - -diff --git a/build/f_isoroot/f_bootstrap/post-scripts/10_accept_ssh_all_ifaces.sh b/build/f_isoroot/f_bootstrap/post-scripts/10_accept_ssh_all_ifaces.sh -new file mode 100755 -index 0000000..b551516 ---- /dev/null -+++ b/build/f_isoroot/f_bootstrap/post-scripts/10_accept_ssh_all_ifaces.sh -@@ -0,0 +1,25 @@ -+#/bin/sh -+############################################################################## -+# Copyright (c) 2016 Enea AB and others. -+# Alexandru.Avadanii@enea.com -+# All rights reserved. This program and the accompanying materials -+# are made available under the terms of the Apache License, Version 2.0 -+# which accompanies this distribution, and is available at -+# http://www.apache.org/licenses/LICENSE-2.0 -+############################################################################## -+ -+# Only mess with iptables if we have additional interfaces configured -+if grep -q "DEFROUTE=no" "/etc/sysconfig/network-scripts/ifcfg-eth0"; then -+ echo "iptables: Allow SSH connections on all interfaces" -+ # By default, Fuel 9.0 configures iptables to only accept SSH connections -+ # on admin interface. Whitelist SSH connections on all ifaces. -+ while [ $? -eq 0 ]; do -+ # First, try removing the rule we want to add to prevent duplicates -+ iptables -D INPUT -p tcp --dport ssh -j ACCEPT > /dev/null 2>&1; -+ done -+ iptables -A INPUT -p tcp --dport ssh -j ACCEPT -+ service iptables save -+ echo "iptables: Done configuring SSH" -+else -+ echo "iptables: Skipping configuring SSH for non-admin ifaces" -+fi 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 deleted file mode 100644 index 1c9bd82a..00000000 --- a/patches/opnfv-fuel/0015-build-Makefile-Overrideable-product-commit-hash.patch +++ /dev/null @@ -1,35 +0,0 @@ -From: Alexandru Avadanii -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 ---- - 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/0020-Add-arm64-deb-repositories-setup.patch b/patches/opnfv-fuel/0020-Add-arm64-deb-repositories-setup.patch deleted file mode 100644 index 9083ceb1..00000000 --- a/patches/opnfv-fuel/0020-Add-arm64-deb-repositories-setup.patch +++ /dev/null @@ -1,166 +0,0 @@ -From: Stanislaw Kardach -Date: Wed, 24 Feb 2016 20:04:03 +0100 -Subject: [PATCH] Add arm64 deb repositories setup - ---- - build/f_isoroot/f_kscfg/ks.cfg.patch | 10 ++++++++++ - build/install/apt-ftparchive-deb.conf | 8 +++++++- - build/install/apt-ftparchive-release.conf | 2 +- - build/install/apt-ftparchive-udeb.conf | 7 ++++++- - build/install/install.sh | 22 ++++++++++++++++++---- - build/install/uninstall.sh | 18 ++++++++++-------- - 6 files changed, 52 insertions(+), 15 deletions(-) - -diff --git a/build/f_isoroot/f_kscfg/ks.cfg.patch b/build/f_isoroot/f_kscfg/ks.cfg.patch -index a6840e4..e1ae8fc 100644 ---- a/build/f_isoroot/f_kscfg/ks.cfg.patch -+++ b/build/f_isoroot/f_kscfg/ks.cfg.patch -@@ -1,6 +1,16 @@ - *** /dev/null 2016-04-26 10:10:11.481587709 +0200 - --- ks.cfg 2016-04-26 10:10:11.481587709 +0200 - *************** -+*** 448,453 **** -+--- 448,454 ---- -+ cp ${SOURCE}/.treeinfo ${repodir}/centos/x86_64 -+ -+ # Copying Ubuntu files -++ # FIXME: This is missleading as dist/pool may contain multiple arch! -+ mkdir -p ${repodir}/ubuntu/x86_64/images -+ cp -r ${SOURCE}/ubuntu/dists ${repodir}/ubuntu/x86_64 -+ cp -r ${SOURCE}/ubuntu/pool ${repodir}/ubuntu/x86_64 -+*************** - *** 579,584 **** - --- 579,592 ---- - -diff --git a/build/install/apt-ftparchive-deb.conf b/build/install/apt-ftparchive-deb.conf -index 0d15aec..e6392f8 100644 ---- a/build/install/apt-ftparchive-deb.conf -+++ b/build/install/apt-ftparchive-deb.conf -@@ -16,12 +16,18 @@ TreeDefault { - Directory "pool"; - }; - --BinDirectory "pool/main" { -+BinDirectory "pool/main/binary-amd64" { - Packages "dists/trusty/main/binary-amd64/Packages"; - BinOverride "./indices/override.trusty.main"; - ExtraOverride "./indices/override.trusty.extra.main"; - }; - -+BinDirectory "pool/main/binary-arm64" { -+ Packages "dists/trusty/main/binary-arm64/Packages"; -+ BinOverride "./indices/override.trusty.main"; -+ ExtraOverride "./indices/override.trusty.extra.main"; -+}; -+ - Default { - Packages { - Extensions ".deb"; -diff --git a/build/install/apt-ftparchive-release.conf b/build/install/apt-ftparchive-release.conf -index 02706bd..2838714 100644 ---- a/build/install/apt-ftparchive-release.conf -+++ b/build/install/apt-ftparchive-release.conf -@@ -13,6 +13,6 @@ APT::FTPArchive::Release::Label "Ubuntu"; - APT::FTPArchive::Release::Suite "trusty"; - APT::FTPArchive::Release::Version "1.04"; - APT::FTPArchive::Release::Codename "trusty"; --APT::FTPArchive::Release::Architectures "amd64"; -+APT::FTPArchive::Release::Architectures "amd64 arm64"; - APT::FTPArchive::Release::Components "main"; - APT::FTPArchive::Release::Description "Ubuntu Trusty Tahr 14.04 LTS"; -diff --git a/build/install/apt-ftparchive-udeb.conf b/build/install/apt-ftparchive-udeb.conf -index 3b5b239..c6ab4fb 100644 ---- a/build/install/apt-ftparchive-udeb.conf -+++ b/build/install/apt-ftparchive-udeb.conf -@@ -16,11 +16,16 @@ TreeDefault { - Directory "pool"; - }; - --BinDirectory "pool/debian-installer" { -+BinDirectory "pool/debian-installer/binary-amd64" { - Packages "dists/trusty/main/debian-installer/binary-amd64/Packages"; - BinOverride "./indices/override.trusty.main.debian-installer"; - }; - -+BinDirectory "pool/debian-installer/binary-arm64" { -+ Packages "dists/trusty/main/debian-installer/binary-arm64/Packages"; -+ BinOverride "./indices/override.trusty.main.debian-installer"; -+}; -+ - Default { - Packages { - Extensions ".udeb"; -diff --git a/build/install/install.sh b/build/install/install.sh -index 4e0389e..8c29e08 100755 ---- a/build/install/install.sh -+++ b/build/install/install.sh -@@ -122,12 +122,24 @@ prep_make_live() { - ssh-copy-id root@$FUELHOST - sshfs root@1${FUELHOST}:/ $TMP_HOSTMOUNT - -- if [ -f $REPO/dists/trusty/main/binary-amd64/Packages.backup ]; then -+ for arch in arm64 amd64; do -+ if [ -f $REPO/dists/trusty/main/binary-${arch}/Packages.backup ]; then -+ echo "Error - found backup file for Packages for ${arch}!" -+ exit 1 -+ fi -+ -+ if [ -f $REPO/dists/trusty/main/binary-${arch}/Packages.gz.backup ]; then -+ echo "Error - found backup file for Packages.gz for ${arch}!" -+ exit 1 -+ fi -+ done -+ -+ if [ -f $REPO/dists/trusty/main/binary-arm64/Packages.backup ]; then - echo "Error - found backup file for Packages!" - exit 1 - fi - -- if [ -f $REPO/dists/trusty/main/binary-amd64/Packages.gz.backup ]; then -+ if [ -f $REPO/dists/trusty/main/binary-arm64/Packages.gz.backup ]; then - echo "Error - found backup file for Packages.gz!" - exit 1 - fi -@@ -142,8 +154,10 @@ prep_make_live() { - exit 1 - fi - -- cp $REPO/dists/trusty/main/binary-amd64/Packages $REPO/dists/trusty/main/binary-amd64/Packages.backup -- cp $REPO/dists/trusty/main/binary-amd64/Packages.gz $REPO/dists/trusty/main/binary-amd64/Packages.gz.backup -+ for arch in arm64 amd64; do -+ cp $REPO/dists/trusty/main/binary-${arch}/Packages $REPO/dists/trusty/main/binary-${arch}/Packages.backup -+ cp $REPO/dists/trusty/main/binary-${arch}/Packages.gz $REPO/dists/trusty/main/binary-${arch}/Packages.gz.backup -+ done - cp $REPO/dists/trusty/Release $REPO/dists/trusty/Release.backup - cp -Rvp $DEST/etc/puppet $DEST/etc/puppet.backup - } -diff --git a/build/install/uninstall.sh b/build/install/uninstall.sh -index a9e74bc..e90c632 100755 ---- a/build/install/uninstall.sh -+++ b/build/install/uninstall.sh -@@ -31,15 +31,17 @@ DEST=$MOUNT - REPO=$DEST/var/www/nailgun/ubuntu/fuelweb/x86_64 - - cd $REPO --if [ ! -f $REPO/dists/trusty/main/binary-amd64/Packages.backup ]; then -- echo "Error - didn't find backup file for Packages!" -- exit 1 --fi -+for arch in arm64 amd64; do -+ if [ ! -f $REPO/dists/trusty/main/binary-${arch}/Packages.backup ]; then -+ echo "Error - didn't find backup file for Packages for ${arch}!" -+ exit 1 -+ fi - --if [ ! -f $REPO/dists/trusty/main/binary-amd64/Packages.gz.backup ]; then -- echo "Error - didn't find backup file for Packages.gz!" -- exit 1 --fi -+ if [ ! -f $REPO/dists/trusty/main/binary-${arch}/Packages.gz.backup ]; then -+ echo "Error - didn't find backup file for Packages.gz for ${arch}!" -+ exit 1 -+ fi -+done - - if [ ! -f $REPO/dists/trusty/Release.backup ]; then - echo "Error - didn't find backup file for Release!" diff --git a/patches/opnfv-fuel/0021-Build-bootstrap-image-for-arm64.patch b/patches/opnfv-fuel/0021-Build-bootstrap-image-for-arm64.patch deleted file mode 100644 index 4daf733e..00000000 --- a/patches/opnfv-fuel/0021-Build-bootstrap-image-for-arm64.patch +++ /dev/null @@ -1,27 +0,0 @@ -From: Stanislaw Kardach -Date: Thu, 3 Mar 2016 19:04:07 +0100 -Subject: [PATCH] Build bootstrap image for arm64 - -For now the arch is hardcoded for simplicity. We should detect this -but how? If we're multi-arch then one bootstrap image should be built -per supported arch. This requires Fuel refactoring. ---- - build/bootstrap_admin_node.sh.patch | 17 +++++++++++++++++ - 1 file changed, 17 insertions(+) - -diff --git a/build/patch-repos/0010-bootstrap_admin_node.sh.patch b/build/patch-repos/0010-bootstrap_admin_node.sh.patch ---- a/build/patch-repos/0010-bootstrap_admin_node.sh.patch -+++ b/build/patch-repos/0010-bootstrap_admin_node.sh.patch -@@ -53,3 +53,12 @@ - # Enable iptables - systemctl enable iptables.service -+@@ -484,7 +490,7 @@ -+ local ret=1 -+ echo ${bs_progress_message} >&2 -+ set_ui_bootstrap_error "${bs_progress_message}" >&2 -+- if fuel-bootstrap -v --debug build --activate >>"$bs_build_log" 2>&1; then -++ if fuel-bootstrap -v --debug build --target_arch arm64 --activate >>"$bs_build_log" 2>&1; then -+ ret=0 -+ fuel notify --topic "done" --send "${bs_done_message}" -+ else - @@ -532,6 +545,16 @@ systemctl start ntpd diff --git a/patches/opnfv-fuel/0022-bootstrap-Use-public-Ubuntu-ports-mirrors.patch b/patches/opnfv-fuel/0022-bootstrap-Use-public-Ubuntu-ports-mirrors.patch deleted file mode 100644 index ff13b39b..00000000 --- a/patches/opnfv-fuel/0022-bootstrap-Use-public-Ubuntu-ports-mirrors.patch +++ /dev/null @@ -1,46 +0,0 @@ -From: Alexandru Avadanii -Date: Thu, 3 Mar 2016 19:18:27 +0100 -Subject: [PATCH] bootstrap: Use public Ubuntu-ports mirrors. - -Instead of relying on 127.0.0.1 partial Ubuntu mirror, use -public archives. -While doing so, switch to Ubuntu-ports, enabling building arm64 -bootstraps. - -NOTE: This disables the abillity to build amd64 bootstraps with -current config. ---- - build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml b/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml -index aa12c45..2e4843d 100644 ---- a/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml -+++ b/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml -@@ -36,19 +36,19 @@ - repos: - - name: ubuntu - section: "main universe multiverse" -- uri: "http://127.0.0.1:8080/mirrors/ubuntu" -+ uri: "http://ports.ubuntu.com/ubuntu-ports" - priority: - suite: trusty - type: deb - - name: ubuntu-updates - section: "main universe multiverse" -- uri: "http://127.0.0.1:8080/mirrors/ubuntu" -+ uri: "http://ports.ubuntu.com/ubuntu-ports" - priority: - suite: trusty-updates - type: deb - - name: ubuntu-security - section: "main universe multiverse" -- uri: "http://127.0.0.1:8080/mirrors/ubuntu" -+ uri: "http://ports.ubuntu.com/ubuntu-ports" - priority: - suite: trusty-security - type: deb -@@ -60,2 +60,3 @@ - direct_repo_addresses: -+ - "ports.ubuntu.com" - - "127.0.0.1" diff --git a/patches/opnfv-fuel/0027-UX-Update-bootstrap-target-build-time-estimate.patch b/patches/opnfv-fuel/0027-UX-Update-bootstrap-target-build-time-estimate.patch deleted file mode 100644 index fe623957..00000000 --- a/patches/opnfv-fuel/0027-UX-Update-bootstrap-target-build-time-estimate.patch +++ /dev/null @@ -1,38 +0,0 @@ -From: Alexandru Avadanii -Date: Mon, 9 May 2016 17:05:53 +0200 -Subject: [PATCH] UX: Update bootstrap/target build time estimate. - -While building for a different architecture (e.g. AArch64 on x86_64), -the bootstrap/target image build may take longer, due to latency -introduced by using qemu-user-static. - -Signed-off-by: Alexandru Avadanii ---- - build/bootstrap_admin_node.sh.patch | 23 +++++++++++++++++++++++ - 1 file changed, 23 insertions(+) - -diff --git a/build/patch-repos/0010-bootstrap_admin_node.sh.patch b/build/patch-repos/0010-bootstrap_admin_node.sh.patch -index c66b497..46b53e6 100644 ---- a/build/patch-repos/0010-bootstrap_admin_node.sh.patch -+++ b/build/patch-repos/0010-bootstrap_admin_node.sh.patch -@@ -8,5 +8,20 @@ - --- a/iso/bootstrap_admin_node.sh - +++ b/iso/bootstrap_admin_node.sh -+@@ -86,9 +86,11 @@ -+ http://docs.openstack.org/developer/fuel-docs/userdocs/fuel-install-guide/bootstrap/\ -+ bootstrap_troubleshoot.html" -+ bs_progress_message="There is no active bootstrap. Bootstrap image building \ -+-is in progress. Usually it takes 15-20 minutes. It depends on your internet \ -+-connection and hardware performance. After bootstrap image becomes available, \ -+-reboot nodes that failed to be discovered." -++is in progress. Usually it takes 15-20 minutes for a native build (x86_64) \ -++and/or 30-45 minutes for each cross-build (e.g. AArch64). \ -++It depends on your internet connection, hardware performance and selected \ -++bootstrap architecture(s). This ISO supports AArch64 only. After bootstrap \ -++image becomes available, reboot nodes that failed to be discovered." -+ bs_done_message="Default bootstrap image building done. Now you can boot new \ -+ nodes over PXE, they will be discovered and become available for installing \ -+ OpenStack on them" - @@ -339,8 +339,22 @@ fuelmenu --save-only --iface=$ADMIN_INTERFACE || fail - set +x - echo "Done!" diff --git a/patches/opnfv-fuel/0028-bootstrap-Add-lshw-package.patch b/patches/opnfv-fuel/0028-bootstrap-Add-lshw-package.patch deleted file mode 100644 index a811f2f3..00000000 --- a/patches/opnfv-fuel/0028-bootstrap-Add-lshw-package.patch +++ /dev/null @@ -1,29 +0,0 @@ -From: Alexandru Avadanii -Date: Tue, 24 May 2016 16:42:21 +0200 -Subject: [PATCH] bootstrap: Add lshw package. - -Until Ubuntu Trusty fixes the following bug on AArch64 [1]: -"AArch64: slow cpuinfo due to redundant loop" -we will be using a patched version of from Armband MOS repos. - -This change enforces replacing the lshw from Ubuntu with our custom, -patched package. - -[1] https://bugs.launchpad.net/ubuntu/+source/lshw/+bug/1582181 - -Signed-off-by: Alexandru Avadanii ---- - 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 15d9e9d..b45a14a 100644 ---- a/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml -+++ b/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml -@@ -17,5 +17,6 @@ - - live-boot - - live-boot-initramfs-tools -+ - lshw - - mc - - mcollective - - msmtp-mta diff --git a/patches/opnfv-fuel/0030-deploy.py-add-a-time-stamp-to-the-new-ISO-image.patch b/patches/opnfv-fuel/0030-deploy.py-add-a-time-stamp-to-the-new-ISO-image.patch deleted file mode 100644 index 3e3480b1..00000000 --- a/patches/opnfv-fuel/0030-deploy.py-add-a-time-stamp-to-the-new-ISO-image.patch +++ /dev/null @@ -1,39 +0,0 @@ -From: Josep Puigdemont -Date: Tue, 17 May 2016 14:40:48 +0200 -Subject: [PATCH] deploy.py: add a time stamp to the new ISO image - -Add a time stamp to the newly create ISO image. This is to prevent name -collisions with other ISO images from earlier deploy jobs. - -Ideally this will only be a temporary need, and releng will provide with -unique IDs for each job that we can use to this effect. - -Signed-off-by: Josep Puigdemont ---- - deploy/deploy.py | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/deploy/deploy.py b/deploy/deploy.py -index 041ba2f..cebef97 100755 ---- a/deploy/deploy.py -+++ b/deploy/deploy.py -@@ -13,6 +13,7 @@ import os - import io - import re - import sys -+import time - import yaml - import errno - import signal -@@ -100,8 +101,9 @@ class AutoDeploy(object): - - def install_fuel_master(self): - log('Install Fuel Master') -- new_iso = ('%s/deploy-%s' -- % (self.tmp_dir, os.path.basename(self.iso_file))) -+ stamp = time.strftime("%Y%m%d%H%M%S") -+ new_iso = ('%s/deploy-%s-%s' -+ % (self.tmp_dir, stamp, os.path.basename(self.iso_file))) - self.patch_iso(new_iso) - self.iso_file = new_iso - self.install_iso() diff --git a/patches/opnfv-fuel/0031-post-scripts-Enable-systemd-binfmt-for-first-boot.patch b/patches/opnfv-fuel/0031-post-scripts-Enable-systemd-binfmt-for-first-boot.patch deleted file mode 100644 index 03e877a1..00000000 --- a/patches/opnfv-fuel/0031-post-scripts-Enable-systemd-binfmt-for-first-boot.patch +++ /dev/null @@ -1,93 +0,0 @@ -From: Alexandru Avadanii -Date: Thu, 9 Jun 2016 19:46:56 +0200 -Subject: [PATCH] post-scripts: Enable systemd-binfmt for first boot. - -IMPORTANT: -This commit introduces the following file on Fuel Master, -containing the list of arch supported for target nodes: -. - -This file is created AFTER pre.d OPNFV scripts are ran, also by -bootstrap_admin_node.sh, BEFORE the post.d scripts are executed. -NOTE: Arch format is the same used by dpkg (e.g.: "amd64 arm64") - -Based on the number of foreign architectures we should support -(the list of archs in /etc/fuel_openstack_arch minus native arch), -we determine whether cross-builds are expected, in which case -binfmt support should be functional during first Fuel Master boot. - -Since systemd-binfmt service has a series of preconditions for -starting, which are tested early during first boot, some of them -are NOT YET true (e.g. no binfmt handlers are present before -qemu-user-static package is installed), so the service is not -automatically started. Of course, this only affects the first boot. - -Finally, this commit adds an OPNFV post-install script in -/opt/opnfv/bootstrap/post.d, which starts systemd-binfmt service. ---- - build/bootstrap_admin_node.sh.patch | 15 ++++++++++ - .../post-scripts/80_prepare_cross_builds.sh | 32 ++++++++++++++++++++++ - 2 files changed, 47 insertions(+) - create mode 100755 build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh - -diff --git a/build/patch-repos/0010-bootstrap_admin_node.sh.patch b/build/patch-repos/0010-bootstrap_admin_node.sh.patch -index b1ea90b..7f16d0b 100644 ---- a/build/patch-repos/0010-bootstrap_admin_node.sh.patch -+++ b/build/patch-repos/0010-bootstrap_admin_node.sh.patch -@@ -24,5 +24,18 @@ - nodes over PXE, they will be discovered and become available for installing \ - OpenStack on them" -+@@ -239,6 +239,12 @@ -+ # /etc/fuel_openstack_version is provided by 'fuel-openstack-metadata' package -+ OPENSTACK_VERSION=$(cat /etc/fuel_openstack_version) -+ -++# FIXME(armband): This part might be moved to an earlier stage later -++# /etc/fuel_openstack_arch is constructed based on local mirror metadata -++grep -oP "^Architectures: \K.*$" \ -++ ${wwwdir}/${OPENSTACK_VERSION}/ubuntu/x86_64/dists/mos${FUEL_RELEASE}/Release > \ -++ /etc/fuel_openstack_arch -++ -+ # We do not ship debian-installer kernel and initrd on ISO. -+ # But we still need to be able to create ubuntu cobbler distro -+ # which requires kernel and initrd to be available. So, we - @@ -339,8 +339,22 @@ fuelmenu --save-only --iface=$ADMIN_INTERFACE || fail - set +x - echo "Done!" -diff --git a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh -new file mode 100755 -index 0000000..d33d1d1 ---- /dev/null -+++ b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh -@@ -0,0 +1,32 @@ -+#/bin/sh -+############################################################################## -+# Copyright (c) 2016 Enea AB and others. -+# Alexandru.Avadanii@enea.com -+# All rights reserved. This program and the accompanying materials -+# are made available under the terms of the Apache License, Version 2.0 -+# which accompanies this distribution, and is available at -+# http://www.apache.org/licenses/LICENSE-2.0 -+############################################################################## -+ -+echo "Preparing for cross-building bootstrap/target images" -+ -+# Fmt handlers are set up by qemu-user-static (after systemd-binfmt -+# prerequisites are checked during first boot of Fuel Master node). -+ -+# Cross-building support provides dpkg, as a fuel-agent dependency -+if which dpkg > /dev/null 2>&1; then -+ # /etc/fuel_openstack_arch is created by bootstrap_admin_node.sh -+ FOREIGN_ARCH_CNT=$(sed -e "s/$(dpkg --print-architecture)//" \ -+ /etc/fuel_openstack_arch | wc -w) -+ if [ ${FOREIGN_ARCH_CNT} -gt 0 ]; then -+ # If no fmt handlers are configured, the service is not started, -+ # so request it explicitly (only necessary for the first boot). -+ systemctl start systemd-binfmt -+ if [ $? -ne 0 ]; then -+ echo "Error starting systemd-binfmt!" -+ exit 1 -+ fi -+ fi -+fi -+ -+echo "Done preparing cross-building" diff --git a/patches/opnfv-fuel/0032-mcagent-Increase-max-shell-command-timeout-to-2h.patch b/patches/opnfv-fuel/0032-mcagent-Increase-max-shell-command-timeout-to-2h.patch deleted file mode 100644 index f5fc4cf1..00000000 --- a/patches/opnfv-fuel/0032-mcagent-Increase-max-shell-command-timeout-to-2h.patch +++ /dev/null @@ -1,49 +0,0 @@ -From: Alexandru Avadanii -Date: Thu, 9 Jun 2016 21:37:48 +0200 -Subject: [PATCH] mcagent: Increase max shell command timeout to 2h - -Since `execute_shell_command` mcagent is used for building the target -image and the timeout provided in the astute task is just respected on -the Astute level (on mcollective level this timeout is actually a -minumum between value provided and ddl value) we need to increase it -for Armband operation. - -Because Armband builds the target image via `qemu-debootstrap`, it can -take more than 1 hour to finish the building. Therefore aside of -increasing the timeout in the Astute task, the maximum timeout value -for mcagent has to be increased. - -[ Alexandru Avadanii ] -Repackaged, based on Stan's `fuel-astute` patch. - -Signed-off-by: Stanislaw Kardach -Signed-off-by: Alexandru Avadanii ---- - .../f_bootstrap/post-scripts/80_prepare_cross_builds.sh | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) - -diff --git a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh -index d33d1d1..d78b850 100755 ---- a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh -+++ b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh -@@ -26,6 +26,20 @@ if which dpkg > /dev/null 2>&1; then - echo "Error starting systemd-binfmt!" - exit 1 - fi -+ -+ # Cross-build timeout adjustments -+ # -+ # Since `execute_shell_command` mcagent is used for building the target -+ # image and the timeout provided in the astute task is just respected on -+ # the Astute level (on mcollective level this timeout is actually a -+ # minumum between value provided and ddl value) we need to increase it -+ # for cross-build operations. -+ -+ # Building the target image via `qemu-debootstrap` can take more than -+ # 1 hour. Therefore aside of increasing the timeout in the Astute task, -+ # the maximum timeout value for mcagent has to be increased (use 2h). -+ sed -i.bak -r 's/^(\s+:timeout\s*=>)\s*[[:digit:]]+$/\1 7200/' \ -+ /usr/libexec/mcollective/mcollective/agent/execute_shell_command.ddl - fi - fi - diff --git a/patches/opnfv-fuel/0033-bootstrap-Use-gzip-instead-of-xz-compression.patch b/patches/opnfv-fuel/0033-bootstrap-Use-gzip-instead-of-xz-compression.patch deleted file mode 100644 index e7b176b9..00000000 --- a/patches/opnfv-fuel/0033-bootstrap-Use-gzip-instead-of-xz-compression.patch +++ /dev/null @@ -1,52 +0,0 @@ -From: Alexandru Avadanii -Date: Fri, 10 Jun 2016 22:30:29 +0200 -Subject: [PATCH] bootstrap: Use gzip instead of xz compression. - -bootstrap mksquashfs using qemu-user-static is extremely slow, -taking up to one hour. gzip, on the other hand, is reasonably fast. -According to [1], xz is slower, with not much size gain. - -[1] https://jonathancarter.org/2015/04/06/squashfs-performance-testing/ - -Signed-off-by: Alexandru Avadanii ---- - .../post-scripts/80_prepare_cross_builds.sh | 19 +++++++++++++++++++ - 1 file changed, 19 insertions(+) - -diff --git a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh -index 3839d62..7ceaacc 100755 ---- a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh -+++ b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh -@@ -27,6 +27,11 @@ if which dpkg > /dev/null 2>&1; then - exit 1 - fi - -+ # Determine python site-packages directory location -+ PYTHON_SITEPKGS_DIR=$(python -c \ -+ "from distutils.sysconfig import get_python_lib; print(get_python_lib())") -+ [ -d ${PYTHON_SITEPKGS_DIR} ] || exit 1 -+ - # Cross-build timeout adjustments - # - # Since `execute_shell_command` mcagent is used for building the target -@@ -40,6 +45,20 @@ if which dpkg > /dev/null 2>&1; then - # the maximum timeout value for mcagent has to be increased (use 2h). - sed -i.bak -r 's/^(\s+:timeout\s*=>)\s*[[:digit:]]+$/\1 7200/' \ - /usr/libexec/mcollective/mcollective/agent/execute_shell_command.ddl -+ -+ # Bootstrap: Use gzip instead of xz compression. -+ # -+ # bootstrap mksquashfs via `qemu-user-static` is extremely slow, -+ # taking up to one hour. gzip, on the other hand, is reasonably fast. -+ -+ # See the following article for a comparison between gzip and xz -+ # https://jonathancarter.org/2015/04/06/squashfs-performance-testing/ -+ # xz is slower, with very little size gain. -+ if [ -f ${PYTHON_SITEPKGS_DIR}/fuel_bootstrap/consts.py ]; then -+ sed -i.bak -r "s/^(\s+'compress_format'\s*:\s*').*?('.*)$/\1gzip\2/g" \ -+ ${PYTHON_SITEPKGS_DIR}/fuel_bootstrap/consts.py -+ echo "INFO: [xz] => [gzip] updated bootstrap initrd / rootfs compression." -+ fi - fi - fi - diff --git a/patches/opnfv-fuel/0034-Nailgun-Increase-target-image-build-timeout.patch b/patches/opnfv-fuel/0034-Nailgun-Increase-target-image-build-timeout.patch deleted file mode 100644 index 2fbe680a..00000000 --- a/patches/opnfv-fuel/0034-Nailgun-Increase-target-image-build-timeout.patch +++ /dev/null @@ -1,36 +0,0 @@ -From: Alexandru Avadanii -Date: Sat, 11 Jun 2016 21:37:29 +0200 -Subject: [PATCH] Nailgun: Increase target image build timeout - -Currently we're close to 40 minutes of image building (thanks to -qemu-debootstrap). If network connectivity is a bit slow (happened to -me) it's easy to go over 1h limit. Therefore let's push this to 2 hours -to be safer. - -[ Alexandru Avadanii ] -Moved original patch wrote by Stan to post-install. - -Signed-off-by: Stanislaw Kardach -Signed-off-by: Alexandru Avadanii ---- - .../f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh -index 7ceaacc..0435a28 100755 ---- a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh -+++ b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh -@@ -45,6 +45,13 @@ if which dpkg > /dev/null 2>&1; then - # the maximum timeout value for mcagent has to be increased (use 2h). - sed -i.bak -r 's/^(\s+:timeout\s*=>)\s*[[:digit:]]+$/\1 7200/' \ - /usr/libexec/mcollective/mcollective/agent/execute_shell_command.ddl -+ # Update nailgun timeout setting (2h) -+ if [ -f ${PYTHON_SITEPKGS_DIR}/nailgun/settings.yaml ]; then -+ sed -i.bak -r \ -+ 's/^(PROVISIONING_IMAGES_BUILD_TIMEOUT:)\s*[[:digit:]]+$/\1 7200/' \ -+ ${PYTHON_SITEPKGS_DIR}/nailgun/settings.yaml -+ echo "INFO: [1h] => [2h] updated nailgun image build timeout." -+ fi - - # Bootstrap: Use gzip instead of xz compression. - # diff --git a/patches/opnfv-fuel/0035-m1.micro-Increase-profile-RAM-size-to-128MB.patch b/patches/opnfv-fuel/0035-m1.micro-Increase-profile-RAM-size-to-128MB.patch deleted file mode 100644 index 89720a2b..00000000 --- a/patches/opnfv-fuel/0035-m1.micro-Increase-profile-RAM-size-to-128MB.patch +++ /dev/null @@ -1,38 +0,0 @@ -From: Alexandru Avadanii -Date: Sat, 11 Jun 2016 23:34:48 +0200 -Subject: [PATCH] m1.micro: Increase profile RAM size to 128MB. - -TestVM (cirros) on aarch64 requires more than 64MB RAM. -Keep profiles uniform across all archs. - -Signed-off-by: Alexandru Avadanii ---- - .../f_bootstrap/post-scripts/80_prepare_cross_builds.sh | 15 +++++++++++++++ - 1 file changed, 15 insertions(+) - -diff --git a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh -index 0435a28..078f117 100755 ---- a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh -+++ b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh -@@ -66,6 +66,21 @@ if which dpkg > /dev/null 2>&1; then - ${PYTHON_SITEPKGS_DIR}/fuel_bootstrap/consts.py - echo "INFO: [xz] => [gzip] updated bootstrap initrd / rootfs compression." - fi -+ -+ # TestVM (cirros) adjustments for cross-arch -+ # -+ # TestVM (cirros) on aarch64 requires more than 64MB RAM. -+ # Keep profiles uniform across all archs by bumping micro flavor specs. -+ # m1.micro: Increase profile RAM size to 128MB. -+ OPENSTACK_VERSION=$(cat /etc/fuel_openstack_version) -+ CONTROLLER_PP="/etc/puppet/${OPENSTACK_VERSION}/modules/openstack_tasks" -+ CONTROLLER_PP+="/manifests/openstack_controller/openstack_controller.pp" -+ if [ -f ${CONTROLLER_PP} ]; then -+ sed -i.bak -r \ -+ 's/^(.*flavor-create.*m1\.micro auto)\s+[[:digit:]]+(.*)$/\1 128\2/' \ -+ ${CONTROLLER_PP} -+ echo "INFO: [64] => [128] updated m1.micro profile RAM size (MB)." -+ fi - fi - fi - diff --git a/patches/opnfv-fuel/0039-deploy-Fix-add-bootstrap-DEA-override-delay.patch b/patches/opnfv-fuel/0039-deploy-Fix-add-bootstrap-DEA-override-delay.patch deleted file mode 100644 index 2189b004..00000000 --- a/patches/opnfv-fuel/0039-deploy-Fix-add-bootstrap-DEA-override-delay.patch +++ /dev/null @@ -1,32 +0,0 @@ -From: Alexandru Avadanii -Date: Wed, 17 Aug 2016 16:18:26 +0200 -Subject: [PATCH] deploy: Fix/add bootstrap DEA override delay - -Previous change adding support for DEA to override bootstrap config -did not account for slow execution on remote servers, so add a -one minute sleep before checking for completition of fuel install. - -Signed-off-by: Alexandru Avadanii ---- - deploy/install_fuel_master.py | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/deploy/install_fuel_master.py b/deploy/install_fuel_master.py -index 808d0b1..1a7685a 100644 ---- a/deploy/install_fuel_master.py -+++ b/deploy/install_fuel_master.py -@@ -196,11 +196,13 @@ class InstallFuelMaster(object): - self.work_dir, os.path.basename(self.dea_file))) - - def wait_until_installation_completed(self): -- WAIT_LOOP = 360 -+ WAIT_LOOP = 720 - SLEEP_TIME = 10 - CMD = 'ps -ef | grep %s | grep -v grep' % BOOTSTRAP_ADMIN - - install_completed = False -+ time.sleep(60) -+ self.wait_for_node_up() - with self.ssh: - for i in range(WAIT_LOOP): - ret = self.ssh.exec_cmd(CMD) 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 deleted file mode 100644 index 5dde448f..00000000 --- a/patches/opnfv-fuel/0040-Backport-dpkg-checkbuilddeps-to-mk-build-deps.patch +++ /dev/null @@ -1,58 +0,0 @@ -From: Alexandru Avadanii -Date: Wed, 6 Jul 2016 17:03:49 +0200 -Subject: [PATCH] Backport: dpkg-checkbuilddeps to mk-build-deps. - -Backported from [1]. - -[1] https://review.openstack.org/#/c/325210/ - -Signed-off-by: Alexandru Avadanii ---- - ...ce-dpkg-checkbuilddeps-with-mk-build-deps.patch | 38 ++++++++++++++++++++++ - 1 files changed, 38 insertions(+) - create mode 100644 build/replace-dpkg-checkbuilddeps-with-mk-build-deps.patch - -diff --git a/build/patch-repos/0040-replace-dpkg-checkbuilddeps-with-mk-build-deps.patch b/build/patch-repos/0040-replace-dpkg-checkbuilddeps-with-mk-build-deps.patch -new file mode 100644 -index 0000000..896f3cf ---- /dev/null -+++ b/build/patch-repos/0040-replace-dpkg-checkbuilddeps-with-mk-build-deps.patch -@@ -0,0 +1,38 @@ -+From: Sergii Golovatiuk -+Date: Fri, 3 Jun 2016 12:26:19 +0200 -+Subject: [PATCH] Replace dpkg-checkbuilddeps with mk-build-deps -+ -+dpkg-checkbuilddeps doesn't check dependencies inside chroot as in many -+cases host system might not have required packages. This change replaces -+dpkg-checkbuilddeps with mk-build-deps in chroot -+ -+Implements: mos-xenial -+Change-Id: I27a65893c1bd33e6d82c11bf3d08423562dbe4d2 -+Signed-off-by: Sergii Golovatiuk -+--- -+ packages/deb/module.mk | 5 ++--- -+ 1 file changed, 2 insertions(+), 3 deletions(-) -+ -+diff --git a/packages/deb/module.mk b/packages/deb/module.mk -+index 6c93441..c0ba737 100644 -+--- a/packages/deb/module.mk -++++ b/packages/deb/module.mk -+@@ -10,7 +10,7 @@ clean-deb: -+ done -+ sudo rm -rf $(BUILD_DIR)/packages/deb -+ -+-$(BUILD_DIR)/packages/deb/buildd.tar.gz: SANDBOX_DEB_PKGS:=wget bzip2 apt-utils build-essential python-setuptools python-pbr devscripts debhelper fakeroot -++$(BUILD_DIR)/packages/deb/buildd.tar.gz: SANDBOX_DEB_PKGS:=wget bzip2 apt-utils build-essential fakeroot devscripts equivs debhelper python-setuptools python-pbr -+ $(BUILD_DIR)/packages/deb/buildd.tar.gz: SANDBOX_UBUNTU:=$(BUILD_DIR)/packages/deb/chroot -+ $(BUILD_DIR)/packages/deb/buildd.tar.gz: export SANDBOX_UBUNTU_UP:=$(SANDBOX_UBUNTU_UP) -+ $(BUILD_DIR)/packages/deb/buildd.tar.gz: export SANDBOX_UBUNTU_DOWN:=$(SANDBOX_UBUNTU_DOWN) -+@@ -47,8 +47,7 @@ $(BUILD_DIR)/packages/deb/$1.done: $(BUILD_DIR)/repos/repos.done -+ sudo -E dch -c $$(SANDBOX_UBUNTU)/tmp/$1/debian/changelog -D $(UBUNTU_RELEASE) -b --force-distribution \ -+ -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 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 -+ sudo sh -c "$$$${SANDBOX_UBUNTU_DOWN}" diff --git a/patches/opnfv-fuel/0043-build-Add-armband.mk-config.patch b/patches/opnfv-fuel/0043-build-Add-armband.mk-config.patch deleted file mode 100644 index cb07c9fc..00000000 --- a/patches/opnfv-fuel/0043-build-Add-armband.mk-config.patch +++ /dev/null @@ -1,143 +0,0 @@ -From: Alexandru Avadanii -Date: Thu, 11 Aug 2016 15:34:32 +0200 -Subject: [PATCH] build: Add armband.mk config, env var ARMBAND_BASE - -Signed-off-by: Alexandru Avadanii ---- - build/Makefile | 10 ++++++++++ - build/armband.mk | 53 +++++++++++++++++++++++++++++++++++++++++++++++++ - build/docker/Dockerfile | 2 +- - build/docker/runcontext | 6 +++++- - 4 files changed, 69 insertions(+), 2 deletions(-) - create mode 100644 build/armband.mk - -diff --git a/build/Makefile b/build/Makefile -index 4454c35..377ecc6 100644 ---- a/build/Makefile -+++ b/build/Makefile -@@ -14,6 +14,9 @@ SHELL = /bin/bash - # settings. - -include environment.mk - -+# Override Armband specific information & git commit references -+-include armband.mk -+ - ############################################################################ - # BEGIN of variables to customize - # -@@ -129,5 +132,8 @@ $(ISOCACHE): - cd $(FUEL_MAIN_DIR) && make repos - $(REPOINFO) -r $(FUEL_MAIN_DIR) > gitinfo_fuel.txt -+ @if test -n $(ARMBAND_BASE); then \ -+ $(REPOINFO) -r $(ARMBAND_BASE) >> gitinfo_fuel.txt; \ -+ fi - # OPNFV patches at Fuel build time - # Need to be commited in order for them to be considered by the Fuel - # build system -@@ -228,5 +234,9 @@ debug: - sha1sum fuel_build_loop >> .cachedata - sha1sum config.mk >> .cachedata -+ @if test -n $(ARMBAND_BASE); then \ -+ sha1sum armband.mk >> .cachedata; \ -+ $(REPOINFO) $(ARMBAND_BASE) >> .cachedata; \ -+ fi - sha1sum Makefile >> .cachedata - $(CACHETOOL) getbiweek >> .cachedata - cat .cachedata | $(CACHETOOL) getid > .cacheid -diff --git a/build/armband.mk b/build/armband.mk -new file mode 100644 -index 0000000..1e772f0 ---- /dev/null -+++ b/build/armband.mk -@@ -0,0 +1,54 @@ -+############################################################################## -+# Copyright (c) 2016 Enea AB and others. -+# Alexandru.Avadanii@enea.com -+# All rights reserved. This program and the accompanying materials -+# are made available under the terms of the Apache License, Version 2.0 -+# which accompanies this distribution, and is available at -+# http://www.apache.org/licenses/LICENSE-2.0 -+############################################################################## -+ -+# Only configure Armband stuff when ARMBAND_BASE is set -+ifdef ARMBAND_BASE -+ # Armband plugins, supported archs & specific info -+ export PLUGINS := f_odlpluginbuild f_bgpvpn-pluginbuild f_ovs-nsh-dpdk-pluginbuild -+ export UBUNTU_ARCH := amd64 arm64 -+ export PRODNO := OPNFV_A_FUEL -+ export MIRROR_MOS_UBUNTU := linux.enea.com -+ export EXTRA_RPM_REPOS := armband,http://linux.enea.com/mos-repos/centos/mos9.0-centos7/armband/x86_64,10 -+ -+ # Temporary fuel-plugin-builder repo info for runtime patching -+ export FPB_REPO := https://github.com/openstack/fuel-plugins -+ export FPB_BRANCH := master -+ export FPB_CHANGE := refs/changes/31/311031/2 -+ -+ # Armband git submodules for Fuel/OPNFV components -+ export ASTUTE_REPO := ${ARMBAND_BASE}/upstream/fuel-astute -+ export ASTUTE_COMMIT := HEAD -+ -+ export NAILGUN_REPO := ${ARMBAND_BASE}/upstream/fuel-web -+ export NAILGUN_COMMIT := HEAD -+ -+ export FUEL_AGENT_REPO := ${ARMBAND_BASE}/upstream/fuel-agent -+ export FUEL_AGENT_COMMIT := HEAD -+ -+ export FUEL_NAILGUN_AGENT_REPO := ${ARMBAND_BASE}/upstream/fuel-nailgun-agent -+ export FUEL_NAILGUN_AGENT_COMMIT := HEAD -+ -+ export FUEL_MIRROR_REPO := ${ARMBAND_BASE}/upstream/fuel-mirror -+ export FUEL_MIRROR_COMMIT := HEAD -+ -+ export FUELLIB_REPO := ${ARMBAND_BASE}/upstream/fuel-library -+ export FUELLIB_COMMIT := HEAD -+ -+ export FUEL_PLUGIN_ODL_REPO := ${ARMBAND_BASE}/upstream/fuel-plugin-opendaylight -+ export FUEL_PLUGIN_ODL_BRANCH := armband-workbench -+ export FUEL_PLUGIN_ODL_CHANGE := HEAD -+ export OPNFV_QUAGGE_PACKAGING_REPO := https://github.com/alexandruavadanii/opnfv-quagga-packaging -+ -+ export OVS_NSH_DPDK_REPO := ${ARMBAND_BASE}/upstream/fuel-plugin-ovs -+ export OVS_NSH_DPDK_BRANCH := HEAD -+ -+ export VSPERF_REPO := ${ARMBAND_BASE}/upstream/vswitchperf -+ export VSPERF_BRANCH := armband-workbench -+ export VSPERF_CHANGE := HEAD -+endif -diff --git a/build/docker/Dockerfile b/build/docker/Dockerfile -index b38ea4c..624f233 100644 ---- a/build/docker/Dockerfile -+++ b/build/docker/Dockerfile -@@ -30,7 +30,7 @@ RUN echo "Defaults env_keep += \"ftp_proxy http_proxy https_proxy no_proxy RSYNC - # Keeping PWD is needed to build as root - RUN echo "Defaults env_keep += \"PWD\"" > /etc/sudoers.d/keep-pwd - # Keeping variables for ISO build --RUN echo "Defaults env_keep += \"MIRROR_UBUNTU MIRROR_UBUNTU_ROOT MIRROR_MOS_UBUNTU MIRROR_MOS_UBUNTU_ROOT MIRROR_FUEL LATEST_TARGET_UBUNTU UBUNTU_ARCH\"" > /etc/sudoers.d/keep-mos -+RUN echo "Defaults env_keep += \"MIRROR_UBUNTU MIRROR_UBUNTU_ROOT MIRROR_MOS_UBUNTU MIRROR_MOS_UBUNTU_ROOT MIRROR_FUEL LATEST_TARGET_UBUNTU UBUNTU_ARCH ARMBAND_BASE\"" > /etc/sudoers.d/keep-mos - RUN chmod 0440 /etc/sudoers.d/open-sudo - RUN chmod 0440 /etc/sudoers.d/keep-proxies - RUN chmod 0440 /etc/sudoers.d/keep-pwd -diff --git a/build/docker/runcontext b/build/docker/runcontext -index daad663..e4874df 100755 ---- a/build/docker/runcontext -+++ b/build/docker/runcontext -@@ -42,6 +42,10 @@ GITROOT=`git rev-parse --show-toplevel` - CID_FILE=`mktemp -u -t runcontext.XXXXXXXXXX` - CONTEXT_DIR=`mktemp -d ${GITROOT}/.docker_contextXXXXXX` - -+if [[ $ARMBAND_BASE ]]; then -+ GITROOT=$ARMBAND_BASE -+fi -+ - # If RSYNC_CONNECT_PROG is used, we need to copy all of - # the SSH structure, should one of the keys need to be - # used. -@@ -115,7 +119,7 @@ RUN_CONTEXT_OPT="--cidfile $CID_FILE --privileged=true --rm \ - -e HOME=$HOME -e CACHEDEBUG -e CACHETRANSPORT -e CACHEMAXAGE -e CACHEBASE \ - -e BUILD_FUEL_PLUGINS -e MIRROR_UBUNTU -e MIRROR_UBUNTU_ROOT \ - -e MIRROR_MOS_UBUNTU -e MIRROR_MOS_UBUNTU_ROOT -e MIRROR_FUEL \ -- -e LATEST_TARGET_UBUNTU -e UBUNTU_ARCH \ -+ -e LATEST_TARGET_UBUNTU -e UBUNTU_ARCH -e ARMBAND_BASE \ - -u $USER_ID:$GROUP_ID -w $PWD \ - -v $GITROOT:$GITROOT -v /sys/fs/cgroup:/sys/fs/cgroup:ro $CACHEMOUNT" - diff --git a/patches/opnfv-fuel/0046-build-Use-OPNFV_GIT_SHA-for-ISO-preparer-ID.patch b/patches/opnfv-fuel/0046-build-Use-OPNFV_GIT_SHA-for-ISO-preparer-ID.patch deleted file mode 100644 index e6d4dc21..00000000 --- a/patches/opnfv-fuel/0046-build-Use-OPNFV_GIT_SHA-for-ISO-preparer-ID.patch +++ /dev/null @@ -1,48 +0,0 @@ -From: Alexandru Avadanii -Date: Wed, 17 Aug 2016 21:56:22 +0200 -Subject: [PATCH] build: Use OPNFV_GIT_SHA for ISO preparer ID - -isoinfo -i lists the following information for Fuel@OPNFV ISO: -"Data preparer id: 86aafaf5454a846c417848bb94f264c4420160f3" -where the SHA hash is Fuel git repo HEAD SHA. - -However, Armband overrides OPNFV_GIT_SHA to the Armband git repo -commit hash, so the ISO metadata should also reflect this. - -Signed-off-by: Alexandru Avadanii ---- - build/docker/runcontext | 2 +- - build/install/install.sh | 6 +++++- - 2 files changed, 6 insertions(+), 2 deletions(-) - -diff --git a/build/docker/runcontext b/build/docker/runcontext -index e4874df..07b0dc1 100755 ---- a/build/docker/runcontext -+++ b/build/docker/runcontext -@@ -119,7 +119,7 @@ RUN_CONTEXT_OPT="--cidfile $CID_FILE --privileged=true --rm \ - -e HOME=$HOME -e CACHEDEBUG -e CACHETRANSPORT -e CACHEMAXAGE -e CACHEBASE \ - -e BUILD_FUEL_PLUGINS -e MIRROR_UBUNTU -e MIRROR_UBUNTU_ROOT \ - -e MIRROR_MOS_UBUNTU -e MIRROR_MOS_UBUNTU_ROOT -e MIRROR_FUEL \ -- -e LATEST_TARGET_UBUNTU -e UBUNTU_ARCH -e ARMBAND_BASE \ -+ -e LATEST_TARGET_UBUNTU -e UBUNTU_ARCH -e ARMBAND_BASE -e OPNFV_GIT_SHA \ - -u $USER_ID:$GROUP_ID -w $PWD \ - -v $GITROOT:$GITROOT -v /sys/fs/cgroup:/sys/fs/cgroup:ro $CACHEMOUNT" - -diff --git a/build/install/install.sh b/build/install/install.sh -index f6308fb..9e003bb 100755 ---- a/build/install/install.sh -+++ b/build/install/install.sh -@@ -210,8 +210,12 @@ make_iso_image() { - find . -name TRANS.TBL -exec rm {} \; - rm -rf rr_moved - -+ if [[ -z "$OPNFV_GIT_SHA" ]]; then -+ OPNFV_GIT_SHA=$(git rev-parse --verify HEAD) -+ fi -+ - mkisofs --quiet -r -V "$VOLUMEID" -publisher "$PUBLISHER" \ -- -p `git rev-parse --verify HEAD` -J -R -b isolinux/isolinux.bin \ -+ -p "$OPNFV_GIT_SHA" -J -R -b isolinux/isolinux.bin \ - -no-emul-boot \ - -boot-load-size 4 -boot-info-table \ - --hide-rr-moved \ diff --git a/patches/opnfv-fuel/0048-fpb-Support-multiple-versions-of-packages.patch b/patches/opnfv-fuel/0048-fpb-Support-multiple-versions-of-packages.patch deleted file mode 100644 index 25187b4e..00000000 --- a/patches/opnfv-fuel/0048-fpb-Support-multiple-versions-of-packages.patch +++ /dev/null @@ -1,48 +0,0 @@ -From: Alexandru Avadanii -Date: Tue, 23 Aug 2016 15:48:56 +0200 -Subject: [PATCH] fpb: Support multiple versions of packages - -This is a temporary change until the fpm installed by pip gets -the change from [1] included. - -[1] https://review.openstack.org/#/c/311031/ - -Signed-off-by: Alexandru Avadanii ---- - build/docker/Dockerfile | 9 ++++++++- - build/docker/Makefile | 4 ++++ - 2 files changed, 12 insertions(+), 1 deletion(-) - -diff --git a/build/docker/Dockerfile b/build/docker/Dockerfile -index 624f233..ab0d0d3 100644 ---- a/build/docker/Dockerfile -+++ b/build/docker/Dockerfile -@@ -23,7 +23,14 @@ RUN apt-get install -y software-properties-common python-software-properties \ - build-essential ruby-dev rubygems-integration python-pip git rpm createrepo dpkg-dev - - RUN gem install fpm --RUN pip install fuel-plugin-builder -+ -+# Temporary: fpb needs to be built from sources -+# RUN pip install fuel-plugin-builder -+RUN git clone -b INSERT_FPB_BRANCH INSERT_FPB_REPO && cd fuel-plugins && \ -+ (test -z INSERT_FPB_CHANGE || \ -+ (git fetch origin INSERT_FPB_CHANGE && git checkout FETCH_HEAD)) && \ -+ python setup.py sdist && pip install ./dist/fuel-plugin-builder-*.tar.gz && \ -+ cd .. && rm -rf fuel-plugins - - RUN echo "ALL ALL=NOPASSWD: ALL" > /etc/sudoers.d/open-sudo - RUN echo "Defaults env_keep += \"ftp_proxy http_proxy https_proxy no_proxy RSYNC_PROXY RSYNC_CONNECT_PROG npm_config_registry\"" > /etc/sudoers.d/keep-proxies -diff --git a/build/docker/Makefile b/build/docker/Makefile -index d4423b0..226bbd0 100644 ---- a/build/docker/Makefile -+++ b/build/docker/Makefile -@@ -25,4 +25,8 @@ all: .docker - cp Dockerfile ubuntu-builder/Dockerfile -+ # Only add FPB ENVs when set - needed to fetch, patch and install FPB -+ test -n "${FPB_REPO}" && sed -i "s;INSERT_FPB_REPO;${FPB_REPO};" ubuntu-builder/Dockerfile || exit 0 -+ test -n "${FPB_BRANCH}" && sed -i "s;INSERT_FPB_BRANCH;${FPB_BRANCH};" ubuntu-builder/Dockerfile || exit 0 -+ test -n "${FPB_CHANGE}" && sed -i "s;INSERT_FPB_CHANGE;${FPB_CHANGE};" ubuntu-builder/Dockerfile || exit 0 - # Only add proxy ENVs where set in host - needed to pull the base Ubuntu image - test -n "${http_proxy}" && sed -i "s;INSERT_HTTP_PROXY;${http_proxy};" ubuntu-builder/Dockerfile || exit 0 - test -n "${https_proxy}" && sed -i "s;INSERT_HTTPS_PROXY;${https_proxy};" ubuntu-builder/Dockerfile || exit 0 diff --git a/patches/opnfv-fuel/0054-net-check-add-support-for-faulty-operstate.patch b/patches/opnfv-fuel/0054-net-check-add-support-for-faulty-operstate.patch deleted file mode 100644 index 8a765c92..00000000 --- a/patches/opnfv-fuel/0054-net-check-add-support-for-faulty-operstate.patch +++ /dev/null @@ -1,63 +0,0 @@ -From: Stefan Sicleru -Date: Tue, 30 Aug 2016 17:53:41 +0200 -Subject: [PATCH] net-check: add support for faulty operstate - -Some eth drivers, such as those for APM X-Gene Mustang Board's NICs, do -not advertise operstate properly in sysfs, ie. it is advertised as -"unknown" whereas ethtool shows the NIC as fully functional with link -detected. This further affects "ip link show" output which is parsed -within _check_iface_ready() method. - -Replace "ip link show" command with "ethtool" in order to obtain proper -results when operstate is unknown. - -Signed-off-by: Stefan Sicleru ---- - ...et-check-add-support-for-faulty-operstate.patch | 38 ++++++++++++++++++++++ - 1 file changed, 38 insertions(+) - create mode 100644 build/patch-repos/build/repos/network-checker/0010-net-check-add-support-for-faulty-operstate.patch - -diff --git a/build/patch-repos/build/repos/network-checker/0010-net-check-add-support-for-faulty-operstate.patch b/build/patch-repos/build/repos/network-checker/0010-net-check-add-support-for-faulty-operstate.patch -new file mode 100644 -index 0000000..71e7b73 ---- /dev/null -+++ b/build/patch-repos/build/repos/network-checker/0010-net-check-add-support-for-faulty-operstate.patch -@@ -0,0 +1,38 @@ -+From: Stefan Sicleru -+Date: Tue, 30 Aug 2016 17:30:24 +0200 -+Subject: [PATCH] net-check: add support for faulty operstate -+ -+Some eth drivers, such as those for APM X-Gene Mustang Board's NICs, do -+not advertise operstate properly in sysfs, ie. it is advertised as -+"unknown" whereas ethtool shows the NIC as fully functional with link -+detected. This further affects "ip link show" output which is parsed -+within _check_iface_ready() method. -+ -+Replace "ip link show" command with "ethtool" in order to obtain proper -+results when operstate is unknown. -+ -+Signed-off-by: Stefan Sicleru -+--- -+ network_checker/net_check/api.py | 9 ++++++++- -+ 1 file changed, 8 insertions(+), 1 deletion(-) -+ -+diff --git a/network_checker/net_check/api.py b/network_checker/net_check/api.py -+index e3c3b4e..87aa257 100755 -+--- a/network_checker/net_check/api.py -++++ b/network_checker/net_check/api.py -+@@ -195,7 +195,14 @@ class Actor(object): -+ def _check_iface_ready(self, iface, vid=None): -+ check_iface = self._iface_name(iface, vid) -+ output = self._execute(['ip', '-o', 'link', 'show', check_iface]) -+- return 'state UP' in '\n'.join(output) -++ if 'state UP' in '\n'.join(output): -++ return True -++ -++ if 'state UNKNOWN' in '\n'.join(output) and vid == None: -++ output = self._execute(['ethtool', check_iface]) -++ return 'Link detected: yes' in '\n'.join(output).replace('\n', ' ') -++ -++ return False -+ -+ def _ensure_iface_up(self, iface, vid=None): -+ """Ensures interface is with vid up.""" diff --git a/patches/opnfv-fuel/0055-build-docker-Use-host-s-network-stack.patch b/patches/opnfv-fuel/0055-build-docker-Use-host-s-network-stack.patch deleted file mode 100644 index d9fd36a0..00000000 --- a/patches/opnfv-fuel/0055-build-docker-Use-host-s-network-stack.patch +++ /dev/null @@ -1,28 +0,0 @@ -From: Alexandru Avadanii -Date: Mon, 29 Aug 2016 22:58:49 +0200 -Subject: [PATCH] build: docker: Use host's /etc/hosts - -The original motivation was pointing to local mirrors via host's -"/etc/hosts", for which an alternative solution tested was -"--net=host" (see [1] for full description), but lead to wierd -loss of connectivity after a few builds. - -[1] https://docs.docker.com/v1.8/articles/networking/ - -Signed-off-by: Alexandru Avadanii ---- - build/docker/runcontext | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/build/docker/runcontext b/build/docker/runcontext -index 07b0dc1..b0d6d37 100755 ---- a/build/docker/runcontext -+++ b/build/docker/runcontext -@@ -121,6 +121,7 @@ RUN_CONTEXT_OPT="--cidfile $CID_FILE --privileged=true --rm --net=host \ - -e MIRROR_MOS_UBUNTU -e MIRROR_MOS_UBUNTU_ROOT -e MIRROR_FUEL \ - -e LATEST_TARGET_UBUNTU -e UBUNTU_ARCH -e ARMBAND_BASE -e OPNFV_GIT_SHA \ - -u $USER_ID:$GROUP_ID -w $PWD \ -+ -v /etc/hosts:/etc/hosts \ - -v $GITROOT:$GITROOT -v /sys/fs/cgroup:/sys/fs/cgroup:ro $CACHEMOUNT" - - # Passing "debug" puts up an interactive bash shell diff --git a/patches/opnfv-fuel/arm64-bug-fixes/0001-bootstrap-Add-lshw-package.patch b/patches/opnfv-fuel/arm64-bug-fixes/0001-bootstrap-Add-lshw-package.patch new file mode 100644 index 00000000..61578bfe --- /dev/null +++ b/patches/opnfv-fuel/arm64-bug-fixes/0001-bootstrap-Add-lshw-package.patch @@ -0,0 +1,30 @@ +From: Alexandru Avadanii +Date: Tue, 24 May 2016 16:42:21 +0200 +Subject: [PATCH] bootstrap: Add lshw package. + +Until Ubuntu Trusty fixes the following bug on AArch64 [1]: +"AArch64: slow cpuinfo due to redundant loop" +we will be using a patched version of from Armband MOS repos. + +This change enforces replacing the lshw from Ubuntu with our custom, +patched package. + +[1] https://bugs.launchpad.net/ubuntu/+source/lshw/+bug/1582181 + +Signed-off-by: Alexandru Avadanii +--- + 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 fcf4257..264ae0e 100644 +--- a/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml ++++ b/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml +@@ -24,6 +24,7 @@ + - linux-headers-generic + - live-boot + - live-boot-initramfs-tools ++ - lshw + - mc + - mcollective + - msmtp-mta diff --git a/patches/opnfv-fuel/arm64-bug-fixes/0002-net-check-add-support-for-faulty-operstate.patch b/patches/opnfv-fuel/arm64-bug-fixes/0002-net-check-add-support-for-faulty-operstate.patch new file mode 100644 index 00000000..a7006fcc --- /dev/null +++ b/patches/opnfv-fuel/arm64-bug-fixes/0002-net-check-add-support-for-faulty-operstate.patch @@ -0,0 +1,63 @@ +From: Stefan Sicleru +Date: Tue, 30 Aug 2016 17:53:41 +0200 +Subject: [PATCH] net-check: add support for faulty operstate + +Some eth drivers, such as those for APM X-Gene Mustang Board's NICs, do +not advertise operstate properly in sysfs, ie. it is advertised as +"unknown" whereas ethtool shows the NIC as fully functional with link +detected. This further affects "ip link show" output which is parsed +within _check_iface_ready() method. + +Replace "ip link show" command with "ethtool" in order to obtain proper +results when operstate is unknown. + +Signed-off-by: Stefan Sicleru +--- + ...et-check-add-support-for-faulty-operstate.patch | 38 ++++++++++++++++++++++ + 1 file changed, 38 insertions(+) + create mode 100644 build/f_repos/patch/network-checker/0010-net-check-add-support-for-faulty-operstate.patch + +diff --git a/build/f_repos/patch/network-checker/0010-net-check-add-support-for-faulty-operstate.patch b/build/f_repos/patch/network-checker/0010-net-check-add-support-for-faulty-operstate.patch +new file mode 100644 +index 0000000..71e7b73 +--- /dev/null ++++ b/build/f_repos/patch/network-checker/0010-net-check-add-support-for-faulty-operstate.patch +@@ -0,0 +1,38 @@ ++From: Stefan Sicleru ++Date: Tue, 30 Aug 2016 17:30:24 +0200 ++Subject: [PATCH] net-check: add support for faulty operstate ++ ++Some eth drivers, such as those for APM X-Gene Mustang Board's NICs, do ++not advertise operstate properly in sysfs, ie. it is advertised as ++"unknown" whereas ethtool shows the NIC as fully functional with link ++detected. This further affects "ip link show" output which is parsed ++within _check_iface_ready() method. ++ ++Replace "ip link show" command with "ethtool" in order to obtain proper ++results when operstate is unknown. ++ ++Signed-off-by: Stefan Sicleru ++--- ++ network_checker/net_check/api.py | 9 ++++++++- ++ 1 file changed, 8 insertions(+), 1 deletion(-) ++ ++diff --git a/network_checker/net_check/api.py b/network_checker/net_check/api.py ++index e3c3b4e..87aa257 100755 ++--- a/network_checker/net_check/api.py +++++ b/network_checker/net_check/api.py ++@@ -195,7 +195,14 @@ class Actor(object): ++ def _check_iface_ready(self, iface, vid=None): ++ check_iface = self._iface_name(iface, vid) ++ output = self._execute(['ip', '-o', 'link', 'show', check_iface]) ++- return 'state UP' in '\n'.join(output) +++ if 'state UP' in '\n'.join(output): +++ return True +++ +++ if 'state UNKNOWN' in '\n'.join(output) and vid == None: +++ output = self._execute(['ethtool', check_iface]) +++ return 'Link detected: yes' in '\n'.join(output).replace('\n', ' ') +++ +++ return False ++ ++ def _ensure_iface_up(self, iface, vid=None): ++ """Ensures interface is with vid up.""" diff --git a/patches/opnfv-fuel/cross-bootstrap/0001-UX-Update-bootstrap-target-build-time-estimate.patch b/patches/opnfv-fuel/cross-bootstrap/0001-UX-Update-bootstrap-target-build-time-estimate.patch new file mode 100644 index 00000000..91ba18a0 --- /dev/null +++ b/patches/opnfv-fuel/cross-bootstrap/0001-UX-Update-bootstrap-target-build-time-estimate.patch @@ -0,0 +1,39 @@ +From: Alexandru Avadanii +Date: Mon, 9 May 2016 17:05:53 +0200 +Subject: [PATCH] UX: Update bootstrap/target build time estimate. + +While building for a different architecture (e.g. AArch64 on x86_64), +the bootstrap/target image build may take longer, due to latency +introduced by using qemu-user-static. + +Signed-off-by: Alexandru Avadanii +--- + .../0001-OPNFV-Additions-to-bootstrap_admin_node.sh.patch | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/build/f_repos/patch/fuel-main/0001-OPNFV-Additions-to-bootstrap_admin_node.sh.patch b/build/f_repos/patch/fuel-main/0001-OPNFV-Additions-to-bootstrap_admin_node.sh.patch +index 446d0b6..c2e664c 100644 +--- a/build/f_repos/patch/fuel-main/0001-OPNFV-Additions-to-bootstrap_admin_node.sh.patch ++++ b/build/f_repos/patch/fuel-main/0001-OPNFV-Additions-to-bootstrap_admin_node.sh.patch +@@ -10,6 +10,21 @@ diff --git a/iso/bootstrap_admin_node.sh b/iso/bootstrap_admin_node.sh + index 3197c91..db3123d 100755 + --- a/iso/bootstrap_admin_node.sh + +++ b/iso/bootstrap_admin_node.sh ++@@ -86,9 +86,11 @@ ++ http://docs.openstack.org/developer/fuel-docs/userdocs/fuel-install-guide/bootstrap/\ ++ bootstrap_troubleshoot.html" ++ bs_progress_message="There is no active bootstrap. Bootstrap image building \ ++-is in progress. Usually it takes 15-20 minutes. It depends on your internet \ ++-connection and hardware performance. After bootstrap image becomes available, \ ++-reboot nodes that failed to be discovered." +++is in progress. Usually it takes 15-20 minutes for a native build (x86_64) \ +++and/or 30-45 minutes for each cross-build (e.g. AArch64). \ +++It depends on your internet connection, hardware performance and selected \ +++bootstrap architecture(s). This ISO supports AArch64 only. After bootstrap \ +++image becomes available, reboot nodes that failed to be discovered." ++ bs_done_message="Default bootstrap image building done. Now you can boot new \ ++ nodes over PXE, they will be discovered and become available for installing \ ++ OpenStack on them" + @@ -339,8 +339,22 @@ fuelmenu --save-only --iface=$ADMIN_INTERFACE || fail + set +x + echo "Done!" diff --git a/patches/opnfv-fuel/cross-bootstrap/0002-Build-bootstrap-image-for-arm64.patch b/patches/opnfv-fuel/cross-bootstrap/0002-Build-bootstrap-image-for-arm64.patch new file mode 100644 index 00000000..836cb2cf --- /dev/null +++ b/patches/opnfv-fuel/cross-bootstrap/0002-Build-bootstrap-image-for-arm64.patch @@ -0,0 +1,31 @@ +From: Stanislaw Kardach +Date: Thu, 3 Mar 2016 19:04:07 +0100 +Subject: [PATCH] Build bootstrap image for arm64 + +For now the arch is hardcoded for simplicity. We should detect this +but how? If we're multi-arch then one bootstrap image should be built +per supported arch. This requires Fuel refactoring. +--- + .../0001-OPNFV-Additions-to-bootstrap_admin_node.sh.patch | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/build/f_repos/patch/fuel-main/0001-OPNFV-Additions-to-bootstrap_admin_node.sh.patch b/build/f_repos/patch/fuel-main/0001-OPNFV-Additions-to-bootstrap_admin_node.sh.patch +index c2e664c..12d0dfb 100644 +--- a/build/f_repos/patch/fuel-main/0001-OPNFV-Additions-to-bootstrap_admin_node.sh.patch ++++ b/build/f_repos/patch/fuel-main/0001-OPNFV-Additions-to-bootstrap_admin_node.sh.patch +@@ -73,6 +73,15 @@ index 3197c91..db3123d 100755 + + # Enable iptables + systemctl enable iptables.service ++@@ -484,7 +490,7 @@ ++ local ret=1 ++ echo ${bs_progress_message} >&2 ++ set_ui_bootstrap_error "${bs_progress_message}" >&2 ++- if fuel-bootstrap -v --debug build --activate >>"$bs_build_log" 2>&1; then +++ if fuel-bootstrap -v --debug build --target_arch arm64 --activate >>"$bs_build_log" 2>&1; then ++ ret=0 ++ fuel notify --topic "done" --send "${bs_done_message}" ++ else + @@ -532,6 +545,16 @@ systemctl start ntpd + + bash /etc/rc.local diff --git a/patches/opnfv-fuel/cross-bootstrap/0003-bootstrap-Use-public-Ubuntu-ports-mirrors.patch b/patches/opnfv-fuel/cross-bootstrap/0003-bootstrap-Use-public-Ubuntu-ports-mirrors.patch new file mode 100644 index 00000000..157306b2 --- /dev/null +++ b/patches/opnfv-fuel/cross-bootstrap/0003-bootstrap-Use-public-Ubuntu-ports-mirrors.patch @@ -0,0 +1,48 @@ +From: Alexandru Avadanii +Date: Thu, 3 Mar 2016 19:18:27 +0100 +Subject: [PATCH] bootstrap: Use public Ubuntu-ports mirrors. + +Instead of relying on 127.0.0.1 partial Ubuntu mirror, use +public archives. +While doing so, switch to Ubuntu-ports, enabling building arm64 +bootstraps. + +NOTE: This disables the abillity to build amd64 bootstraps with +current config. +--- + build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml b/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml +index 264ae0e..17e161f 100644 +--- a/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml ++++ b/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml +@@ -49,19 +49,19 @@ + repos: + - name: ubuntu + section: "main universe multiverse" +- uri: "http://127.0.0.1:8080/mirrors/ubuntu" ++ uri: "http://ports.ubuntu.com/ubuntu-ports" + priority: + suite: trusty + type: deb + - name: ubuntu-updates + section: "main universe multiverse" +- uri: "http://127.0.0.1:8080/mirrors/ubuntu" ++ uri: "http://ports.ubuntu.com/ubuntu-ports" + priority: + suite: trusty-updates + type: deb + - name: ubuntu-security + section: "main universe multiverse" +- uri: "http://127.0.0.1:8080/mirrors/ubuntu" ++ uri: "http://ports.ubuntu.com/ubuntu-ports" + priority: + suite: trusty-security + type: deb +@@ -73,4 +73,5 @@ + type: deb + skip_default_img_build: false + direct_repo_addresses: ++ - "ports.ubuntu.com" + - "127.0.0.1" diff --git a/patches/opnfv-fuel/cross-bootstrap/0004-post-scripts-Enable-systemd-binfmt-for-first-boot.patch b/patches/opnfv-fuel/cross-bootstrap/0004-post-scripts-Enable-systemd-binfmt-for-first-boot.patch new file mode 100644 index 00000000..26b898fe --- /dev/null +++ b/patches/opnfv-fuel/cross-bootstrap/0004-post-scripts-Enable-systemd-binfmt-for-first-boot.patch @@ -0,0 +1,94 @@ +From: Alexandru Avadanii +Date: Thu, 9 Jun 2016 19:46:56 +0200 +Subject: [PATCH] post-scripts: Enable systemd-binfmt for first boot. + +IMPORTANT: +This commit introduces the following file on Fuel Master, +containing the list of arch supported for target nodes: +. + +This file is created AFTER pre.d OPNFV scripts are ran, also by +bootstrap_admin_node.sh, BEFORE the post.d scripts are executed. +NOTE: Arch format is the same used by dpkg (e.g.: "amd64 arm64") + +Based on the number of foreign architectures we should support +(the list of archs in /etc/fuel_openstack_arch minus native arch), +we determine whether cross-builds are expected, in which case +binfmt support should be functional during first Fuel Master boot. + +Since systemd-binfmt service has a series of preconditions for +starting, which are tested early during first boot, some of them +are NOT YET true (e.g. no binfmt handlers are present before +qemu-user-static package is installed), so the service is not +automatically started. Of course, this only affects the first boot. + +Finally, this commit adds an OPNFV post-install script in +/opt/opnfv/bootstrap/post.d, which starts systemd-binfmt service. +--- + .../post-scripts/80_prepare_cross_builds.sh | 32 ++++++++++++++++++++++ + ...PNFV-Additions-to-bootstrap_admin_node.sh.patch | 13 +++++++++ + 2 files changed, 45 insertions(+) + create mode 100755 build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh + +diff --git a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh +new file mode 100755 +index 0000000..01eb2e2 +--- /dev/null ++++ b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh +@@ -0,0 +1,32 @@ ++#/bin/sh ++############################################################################## ++# Copyright (c) 2016 Enea AB and others. ++# Alexandru.Avadanii@enea.com ++# All rights reserved. This program and the accompanying materials ++# are made available under the terms of the Apache License, Version 2.0 ++# which accompanies this distribution, and is available at ++# http://www.apache.org/licenses/LICENSE-2.0 ++############################################################################## ++ ++echo "Preparing for cross-building bootstrap/target images" ++ ++# Fmt handlers are set up by qemu-user-static (after systemd-binfmt ++# prerequisites are checked during first boot of Fuel Master node). ++ ++# Cross-building support provides dpkg, as a fuel-agent dependency ++if which dpkg > /dev/null 2>&1; then ++ # /etc/fuel_openstack_arch is created by bootstrap_admin_node.sh ++ FOREIGN_ARCH_CNT=$(sed -e "s/$(dpkg --print-architecture)//" \ ++ /etc/fuel_openstack_arch | wc -w) ++ if [ ${FOREIGN_ARCH_CNT} -gt 0 ]; then ++ # If no fmt handlers are configured, the service is not started, ++ # so request it explicitly (only necessary for the first boot). ++ systemctl start systemd-binfmt ++ if [ $? -ne 0 ]; then ++ echo "Error starting systemd-binfmt!" ++ exit 1 ++ fi ++ fi ++fi ++ ++echo "Done preparing cross-building" +diff --git a/build/f_repos/patch/fuel-main/0001-OPNFV-Additions-to-bootstrap_admin_node.sh.patch b/build/f_repos/patch/fuel-main/0001-OPNFV-Additions-to-bootstrap_admin_node.sh.patch +index 12d0dfb..81d196b 100644 +--- a/build/f_repos/patch/fuel-main/0001-OPNFV-Additions-to-bootstrap_admin_node.sh.patch ++++ b/build/f_repos/patch/fuel-main/0001-OPNFV-Additions-to-bootstrap_admin_node.sh.patch +@@ -25,6 +25,19 @@ index 3197c91..db3123d 100755 + bs_done_message="Default bootstrap image building done. Now you can boot new \ + nodes over PXE, they will be discovered and become available for installing \ + OpenStack on them" ++@@ -239,6 +239,12 @@ ++ # /etc/fuel_openstack_version is provided by 'fuel-openstack-metadata' package ++ OPENSTACK_VERSION=$(cat /etc/fuel_openstack_version) ++ +++# FIXME(armband): This part might be moved to an earlier stage later +++# /etc/fuel_openstack_arch is constructed based on local mirror metadata +++grep -oP "^Architectures: \K.*$" \ +++ ${wwwdir}/${OPENSTACK_VERSION}/ubuntu/x86_64/dists/mos${FUEL_RELEASE}/Release > \ +++ /etc/fuel_openstack_arch +++ ++ # We do not ship debian-installer kernel and initrd on ISO. ++ # But we still need to be able to create ubuntu cobbler distro ++ # which requires kernel and initrd to be available. So, we + @@ -339,8 +339,22 @@ fuelmenu --save-only --iface=$ADMIN_INTERFACE || fail + set +x + echo "Done!" diff --git a/patches/opnfv-fuel/cross-bootstrap/0005-mcagent-Increase-max-shell-command-timeout-to-2h.patch b/patches/opnfv-fuel/cross-bootstrap/0005-mcagent-Increase-max-shell-command-timeout-to-2h.patch new file mode 100644 index 00000000..c04cc8ab --- /dev/null +++ b/patches/opnfv-fuel/cross-bootstrap/0005-mcagent-Increase-max-shell-command-timeout-to-2h.patch @@ -0,0 +1,49 @@ +From: Alexandru Avadanii +Date: Thu, 9 Jun 2016 21:37:48 +0200 +Subject: [PATCH] mcagent: Increase max shell command timeout to 2h + +Since `execute_shell_command` mcagent is used for building the target +image and the timeout provided in the astute task is just respected on +the Astute level (on mcollective level this timeout is actually a +minumum between value provided and ddl value) we need to increase it +for Armband operation. + +Because Armband builds the target image via `qemu-debootstrap`, it can +take more than 1 hour to finish the building. Therefore aside of +increasing the timeout in the Astute task, the maximum timeout value +for mcagent has to be increased. + +[ Alexandru Avadanii ] +Repackaged, based on Stan's `fuel-astute` patch. + +Signed-off-by: Stanislaw Kardach +Signed-off-by: Alexandru Avadanii +--- + .../f_bootstrap/post-scripts/80_prepare_cross_builds.sh | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh +index 01eb2e2..12f66e6 100755 +--- a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh ++++ b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh +@@ -26,6 +26,20 @@ if which dpkg > /dev/null 2>&1; then + echo "Error starting systemd-binfmt!" + exit 1 + fi ++ ++ # Cross-build timeout adjustments ++ # ++ # Since `execute_shell_command` mcagent is used for building the target ++ # image and the timeout provided in the astute task is just respected on ++ # the Astute level (on mcollective level this timeout is actually a ++ # minumum between value provided and ddl value) we need to increase it ++ # for cross-build operations. ++ ++ # Building the target image via `qemu-debootstrap` can take more than ++ # 1 hour. Therefore aside of increasing the timeout in the Astute task, ++ # the maximum timeout value for mcagent has to be increased (use 2h). ++ sed -i.bak -r 's/^(\s+:timeout\s*=>)\s*[[:digit:]]+$/\1 7200/' \ ++ /usr/libexec/mcollective/mcollective/agent/execute_shell_command.ddl + fi + fi + diff --git a/patches/opnfv-fuel/cross-bootstrap/0006-bootstrap-Use-gzip-instead-of-xz-compression.patch b/patches/opnfv-fuel/cross-bootstrap/0006-bootstrap-Use-gzip-instead-of-xz-compression.patch new file mode 100644 index 00000000..ccbd3e1c --- /dev/null +++ b/patches/opnfv-fuel/cross-bootstrap/0006-bootstrap-Use-gzip-instead-of-xz-compression.patch @@ -0,0 +1,52 @@ +From: Alexandru Avadanii +Date: Fri, 10 Jun 2016 22:30:29 +0200 +Subject: [PATCH] bootstrap: Use gzip instead of xz compression. + +bootstrap mksquashfs using qemu-user-static is extremely slow, +taking up to one hour. gzip, on the other hand, is reasonably fast. +According to [1], xz is slower, with not much size gain. + +[1] https://jonathancarter.org/2015/04/06/squashfs-performance-testing/ + +Signed-off-by: Alexandru Avadanii +--- + .../post-scripts/80_prepare_cross_builds.sh | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) + +diff --git a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh +index 12f66e6..3cb22f3 100755 +--- a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh ++++ b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh +@@ -27,6 +27,11 @@ if which dpkg > /dev/null 2>&1; then + exit 1 + fi + ++ # Determine python site-packages directory location ++ PYTHON_SITEPKGS_DIR=$(python -c \ ++ "from distutils.sysconfig import get_python_lib; print(get_python_lib())") ++ [ -d ${PYTHON_SITEPKGS_DIR} ] || exit 1 ++ + # Cross-build timeout adjustments + # + # Since `execute_shell_command` mcagent is used for building the target +@@ -40,6 +45,20 @@ if which dpkg > /dev/null 2>&1; then + # the maximum timeout value for mcagent has to be increased (use 2h). + sed -i.bak -r 's/^(\s+:timeout\s*=>)\s*[[:digit:]]+$/\1 7200/' \ + /usr/libexec/mcollective/mcollective/agent/execute_shell_command.ddl ++ ++ # Bootstrap: Use gzip instead of xz compression. ++ # ++ # bootstrap mksquashfs via `qemu-user-static` is extremely slow, ++ # taking up to one hour. gzip, on the other hand, is reasonably fast. ++ ++ # See the following article for a comparison between gzip and xz ++ # https://jonathancarter.org/2015/04/06/squashfs-performance-testing/ ++ # xz is slower, with very little size gain. ++ if [ -f ${PYTHON_SITEPKGS_DIR}/fuel_bootstrap/consts.py ]; then ++ sed -i.bak -r "s/^(\s+'compress_format'\s*:\s*').*?('.*)$/\1gzip\2/g" \ ++ ${PYTHON_SITEPKGS_DIR}/fuel_bootstrap/consts.py ++ echo "INFO: [xz] => [gzip] updated bootstrap initrd / rootfs compression." ++ fi + fi + fi + diff --git a/patches/opnfv-fuel/cross-bootstrap/0007-Nailgun-Increase-target-image-build-timeout.patch b/patches/opnfv-fuel/cross-bootstrap/0007-Nailgun-Increase-target-image-build-timeout.patch new file mode 100644 index 00000000..19a025f7 --- /dev/null +++ b/patches/opnfv-fuel/cross-bootstrap/0007-Nailgun-Increase-target-image-build-timeout.patch @@ -0,0 +1,36 @@ +From: Alexandru Avadanii +Date: Sat, 11 Jun 2016 21:37:29 +0200 +Subject: [PATCH] Nailgun: Increase target image build timeout + +Currently we're close to 40 minutes of image building (thanks to +qemu-debootstrap). If network connectivity is a bit slow (happened to +me) it's easy to go over 1h limit. Therefore let's push this to 2 hours +to be safer. + +[ Alexandru Avadanii ] +Moved original patch wrote by Stan to post-install. + +Signed-off-by: Stanislaw Kardach +Signed-off-by: Alexandru Avadanii +--- + .../f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh +index 3cb22f3..c106bc3 100755 +--- a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh ++++ b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh +@@ -45,6 +45,13 @@ if which dpkg > /dev/null 2>&1; then + # the maximum timeout value for mcagent has to be increased (use 2h). + sed -i.bak -r 's/^(\s+:timeout\s*=>)\s*[[:digit:]]+$/\1 7200/' \ + /usr/libexec/mcollective/mcollective/agent/execute_shell_command.ddl ++ # Update nailgun timeout setting (2h) ++ if [ -f ${PYTHON_SITEPKGS_DIR}/nailgun/settings.yaml ]; then ++ sed -i.bak -r \ ++ 's/^(PROVISIONING_IMAGES_BUILD_TIMEOUT:)\s*[[:digit:]]+$/\1 7200/' \ ++ ${PYTHON_SITEPKGS_DIR}/nailgun/settings.yaml ++ echo "INFO: [1h] => [2h] updated nailgun image build timeout." ++ fi + + # Bootstrap: Use gzip instead of xz compression. + # diff --git a/patches/opnfv-fuel/cross-bootstrap/0008-m1.micro-Increase-profile-RAM-size-to-128MB.patch b/patches/opnfv-fuel/cross-bootstrap/0008-m1.micro-Increase-profile-RAM-size-to-128MB.patch new file mode 100644 index 00000000..a54222a4 --- /dev/null +++ b/patches/opnfv-fuel/cross-bootstrap/0008-m1.micro-Increase-profile-RAM-size-to-128MB.patch @@ -0,0 +1,38 @@ +From: Alexandru Avadanii +Date: Sat, 11 Jun 2016 23:34:48 +0200 +Subject: [PATCH] m1.micro: Increase profile RAM size to 128MB. + +TestVM (cirros) on aarch64 requires more than 64MB RAM. +Keep profiles uniform across all archs. + +Signed-off-by: Alexandru Avadanii +--- + .../f_bootstrap/post-scripts/80_prepare_cross_builds.sh | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh +index c106bc3..0b48ca2 100755 +--- a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh ++++ b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh +@@ -66,6 +66,21 @@ if which dpkg > /dev/null 2>&1; then + ${PYTHON_SITEPKGS_DIR}/fuel_bootstrap/consts.py + echo "INFO: [xz] => [gzip] updated bootstrap initrd / rootfs compression." + fi ++ ++ # TestVM (cirros) adjustments for cross-arch ++ # ++ # TestVM (cirros) on aarch64 requires more than 64MB RAM. ++ # Keep profiles uniform across all archs by bumping micro flavor specs. ++ # m1.micro: Increase profile RAM size to 128MB. ++ OPENSTACK_VERSION=$(cat /etc/fuel_openstack_version) ++ CONTROLLER_PP="/etc/puppet/${OPENSTACK_VERSION}/modules/openstack_tasks" ++ CONTROLLER_PP+="/manifests/openstack_controller/openstack_controller.pp" ++ if [ -f ${CONTROLLER_PP} ]; then ++ sed -i.bak -r \ ++ 's/^(.*flavor-create.*m1\.micro auto)\s+[[:digit:]]+(.*)$/\1 128\2/' \ ++ ${CONTROLLER_PP} ++ echo "INFO: [64] => [128] updated m1.micro profile RAM size (MB)." ++ fi + fi + fi + diff --git a/patches/opnfv-fuel/kernel-bump/0001-kernel-flavor-linux-image-generic-lts-xenial.patch b/patches/opnfv-fuel/kernel-bump/0001-kernel-flavor-linux-image-generic-lts-xenial.patch new file mode 100644 index 00000000..c3a8da4a --- /dev/null +++ b/patches/opnfv-fuel/kernel-bump/0001-kernel-flavor-linux-image-generic-lts-xenial.patch @@ -0,0 +1,52 @@ +From: Alexandru Avadanii +Date: Thu, 4 Aug 2016 12:50:19 +0200 +Subject: [PATCH] kernel-flavor: linux-image-generic-lts-xenial + +Ubuntu arm64: switch from using kernel 4.2 for Trusty +(linux-image-generic-lts-trusty) to kernel 4.4 backported from Xenial +(linux-image-generic-lts-xenial). + +Signed-off-by: Alexandru Avadanii +--- + build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml | 4 ++-- + deploy/config/dea_base.yaml | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml b/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml +index 17e161f..fb0ad1a 100644 +--- a/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml ++++ b/build/f_isoroot/f_repobuild/fuel_bootstrap_cli.yaml +@@ -13,7 +13,7 @@ + extra_dirs: + - /usr/share/fuel_bootstrap_cli/files/trusty + output_dir: /tmp/ +- kernel_flavor: linux-image-generic-lts-trusty ++ kernel_flavor: linux-image-generic-lts-xenial + packages: + - fuel-agent + - hwloc +@@ -21,7 +21,7 @@ + - i40e-dkms + - linux-firmware + - linux-firmware-nonfree +- - linux-headers-generic ++ - linux-headers-generic-lts-xenial + - live-boot + - live-boot-initramfs-tools + - lshw +diff --git a/deploy/config/dea_base.yaml b/deploy/config/dea_base.yaml +index 5a25040..f5a03e2 100644 +--- a/deploy/config/dea_base.yaml ++++ b/deploy/config/dea_base.yaml +@@ -474,9 +474,9 @@ settings: + + linux-firmware-nonfree + +- linux-headers-generic-lts-trusty ++ linux-headers-generic-lts-xenial + +- linux-image-generic-lts-trusty ++ linux-image-generic-lts-xenial + + lvm2 + diff --git a/patches/opnfv-fuel/multiarch-efi/0001-FIXME-deploy-EFI-Skip-re-ordering-boot-via-IPMI.patch b/patches/opnfv-fuel/multiarch-efi/0001-FIXME-deploy-EFI-Skip-re-ordering-boot-via-IPMI.patch new file mode 100644 index 00000000..3b3c612a --- /dev/null +++ b/patches/opnfv-fuel/multiarch-efi/0001-FIXME-deploy-EFI-Skip-re-ordering-boot-via-IPMI.patch @@ -0,0 +1,31 @@ +From: Alexandru Avadanii +Date: Fri, 9 Sep 2016 17:55:38 +0200 +Subject: [PATCH] FIXME: deploy: EFI: Skip re-ordering boot via IPMI + +On EFI systems deploys, altering the boot order via IPMI causes +issues on some specific targets. Until we agree on an uniform +solution for EFI systems + IPMI boot order handling, just skip +altering it via IPMI. + +Related-bug: https://jira.opnfv.org/browse/ARMBAND-71 + +Signed-off-by: Alexandru Avadanii +--- + deploy/deploy_env.py | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/deploy/deploy_env.py b/deploy/deploy_env.py +index 93dc395..1d2dfeb 100644 +--- a/deploy/deploy_env.py ++++ b/deploy/deploy_env.py +@@ -255,7 +255,9 @@ class CloudDeploy(object): + + def set_boot_order_nodes(self): + self.power_off_nodes() +- self.set_boot_order(['pxe', 'disk']) ++ # ARMBAND FIXME: See https://jira.opnfv.org/browse/ARMBAND-71 ++ # Until we choose an uniform design on EFI systems, just disable it ++ # self.set_boot_order(['pxe', 'disk']) + self.power_on_nodes() + + def get_put_deploy_log(self): diff --git a/patches/opnfv-fuel/multiarch-mirrors/0001-Add-arm64-deb-repositories-setup.patch b/patches/opnfv-fuel/multiarch-mirrors/0001-Add-arm64-deb-repositories-setup.patch new file mode 100644 index 00000000..c3a76d1e --- /dev/null +++ b/patches/opnfv-fuel/multiarch-mirrors/0001-Add-arm64-deb-repositories-setup.patch @@ -0,0 +1,166 @@ +From: Stanislaw Kardach +Date: Wed, 24 Feb 2016 20:04:03 +0100 +Subject: [PATCH] Add arm64 deb repositories setup + +--- + build/f_isoroot/f_kscfg/ks.cfg.patch | 10 ++++++++++ + build/install/apt-ftparchive-deb.conf | 8 +++++++- + build/install/apt-ftparchive-release.conf | 2 +- + build/install/apt-ftparchive-udeb.conf | 7 ++++++- + build/install/install.sh | 22 ++++++++++++++++++---- + build/install/uninstall.sh | 18 ++++++++++-------- + 6 files changed, 52 insertions(+), 15 deletions(-) + +diff --git a/build/f_isoroot/f_kscfg/ks.cfg.patch b/build/f_isoroot/f_kscfg/ks.cfg.patch +index a6840e4..84a241f 100644 +--- a/build/f_isoroot/f_kscfg/ks.cfg.patch ++++ b/build/f_isoroot/f_kscfg/ks.cfg.patch +@@ -1,6 +1,16 @@ + *** /dev/null 2016-04-26 10:10:11.481587709 +0200 + --- ks.cfg 2016-04-26 10:10:11.481587709 +0200 + *************** ++*** 448,453 **** ++--- 448,454 ---- ++ cp ${SOURCE}/.treeinfo ${repodir}/centos/x86_64 ++ ++ # Copying Ubuntu files +++ # FIXME: This is missleading as dist/pool may contain multiple arch! ++ mkdir -p ${repodir}/ubuntu/x86_64/images ++ cp -r ${SOURCE}/ubuntu/dists ${repodir}/ubuntu/x86_64 ++ cp -r ${SOURCE}/ubuntu/pool ${repodir}/ubuntu/x86_64 ++*************** + *** 579,584 **** + --- 579,592 ---- + +diff --git a/build/install/apt-ftparchive-deb.conf b/build/install/apt-ftparchive-deb.conf +index 0d15aec..e6392f8 100644 +--- a/build/install/apt-ftparchive-deb.conf ++++ b/build/install/apt-ftparchive-deb.conf +@@ -16,12 +16,18 @@ TreeDefault { + Directory "pool"; + }; + +-BinDirectory "pool/main" { ++BinDirectory "pool/main/binary-amd64" { + Packages "dists/trusty/main/binary-amd64/Packages"; + BinOverride "./indices/override.trusty.main"; + ExtraOverride "./indices/override.trusty.extra.main"; + }; + ++BinDirectory "pool/main/binary-arm64" { ++ Packages "dists/trusty/main/binary-arm64/Packages"; ++ BinOverride "./indices/override.trusty.main"; ++ ExtraOverride "./indices/override.trusty.extra.main"; ++}; ++ + Default { + Packages { + Extensions ".deb"; +diff --git a/build/install/apt-ftparchive-release.conf b/build/install/apt-ftparchive-release.conf +index 02706bd..2838714 100644 +--- a/build/install/apt-ftparchive-release.conf ++++ b/build/install/apt-ftparchive-release.conf +@@ -13,6 +13,6 @@ APT::FTPArchive::Release::Label "Ubuntu"; + APT::FTPArchive::Release::Suite "trusty"; + APT::FTPArchive::Release::Version "1.04"; + APT::FTPArchive::Release::Codename "trusty"; +-APT::FTPArchive::Release::Architectures "amd64"; ++APT::FTPArchive::Release::Architectures "amd64 arm64"; + APT::FTPArchive::Release::Components "main"; + APT::FTPArchive::Release::Description "Ubuntu Trusty Tahr 14.04 LTS"; +diff --git a/build/install/apt-ftparchive-udeb.conf b/build/install/apt-ftparchive-udeb.conf +index 3b5b239..c6ab4fb 100644 +--- a/build/install/apt-ftparchive-udeb.conf ++++ b/build/install/apt-ftparchive-udeb.conf +@@ -16,11 +16,16 @@ TreeDefault { + Directory "pool"; + }; + +-BinDirectory "pool/debian-installer" { ++BinDirectory "pool/debian-installer/binary-amd64" { + Packages "dists/trusty/main/debian-installer/binary-amd64/Packages"; + BinOverride "./indices/override.trusty.main.debian-installer"; + }; + ++BinDirectory "pool/debian-installer/binary-arm64" { ++ Packages "dists/trusty/main/debian-installer/binary-arm64/Packages"; ++ BinOverride "./indices/override.trusty.main.debian-installer"; ++}; ++ + Default { + Packages { + Extensions ".udeb"; +diff --git a/build/install/install.sh b/build/install/install.sh +index 866d304..9e003bb 100755 +--- a/build/install/install.sh ++++ b/build/install/install.sh +@@ -122,12 +122,24 @@ prep_make_live() { + ssh-copy-id root@$FUELHOST + sshfs root@1${FUELHOST}:/ $TMP_HOSTMOUNT + +- if [ -f $REPO/dists/trusty/main/binary-amd64/Packages.backup ]; then ++ for arch in arm64 amd64; do ++ if [ -f $REPO/dists/trusty/main/binary-${arch}/Packages.backup ]; then ++ echo "Error - found backup file for Packages for ${arch}!" ++ exit 1 ++ fi ++ ++ if [ -f $REPO/dists/trusty/main/binary-${arch}/Packages.gz.backup ]; then ++ echo "Error - found backup file for Packages.gz for ${arch}!" ++ exit 1 ++ fi ++ done ++ ++ if [ -f $REPO/dists/trusty/main/binary-arm64/Packages.backup ]; then + echo "Error - found backup file for Packages!" + exit 1 + fi + +- if [ -f $REPO/dists/trusty/main/binary-amd64/Packages.gz.backup ]; then ++ if [ -f $REPO/dists/trusty/main/binary-arm64/Packages.gz.backup ]; then + echo "Error - found backup file for Packages.gz!" + exit 1 + fi +@@ -142,8 +154,10 @@ prep_make_live() { + exit 1 + fi + +- cp $REPO/dists/trusty/main/binary-amd64/Packages $REPO/dists/trusty/main/binary-amd64/Packages.backup +- cp $REPO/dists/trusty/main/binary-amd64/Packages.gz $REPO/dists/trusty/main/binary-amd64/Packages.gz.backup ++ for arch in arm64 amd64; do ++ cp $REPO/dists/trusty/main/binary-${arch}/Packages $REPO/dists/trusty/main/binary-${arch}/Packages.backup ++ cp $REPO/dists/trusty/main/binary-${arch}/Packages.gz $REPO/dists/trusty/main/binary-${arch}/Packages.gz.backup ++ done + cp $REPO/dists/trusty/Release $REPO/dists/trusty/Release.backup + cp -Rvp $DEST/etc/puppet $DEST/etc/puppet.backup + } +diff --git a/build/install/uninstall.sh b/build/install/uninstall.sh +index a9e74bc..e90c632 100755 +--- a/build/install/uninstall.sh ++++ b/build/install/uninstall.sh +@@ -31,15 +31,17 @@ DEST=$MOUNT + REPO=$DEST/var/www/nailgun/ubuntu/fuelweb/x86_64 + + cd $REPO +-if [ ! -f $REPO/dists/trusty/main/binary-amd64/Packages.backup ]; then +- echo "Error - didn't find backup file for Packages!" +- exit 1 +-fi ++for arch in arm64 amd64; do ++ if [ ! -f $REPO/dists/trusty/main/binary-${arch}/Packages.backup ]; then ++ echo "Error - didn't find backup file for Packages for ${arch}!" ++ exit 1 ++ fi + +-if [ ! -f $REPO/dists/trusty/main/binary-amd64/Packages.gz.backup ]; then +- echo "Error - didn't find backup file for Packages.gz!" +- exit 1 +-fi ++ if [ ! -f $REPO/dists/trusty/main/binary-${arch}/Packages.gz.backup ]; then ++ echo "Error - didn't find backup file for Packages.gz for ${arch}!" ++ exit 1 ++ fi ++done + + if [ ! -f $REPO/dists/trusty/Release.backup ]; then + echo "Error - didn't find backup file for Release!" diff --git a/patches/opnfv-fuel/multiarch-plugins/0001-fpb-Support-multiple-versions-of-packages.patch b/patches/opnfv-fuel/multiarch-plugins/0001-fpb-Support-multiple-versions-of-packages.patch new file mode 100644 index 00000000..35bef5c8 --- /dev/null +++ b/patches/opnfv-fuel/multiarch-plugins/0001-fpb-Support-multiple-versions-of-packages.patch @@ -0,0 +1,50 @@ +From: Alexandru Avadanii +Date: Tue, 23 Aug 2016 15:48:56 +0200 +Subject: [PATCH] fpb: Support multiple versions of packages + +This is a temporary change until the fpm installed by pip gets +the change from [1] included. + +[1] https://review.openstack.org/#/c/311031/ + +Signed-off-by: Alexandru Avadanii +--- + build/docker/Dockerfile | 9 ++++++++- + build/docker/Makefile | 4 ++++ + 2 files changed, 12 insertions(+), 1 deletion(-) + +diff --git a/build/docker/Dockerfile b/build/docker/Dockerfile +index 624f233..ab0d0d3 100644 +--- a/build/docker/Dockerfile ++++ b/build/docker/Dockerfile +@@ -23,7 +23,14 @@ RUN apt-get install -y software-properties-common python-software-properties \ + build-essential ruby-dev rubygems-integration python-pip git rpm createrepo dpkg-dev + + RUN gem install fpm +-RUN pip install fuel-plugin-builder ++ ++# Temporary: fpb needs to be built from sources ++# RUN pip install fuel-plugin-builder ++RUN git clone -b INSERT_FPB_BRANCH INSERT_FPB_REPO && cd fuel-plugins && \ ++ (test -z INSERT_FPB_CHANGE || \ ++ (git fetch origin INSERT_FPB_CHANGE && git checkout FETCH_HEAD)) && \ ++ python setup.py sdist && pip install ./dist/fuel-plugin-builder-*.tar.gz && \ ++ cd .. && rm -rf fuel-plugins + + RUN echo "ALL ALL=NOPASSWD: ALL" > /etc/sudoers.d/open-sudo + RUN echo "Defaults env_keep += \"ftp_proxy http_proxy https_proxy no_proxy RSYNC_PROXY RSYNC_CONNECT_PROG npm_config_registry\"" > /etc/sudoers.d/keep-proxies +diff --git a/build/docker/Makefile b/build/docker/Makefile +index 783881e..74f6346 100644 +--- a/build/docker/Makefile ++++ b/build/docker/Makefile +@@ -34,6 +34,10 @@ all: .docker + + .dockercfg: $(FILES) + cp Dockerfile ubuntu-builder/Dockerfile ++ # Only add FPB ENVs when set - needed to fetch, patch and install FPB ++ test -n "${FPB_REPO}" && sed -i "s;INSERT_FPB_REPO;${FPB_REPO};" ubuntu-builder/Dockerfile || exit 0 ++ test -n "${FPB_BRANCH}" && sed -i "s;INSERT_FPB_BRANCH;${FPB_BRANCH};" ubuntu-builder/Dockerfile || exit 0 ++ test -n "${FPB_CHANGE}" && sed -i "s;INSERT_FPB_CHANGE;${FPB_CHANGE};" ubuntu-builder/Dockerfile || exit 0 + # Only add proxy ENVs where set in host - needed to pull the base Ubuntu image + test -n "${http_proxy}" && sed -i "s;INSERT_HTTP_PROXY;${http_proxy};" ubuntu-builder/Dockerfile || exit 0 + test -n "${https_proxy}" && sed -i "s;INSERT_HTTPS_PROXY;${https_proxy};" ubuntu-builder/Dockerfile || exit 0 diff --git a/patches/opnfv-fuel/upstream-backports/0001-deploy.sh-Remove-check-for-root-rm-umask-0000.patch b/patches/opnfv-fuel/upstream-backports/0001-deploy.sh-Remove-check-for-root-rm-umask-0000.patch new file mode 100644 index 00000000..cd30166a --- /dev/null +++ b/patches/opnfv-fuel/upstream-backports/0001-deploy.sh-Remove-check-for-root-rm-umask-0000.patch @@ -0,0 +1,106 @@ +From: Alexandru Avadanii +Date: Fri, 6 May 2016 03:07:40 +0200 +Subject: [PATCH] deploy.sh: Remove check for root (rm umask 0000) + +Patch(es) by Josep, signed by Alex only for upstreaming. + +[Alexandru Avadanii] +Squashed two atomic commits into one change. + +Signed-off-by: Josep Puigdemont +Signed-off-by: Alexandru Avadanii +--- + ci/deploy.sh | 11 ----------- + deploy/deploy-config.py | 1 - + deploy/deploy.py | 2 -- + deploy/environments/virtual_fuel.py | 2 -- + 4 files changed, 16 deletions(-) + +diff --git a/ci/deploy.sh b/ci/deploy.sh +index 8411714..081806c 100755 +--- a/ci/deploy.sh ++++ b/ci/deploy.sh +@@ -84,9 +84,6 @@ Input parameters to the build script is: + -i .iso image to be deployed (needs to be provided in a URI + style, it can be a local resource: file:// or a remote resource http(s)://) + +-NOTE: Root priviledges are needed for this script to run +- +- + Examples: + sudo `basename $0` -b file:///home/jenkins/lab-config -l lf -p pod1 -s ha_odl-l3_heat_ceilometer -i file:///home/jenkins/myiso.iso + EOF +@@ -212,11 +209,6 @@ do + esac + done + +-if [[ $EUID -ne 0 ]]; then +- echo "This script must be run as root" 1>&2 +- exit 1 +-fi +- + if [ -z $BASE_CONFIG_URI ] || [ -z $TARGET_LAB ] || \ + [ -z $TARGET_POD ] || [ -z $DEPLOY_SCENARIO ] || \ + [ -z $ISO ]; then +@@ -231,9 +223,6 @@ fi + # Enable the automatic exit trap + trap do_exit SIGINT SIGTERM EXIT + +-# Set no restrictive umask so that Jenkins can removeeee any residuals +-umask 0000 +- + clean + + pushd ${DEPLOY_DIR} > /dev/null +diff --git a/deploy/deploy-config.py b/deploy/deploy-config.py +index 2a09aa3..02debe2 100644 +--- a/deploy/deploy-config.py ++++ b/deploy/deploy-config.py +@@ -41,7 +41,6 @@ from common import ( + check_file_exists, + create_dir_if_not_exists, + delete, +- check_if_root, + ArgParser, + ) + +diff --git a/deploy/deploy.py b/deploy/deploy.py +index fe213e5..08702d2 100755 +--- a/deploy/deploy.py ++++ b/deploy/deploy.py +@@ -34,7 +34,6 @@ from common import ( + check_dir_exists, + create_dir_if_not_exists, + delete, +- check_if_root, + ArgParser, + ) + +@@ -252,7 +251,6 @@ class AutoDeploy(object): + return 0 + + def run(self): +- check_if_root() + if self.cleanup_only: + self.cleanup_execution_environment() + else: +diff --git a/deploy/environments/virtual_fuel.py b/deploy/environments/virtual_fuel.py +index b1a76e4..4ff68f6 100644 +--- a/deploy/environments/virtual_fuel.py ++++ b/deploy/environments/virtual_fuel.py +@@ -18,7 +18,6 @@ import time + from common import ( + exec_cmd, + check_file_exists, +- check_if_root, + delete, + log, + ) +@@ -135,7 +134,6 @@ class VirtualFuel(ExecutionEnvironment): + vm_definition_overwrite) + + def setup_environment(self): +- check_if_root() + self.cleanup_environment() + self.create_vm() + diff --git a/patches/opnfv-fuel/upstream-backports/0002-Backport-dpkg-checkbuilddeps-to-mk-build-deps.patch b/patches/opnfv-fuel/upstream-backports/0002-Backport-dpkg-checkbuilddeps-to-mk-build-deps.patch new file mode 100644 index 00000000..eb81942e --- /dev/null +++ b/patches/opnfv-fuel/upstream-backports/0002-Backport-dpkg-checkbuilddeps-to-mk-build-deps.patch @@ -0,0 +1,58 @@ +From: Alexandru Avadanii +Date: Wed, 6 Jul 2016 17:03:49 +0200 +Subject: [PATCH] Backport: dpkg-checkbuilddeps to mk-build-deps. + +Backported from [1]. + +[1] https://review.openstack.org/#/c/325210/ + +Signed-off-by: Alexandru Avadanii +--- + ...ce-dpkg-checkbuilddeps-with-mk-build-deps.patch | 38 ++++++++++++++++++++++ + 1 file changed, 38 insertions(+) + create mode 100644 build/f_repos/patch/fuel-main/0005-replace-dpkg-checkbuilddeps-with-mk-build-deps.patch + +diff --git a/build/f_repos/patch/fuel-main/0005-replace-dpkg-checkbuilddeps-with-mk-build-deps.patch b/build/f_repos/patch/fuel-main/0005-replace-dpkg-checkbuilddeps-with-mk-build-deps.patch +new file mode 100644 +index 0000000..896f3cf +--- /dev/null ++++ b/build/f_repos/patch/fuel-main/0005-replace-dpkg-checkbuilddeps-with-mk-build-deps.patch +@@ -0,0 +1,38 @@ ++From: Sergii Golovatiuk ++Date: Fri, 3 Jun 2016 12:26:19 +0200 ++Subject: [PATCH] Replace dpkg-checkbuilddeps with mk-build-deps ++ ++dpkg-checkbuilddeps doesn't check dependencies inside chroot as in many ++cases host system might not have required packages. This change replaces ++dpkg-checkbuilddeps with mk-build-deps in chroot ++ ++Implements: mos-xenial ++Change-Id: I27a65893c1bd33e6d82c11bf3d08423562dbe4d2 ++Signed-off-by: Sergii Golovatiuk ++--- ++ packages/deb/module.mk | 5 ++--- ++ 1 file changed, 2 insertions(+), 3 deletions(-) ++ ++diff --git a/packages/deb/module.mk b/packages/deb/module.mk ++index 6c93441..c0ba737 100644 ++--- a/packages/deb/module.mk +++++ b/packages/deb/module.mk ++@@ -10,7 +10,7 @@ clean-deb: ++ done ++ sudo rm -rf $(BUILD_DIR)/packages/deb ++ ++-$(BUILD_DIR)/packages/deb/buildd.tar.gz: SANDBOX_DEB_PKGS:=wget bzip2 apt-utils build-essential python-setuptools python-pbr devscripts debhelper fakeroot +++$(BUILD_DIR)/packages/deb/buildd.tar.gz: SANDBOX_DEB_PKGS:=wget bzip2 apt-utils build-essential fakeroot devscripts equivs debhelper python-setuptools python-pbr ++ $(BUILD_DIR)/packages/deb/buildd.tar.gz: SANDBOX_UBUNTU:=$(BUILD_DIR)/packages/deb/chroot ++ $(BUILD_DIR)/packages/deb/buildd.tar.gz: export SANDBOX_UBUNTU_UP:=$(SANDBOX_UBUNTU_UP) ++ $(BUILD_DIR)/packages/deb/buildd.tar.gz: export SANDBOX_UBUNTU_DOWN:=$(SANDBOX_UBUNTU_DOWN) ++@@ -47,8 +47,7 @@ $(BUILD_DIR)/packages/deb/$1.done: $(BUILD_DIR)/repos/repos.done ++ sudo -E dch -c $$(SANDBOX_UBUNTU)/tmp/$1/debian/changelog -D $(UBUNTU_RELEASE) -b --force-distribution \ ++ -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 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 ++ sudo sh -c "$$$${SANDBOX_UBUNTU_DOWN}" -- cgit 1.2.3-korg