From c84f5cce1432aa88ad245c5d7623e59d02fec19f Mon Sep 17 00:00:00 2001 From: Amrith Kumar Date: Wed, 22 Mar 2017 12:21:20 -0400 Subject: [PATCH] Improve Gate: address multiple issues relative to timing This commit merges two commits, 447750[1] and 448630[2] in the fond hope that this will improve the odds of its being able to merge. The log operation test assumes that the log will be Ready but in some cases, Partial is also a valid result. Add that into the list of allowed results. In addition, this change aims to support cases where test suites last much more than 1 hour and where a token can expire unexpectedly mid operation. This is by no means a 'fix' for the bug here, just a way to get the gate to be more stable. [1] https://review.openstack.org/447750 [2] https://review.openstack.org/448630 Change-Id: Ib888dd55f04952139508a7cb0fee60e192e1b77c Closes-Bug: 1674520 Partial-Fix: 1674510 --- devstack/plugin.sh | 9 +++++++++ trove/tests/scenario/runners/guest_log_runners.py | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 42f6b827be..d29d73e308 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -99,6 +99,14 @@ function iniset_conditional { fi } +# configure_keystone_token_life() - update the keystone token life to 3h +function configure_keystone_token_life() { + KEYSTONE_CONF_DIR=${KEYSTONE_CONF_DIR:-/etc/nova} + KEYSTONE_CONF=${KEYSTONE_CONF:-${KEYSTONE_CONF_DIR}/keystone.conf} + KEYSTONE_TOKEN_LIFE=${KEYSTONE_TOKEN_LIFE:-10800} + iniset $KEYSTONE_CONF token expiration ${KEYSTONE_TOKEN_LIFE} + echo "configure_keystone_token_life: setting keystone token life to ${KEYSTONE_TOKEN_LIFE}" +} # configure_nova_kvm() - update the nova hypervisor configuration if possible function configure_nova_kvm { @@ -136,6 +144,7 @@ function configure_trove { setup_develop $TROVE_DIR configure_nova_kvm + configure_keystone_token_life # Create the trove conf dir and cache dirs if they don't exist sudo install -d -o $STACK_USER ${TROVE_CONF_DIR} ${TROVE_AUTH_CACHE_DIR} diff --git a/trove/tests/scenario/runners/guest_log_runners.py b/trove/tests/scenario/runners/guest_log_runners.py index 5eb96f24dd..b43d5738af 100644 --- a/trove/tests/scenario/runners/guest_log_runners.py +++ b/trove/tests/scenario/runners/guest_log_runners.py @@ -694,7 +694,8 @@ class GuestLogRunner(TestRunner): self.admin_client, log_name, expected_type=guest_log.LogType.SYS.name, - expected_status=guest_log.LogStatus.Ready.name, + expected_status=[guest_log.LogStatus.Ready.name, + guest_log.LogStatus.Partial.name], expected_published=0, expected_pending=1) def run_test_log_publish_sys(self):