From e4d2452f2f669e8c709cda5043c9ab67d40a4f2f Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Fri, 9 Feb 2018 20:20:22 -0500 Subject: [PATCH] Always use string ID for WaitConditionHandle signals Using an integer as the ID - which is what we currently do for OS::Heat::WaitConditionHandles without an ID explicitly supplied by the signaller - means that we can implicitly create an entry that will collide with an explicitly specified string ID when we serialise to and then deserialise from JSON to store the metadata in the database. These types of collisions are silent and avoid being logged (despite the fact that we attempt to catch and log collisions), which makes any issues very, very difficult to debug. Change-Id: Ia613e79dc9757c4594b84ed2105bfc1357d1e037 Related-Bug: #1738653 --- heat/engine/resources/wait_condition.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/heat/engine/resources/wait_condition.py b/heat/engine/resources/wait_condition.py index a7d68f0fb2..87d797237b 100644 --- a/heat/engine/resources/wait_condition.py +++ b/heat/engine/resources/wait_condition.py @@ -70,7 +70,7 @@ class BaseWaitConditionHandle(signal_responder.SignalResponder): raise ValueError(_("Metadata format invalid")) new_entry = signal_data.copy() - unique_id = new_entry.pop(self.UNIQUE_ID) + unique_id = six.text_type(new_entry.pop(self.UNIQUE_ID)) new_rsrc_metadata = latest_rsrc_metadata.copy() if unique_id in new_rsrc_metadata: