Rework: Move fuel-astute patch to post-install. 49/15349/3
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Thu, 9 Jun 2016 19:44:07 +0000 (21:44 +0200)
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Sun, 12 Jun 2016 11:26:52 +0000 (11:26 +0000)
IMPORTANT:
Drop `fuel-astute` submodule, and patch it instead during the Fuel
Master node bootstrapping process, using an OPNFV post.d script.

Luckily, this fits well with the recently added script that prepares
FM for cross-building.

One step closer to un-forking.

Change-Id: Ia612e0ad4077b16baf54f1b9ebf9d207daca0be4
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
.gitmodules
Makefile
patches/fuel-astute/0001-Increase-maximum-shell-command-timeout-to-2h.patch [deleted file]
patches/opnfv-fuel/0032-mcagent-Increase-max-shell-command-timeout-to-2h.patch [new file with mode: 0644]
upstream/fuel-astute [deleted submodule]

index 0023639..6275a1b 100644 (file)
@@ -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
index f2e5242..b3b6525 100644 (file)
--- 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-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 (file)
index abcb928..0000000
+++ /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/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 (file)
index 0000000..f5fc4cf
--- /dev/null
@@ -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/upstream/fuel-astute b/upstream/fuel-astute
deleted file mode 160000 (submodule)
index edd57b9..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit edd57b90acddc06f69940902dfb76ef146f32a70