From: tierno Date: Thu, 28 Nov 2019 17:31:41 +0000 (+0000) Subject: fix race condition causing keyerror status on waiting for VM up X-Git-Tag: v7.0.0rc1~14 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=c61e7813da16b2dc42d7ca4f625efe720096ab54;p=osm%2FLCM.git fix race condition causing keyerror status on waiting for VM up Change-Id: Ideb8f07d09f2be9020ca80128fa346c719cebb06 Signed-off-by: tierno --- diff --git a/osm_lcm/__init__.py b/osm_lcm/__init__.py index 3a64a63..2bcc9a8 100644 --- a/osm_lcm/__init__.py +++ b/osm_lcm/__init__.py @@ -13,5 +13,5 @@ ## # version moved to lcm.py. uncomment if LCM is installed as library and installed -version = '6.0.3.post12' -version_date = '2019-11-23' +version = '6.0.3.post20' +version_date = '2019-11-28' diff --git a/osm_lcm/ns.py b/osm_lcm/ns.py index a5a6730..193cab6 100644 --- a/osm_lcm/ns.py +++ b/osm_lcm/ns.py @@ -907,9 +907,9 @@ class NsLcm(LcmBase): for vdur in get_iterable(db_vnfr, "vdur"): if (vdur["vdu-id-ref"] == vdu_id and vdur["count-index"] == vdu_index) or \ (ip_address and vdur.get("ip-address") == ip_address): - if vdur["status"] == "ACTIVE": + if vdur.get("status") == "ACTIVE": target_vdu_id = vdur["vdu-id-ref"] - elif vdur["status"] == "ERROR": + elif vdur.get("status") == "ERROR": raise LcmException("Cannot inject ssh-key because target VM is in error state") break else: