1 From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2 Date: Thu, 9 Jun 2016 21:37:48 +0200
3 Subject: [PATCH] mcagent: Increase max shell command timeout to 2h
5 Since `execute_shell_command` mcagent is used for building the target
6 image and the timeout provided in the astute task is just respected on
7 the Astute level (on mcollective level this timeout is actually a
8 minumum between value provided and ddl value) we need to increase it
11 Because Armband builds the target image via `qemu-debootstrap`, it can
12 take more than 1 hour to finish the building. Therefore aside of
13 increasing the timeout in the Astute task, the maximum timeout value
14 for mcagent has to be increased.
16 [ Alexandru Avadanii ]
17 Repackaged, based on Stan's `fuel-astute` patch.
19 Signed-off-by: Stanislaw Kardach <stanislaw.kardach@caviumnetworks.com>
20 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
22 .../f_bootstrap/post-scripts/80_prepare_cross_builds.sh | 14 ++++++++++++++
23 1 file changed, 14 insertions(+)
25 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
26 index d33d1d1..d78b850 100755
27 --- a/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh
28 +++ b/build/f_isoroot/f_bootstrap/post-scripts/80_prepare_cross_builds.sh
29 @@ -26,6 +26,20 @@ if which dpkg > /dev/null 2>&1; then
30 echo "Error starting systemd-binfmt!"
34 + # Cross-build timeout adjustments
36 + # Since `execute_shell_command` mcagent is used for building the target
37 + # image and the timeout provided in the astute task is just respected on
38 + # the Astute level (on mcollective level this timeout is actually a
39 + # minumum between value provided and ddl value) we need to increase it
40 + # for cross-build operations.
42 + # Building the target image via `qemu-debootstrap` can take more than
43 + # 1 hour. Therefore aside of increasing the timeout in the Astute task,
44 + # the maximum timeout value for mcagent has to be increased (use 2h).
45 + sed -i.bak -r 's/^(\s+:timeout\s*=>)\s*[[:digit:]]+$/\1 7200/' \
46 + /usr/libexec/mcollective/mcollective/agent/execute_shell_command.ddl