Merge pull request #28548 from nmadhok/2015.5-task-error

[Backport] [2015.5] Tasks can be in queued state instead of running
This commit is contained in:
Nicole Thomas 2015-11-03 21:14:24 -07:00
commit 025bff2bf0

View File

@ -788,7 +788,7 @@ def _wait_for_ip(vm_ref, max_wait):
def _wait_for_task(task, vm_name, task_type, sleep_seconds=1, log_level='debug'):
time_counter = 0
starttime = time.time()
while task.info.state == 'running':
while task.info.state == 'running' or task.info.state == 'queued':
if time_counter % sleep_seconds == 0:
message = "[ {0} ] Waiting for {1} task to finish [{2} s]".format(vm_name, task_type, time_counter)
if log_level == 'info':