From 5ddf6b3e806a2a0bd910a59c6dfdc2a7fd7eae83 Mon Sep 17 00:00:00 2001 From: Samuel Matzek Date: Thu, 16 Nov 2017 07:12:24 -0600 Subject: [PATCH] Allow tunable for guest agent process timeout Allow the timeout for guest agent out of process calls to be tunable. Change-Id: If89526b88b94cd4b1a08fea94a368bc6d5e1aac3 --- trove/common/cfg.py | 3 +++ trove/common/utils.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/trove/common/cfg.py b/trove/common/cfg.py index a6ab0c62fe..45f12f463a 100644 --- a/trove/common/cfg.py +++ b/trove/common/cfg.py @@ -168,6 +168,9 @@ common_opts = [ cfg.IntOpt('agent_replication_snapshot_timeout', default=36000, help='Maximum time (in seconds) to wait for taking a Guest ' 'Agent replication snapshot.'), + cfg.IntOpt('command_process_timeout', default=30, + help='Maximum time (in seconds) to wait for out of process ' + 'commands to complete.'), # The guest_id opt definition must match the one in cmd/guest.py cfg.StrOpt('guest_id', default=None, help="ID of the Guest Instance."), cfg.IntOpt('state_change_wait_time', default=60 * 10, diff --git a/trove/common/utils.py b/trove/common/utils.py index fcb9b557ef..2481d82ae8 100644 --- a/trove/common/utils.py +++ b/trove/common/utils.py @@ -228,7 +228,7 @@ def get_id_from_href(href): def execute_with_timeout(*args, **kwargs): - time = kwargs.pop('timeout', 30) + time = kwargs.pop('timeout', CONF.command_process_timeout) log_output_on_error = kwargs.pop('log_output_on_error', False) timeout = Timeout(time)