Add delay after deleting VM

Otherwise there might still be a watcher on the block device when we go
to delete it, which causes a failure.
This commit is contained in:
Joshua Boniface 2019-07-10 19:05:36 -04:00
parent 32a6369de2
commit 0d513fea4d
1 changed files with 1 additions and 0 deletions

View File

@ -242,6 +242,7 @@ def remove_vm(zk_conn, domain, is_cli=False):
if is_cli: if is_cli:
click.echo('Undefining VM "{}".'.format(domain)) click.echo('Undefining VM "{}".'.format(domain))
zkhandler.deletekey(zk_conn, '/domains/{}'.format(dom_uuid)) zkhandler.deletekey(zk_conn, '/domains/{}'.format(dom_uuid))
time.sleep(2)
# Remove disks # Remove disks
for disk in disk_list: for disk in disk_list: