From aaba400517bde3bfa47e28b315ef2b00e23acd06 Mon Sep 17 00:00:00 2001 From: tierno Date: Wed, 5 Jun 2019 08:28:04 +0000 Subject: [PATCH] fix issue updating a vim network in a multisite deployment Change-Id: I27bb7e49b3f97af0d2efdf0b839b3df2fad10f05 Signed-off-by: tierno --- osm_ro/vim_thread.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/osm_ro/vim_thread.py b/osm_ro/vim_thread.py index 455c625b..7b197dac 100644 --- a/osm_ro/vim_thread.py +++ b/osm_ro/vim_thread.py @@ -707,9 +707,12 @@ class vim_thread(threading.Thread): UPDATE={("number_failed" if task["status"] == "FAILED" else "number_done"): {"INCREMENT": 1}}, WHERE={"uuid": task["instance_action_id"]}) if database_update: + where_filter = {"related": task["related"]} + if task["item"] == "instance_nets" and task["datacenter_vim_id"]: + where_filter["datacenter_tenant_id"] = task["datacenter_vim_id"] self.db.update_rows(table=task["item"], UPDATE=database_update, - WHERE={"related": task["related"]}) + WHERE=where_filter) except db_base_Exception as e: self.logger.error("task={} Error updating database {}".format(task_id, e), exc_info=True) -- 2.25.1