Allow tunable for guest agent process timeout

Allow the timeout for guest agent out of process
calls to be tunable.

Change-Id: If89526b88b94cd4b1a08fea94a368bc6d5e1aac3
This commit is contained in:
Samuel Matzek 2017-11-16 07:12:24 -06:00
parent 7fbe598884
commit 5ddf6b3e80
2 changed files with 4 additions and 1 deletions

View File

@ -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,

View File

@ -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)