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
This commit is contained in:
parent
98636290c5
commit
e4d2452f2f
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue