Make server spawn and response times configurable
This is a followup patch to [1] introducing configurable timing parameters for the client to wait for automatic vbmcd start up and vbmcd response timeout. 1. https://review.openstack.org/#/c/488874 Change-Id: Id1cdcecd8d407b31dc69166fb0fda555fc4a679f
This commit is contained in:
parent
b3a8a6f532
commit
cf52ba4f1f
@ -50,7 +50,7 @@ class ZmqClient(object):
|
||||
and `rows` attributes pointing to lists of cell values.
|
||||
"""
|
||||
|
||||
SERVER_TIMEOUT = 5000 # milliseconds
|
||||
SERVER_TIMEOUT = CONF['default']['server_response_timeout']
|
||||
|
||||
def communicate(self, command, args, no_daemon=False):
|
||||
|
||||
@ -109,7 +109,7 @@ class ZmqClient(object):
|
||||
vbmcd.main([])
|
||||
|
||||
# TODO(etingof): perform some more retries
|
||||
time.sleep(3)
|
||||
time.sleep(CONF['default']['server_spawn_wait'] / 1000.)
|
||||
|
||||
# MQ will deliver the original message to the daemon
|
||||
# we've started
|
||||
|
@ -42,6 +42,8 @@ class VirtualBMCConfig(object):
|
||||
os.path.expanduser('~'), '.vbmc', 'master.pid'
|
||||
),
|
||||
'server_port': 50891,
|
||||
'server_response_timeout': 5000, # milliseconds
|
||||
'server_spawn_wait': 3000, # milliseconds
|
||||
},
|
||||
'log': {
|
||||
'logfile': None,
|
||||
|
@ -33,7 +33,9 @@ class VirtualBMCConfigTestCase(base.TestCase):
|
||||
self.config_dict = {'default': {'show_passwords': 'true',
|
||||
'config_dir': '/foo/bar/1',
|
||||
'pid_file': '/foo/bar/2',
|
||||
'server_port': '12345'},
|
||||
'server_port': '12345',
|
||||
'server_spawn_wait': 3000,
|
||||
'server_response_timeout': 5000},
|
||||
'log': {'debug': 'true', 'logfile': '/foo/bar/4'},
|
||||
'ipmi': {'session_timeout': '30'}}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user