aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitmodules4
-rw-r--r--Makefile2
-rw-r--r--patches/fuel-agent/0008-bootstrap-Use-gzip-instead-of-xz-compression.patch35
-rw-r--r--patches/fuel-astute/0001-Increase-maximum-shell-command-timeout-to-2h.patch31
-rw-r--r--patches/opnfv-fuel/0031-post-scripts-Enable-systemd-binfmt-for-first-boot.patch96
-rw-r--r--patches/opnfv-fuel/0032-mcagent-Increase-max-shell-command-timeout-to-2h.patch49
-rw-r--r--patches/opnfv-fuel/0033-bootstrap-Use-gzip-instead-of-xz-compression.patch52
m---------upstream/fuel-astute0
8 files changed, 197 insertions, 72 deletions
diff --git a/.gitmodules b/.gitmodules
index 0023639c..6275a1bd 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -30,7 +30,3 @@
path = upstream/fuel-nailgun-agent
url = https://github.com/openstack/fuel-nailgun-agent
branch = stable/mitaka
-[submodule "fuel-astute"]
- path = upstream/fuel-astute
- url = https://github.com/openstack/fuel-astute.git
- branch = stable/mitaka
diff --git a/Makefile b/Makefile
index f2e52424..b3b6525d 100644
--- a/Makefile
+++ b/Makefile
@@ -62,7 +62,6 @@ build:
UBUNTU_ARCH="amd64 arm64" \
FUELLIB_REPO=${root}/upstream/fuel-library \
NAILGUN_REPO=${root}/upstream/fuel-web \
- ASTUTE_REPO=${root}/upstream/fuel-astute \
FUEL_AGENT_REPO=${root}/upstream/fuel-agent \
FUEL_NAILGUN_AGENT_REPO=${root}/upstream/fuel-nailgun-agent \
FUEL_MIRROR_REPO=${root}/upstream/fuel-mirror \
@@ -70,7 +69,6 @@ build:
ODL_CHANGE= \
FUELLIB_COMMIT=HEAD \
NAILGUN_COMMIT=HEAD \
- ASTUTE_COMMIT=HEAD \
FUEL_AGENT_COMMIT=HEAD \
FUEL_NAILGUN_AGENT_COMMIT=HEAD \
FUEL_MIRROR_COMMIT=HEAD \
diff --git a/patches/fuel-agent/0008-bootstrap-Use-gzip-instead-of-xz-compression.patch b/patches/fuel-agent/0008-bootstrap-Use-gzip-instead-of-xz-compression.patch
deleted file mode 100644
index 19176c90..00000000
--- a/patches/fuel-agent/0008-bootstrap-Use-gzip-instead-of-xz-compression.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
-Date: Wed, 9 Mar 2016 23:02:17 +0100
-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/
----
- contrib/fuel_bootstrap/fuel_bootstrap_cli/fuel_bootstrap/consts.py | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/contrib/fuel_bootstrap/fuel_bootstrap_cli/fuel_bootstrap/consts.py b/contrib/fuel_bootstrap/fuel_bootstrap_cli/fuel_bootstrap/consts.py
-index d507156..688197d 100644
---- a/contrib/fuel_bootstrap/fuel_bootstrap_cli/fuel_bootstrap/consts.py
-+++ b/contrib/fuel_bootstrap/fuel_bootstrap_cli/fuel_bootstrap/consts.py
-@@ -24,7 +24,7 @@ COMPRESSED_CONTAINER_FORMAT = "tar.gz"
- UNCOMPRESSED_CONTAINER_FORMAT = "directory"
- ROOTFS = {'name': 'rootfs',
- 'mask': 'rootfs',
-- 'compress_format': 'xz',
-+ 'compress_format': 'gzip',
- 'uri': 'http://127.0.0.1:8080/bootstraps/{uuid}/root.squashfs',
- 'format': 'ext4',
- 'container': 'raw'}
-@@ -34,7 +34,7 @@ BOOTSTRAP_MODULES = [
- 'uri': 'http://127.0.0.1:8080/bootstraps/{uuid}/vmlinuz'},
- {'name': 'initrd',
- 'mask': 'initrd',
-- 'compress_format': 'xz',
-+ 'compress_format': 'gzip',
- 'uri': 'http://127.0.0.1:8080/bootstraps/{uuid}/initrd.img'},
- ROOTFS
- ]
diff --git a/patches/fuel-astute/0001-Increase-maximum-shell-command-timeout-to-2h.patch b/patches/fuel-astute/0001-Increase-maximum-shell-command-timeout-to-2h.patch
deleted file mode 100644
index abcb9283..00000000
--- a/patches/fuel-astute/0001-Increase-maximum-shell-command-timeout-to-2h.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From: Stanislaw Kardach <stanislaw.kardach@caviumnetworks.com>
-Date: Mon, 9 May 2016 18:54:33 -0700
-Subject: [PATCH] Increase maximum 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.
-
-Signed-off-by: Stanislaw Kardach <stanislaw.kardach@caviumnetworks.com>
----
- mcagents/execute_shell_command.ddl | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/mcagents/execute_shell_command.ddl b/mcagents/execute_shell_command.ddl
-index 0480be7..ad58046 100644
---- a/mcagents/execute_shell_command.ddl
-+++ b/mcagents/execute_shell_command.ddl
-@@ -4,5 +4,5 @@ metadata :name => "Execute shell command",
- :url => "http://mirantis.com",
-- :timeout => 3600
-+ :timeout => 7200
-
- action "execute", :description => "Execute shell command" do
-
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
new file mode 100644
index 00000000..e3100962
--- /dev/null
+++ b/patches/opnfv-fuel/0031-post-scripts-Enable-systemd-binfmt-for-first-boot.patch
@@ -0,0 +1,96 @@
+From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+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:
+</etc/fuel_openstack_arch>.
+
+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/bootstrap_admin_node.sh.patch b/build/bootstrap_admin_node.sh.patch
+index b1ea90b..7f16d0b 100644
+--- a/build/bootstrap_admin_node.sh.patch
++++ b/build/bootstrap_admin_node.sh.patch
+@@ -24,6 +24,21 @@
+ nodes over PXE, they will be discovered and become available for installing \
+ OpenStack on them"
+ ***************
++*** 239,244 ****
++--- 239,250 ----
++ # /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,346 ****
+ 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
new file mode 100644
index 00000000..f5fc4cf1
--- /dev/null
+++ b/patches/opnfv-fuel/0032-mcagent-Increase-max-shell-command-timeout-to-2h.patch
@@ -0,0 +1,49 @@
+From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+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 <stanislaw.kardach@caviumnetworks.com>
+Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+---
+ .../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
new file mode 100644
index 00000000..e7b176b9
--- /dev/null
+++ b/patches/opnfv-fuel/0033-bootstrap-Use-gzip-instead-of-xz-compression.patch
@@ -0,0 +1,52 @@
+From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+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 <Alexandru.Avadanii@enea.com>
+---
+ .../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/upstream/fuel-astute b/upstream/fuel-astute
deleted file mode 160000
-Subproject edd57b90acddc06f69940902dfb76ef146f32a7