Config setting for build diag timeoute
Change-Id: Ia1cac035d1fc640394ac0e933a7c3e69ef55081a
This commit is contained in:
parent
00ca8ee9a4
commit
6cb22c40cf
@ -91,6 +91,7 @@ rabbit_use_ssl = True
|
||||
#threads = 8
|
||||
#rm_fip_ignore_500 = false
|
||||
#nova_insecure = false
|
||||
#build_diag_timeout = 10
|
||||
|
||||
# Required options
|
||||
az = 1
|
||||
|
@ -84,6 +84,9 @@ cfg.CONF.register_opts(
|
||||
cfg.IntOpt('threads',
|
||||
default=4,
|
||||
help='Number of worker threads to spawn'),
|
||||
cfg.IntOpt('build_diag_timeout',
|
||||
default=10,
|
||||
help='Timeout in seconds the pool manager will wait for a worker to complete the post-build diagnostic tests.'),
|
||||
],
|
||||
group=mgm_group
|
||||
)
|
||||
|
@ -22,7 +22,6 @@ from libra.openstack.common import log
|
||||
from libra.mgm.nova import Node, BuildError, NotFound
|
||||
|
||||
POLL_COUNT = 10
|
||||
POLL_SLEEP = 60
|
||||
|
||||
LOG = log.getLogger(__name__)
|
||||
|
||||
@ -162,11 +161,11 @@ class BuildController(object):
|
||||
client.submitJob(job)
|
||||
|
||||
pollcount = 0
|
||||
# Would like to make these config file settings
|
||||
pollsleepinterval = cfg.CONF['mgm']['build_diag_timeout'] / POLL_COUNT
|
||||
while not job.complete\
|
||||
and pollcount < POLL_COUNT\
|
||||
and not job.disconnect:
|
||||
sleep(POLL_SLEEP)
|
||||
sleep(pollsleepinterval)
|
||||
pollcount += 1
|
||||
|
||||
if job.disconnect:
|
||||
|
Loading…
x
Reference in New Issue
Block a user