From 5b5b7d227657fa5f182889bb2da1d4f54ce63cd3 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Tue, 11 Aug 2020 23:08:40 -0400 Subject: [PATCH] Improve the conditional so it will always work --- daemon-common/ceph.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon-common/ceph.py b/daemon-common/ceph.py index a5d0f1a4..7a10f9fe 100644 --- a/daemon-common/ceph.py +++ b/daemon-common/ceph.py @@ -952,7 +952,7 @@ def resize_volume(zk_conn, pool, name, size): active_node = vm_info['node'] volume_id = disk['dev'] # 2b. Perform a live resize in libvirt if the VM is running - if vm_info['state'] == 'start' and active_node is not None: + if active_node is not None and vm_info.get('state', '') == 'start': import libvirt # Run the libvirt command against the target host try: