From f8da4b760ad71e9a559660d9b41414920b8a2b14 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Evrard Date: Thu, 4 Jan 2018 11:11:20 +0000 Subject: [PATCH] Define GATE_EXIT_RUN_DSTAT before use GATE_EXIT_RUN_DSTAT was defined in scripts library and used in gate-check-commit. When script library is loaded before using in gate-check-commit, everything is fine. But when gate-check-commit is doing upgrades, the checkout of previous branch happens before the loading of the script library, which therefore loads previous version of the script library which doesn't contain the GATE_EXIT_RUN_DSTAT environment variable, and therefore the usage of this variable fails. Change-Id: Ica58331d8c63d354561aebefd1b1e26dc2b37ffb --- scripts/gate-check-commit.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/gate-check-commit.sh b/scripts/gate-check-commit.sh index 0ccbf9b2fc..2b518c7083 100755 --- a/scripts/gate-check-commit.sh +++ b/scripts/gate-check-commit.sh @@ -77,6 +77,7 @@ info_block "Checking for required libraries." 2> /dev/null || source "${OSA_CLON # Log some data about the instance and the rest of the system log_instance_info +GATE_EXIT_RUN_DSTAT="${GATE_EXIT_RUN_DSTAT:-true}" if [ "$GATE_EXIT_RUN_DSTAT" == true ]; then run_dstat fi