From 57b74d59aff95c11b97a11c3f55221a62b549f12 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 4 Dec 2020 07:41:40 -0500 Subject: [PATCH] Force uuid to lowercase in uuid mapping Most of the codebase presumes lower case uuid, but the uuid mapping was preserving whatever case the attribute was in, making it case sensitive. In the normal discovery process, this was filled in as lower case. However if id.uuid is filled in manually with uppercase, this broke the node lookup by uuid. --- confluent_server/confluent/discovery/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/confluent_server/confluent/discovery/core.py b/confluent_server/confluent/discovery/core.py index ccf0ab13..82a6c148 100644 --- a/confluent_server/confluent/discovery/core.py +++ b/confluent_server/confluent/discovery/core.py @@ -1332,7 +1332,7 @@ def _map_unique_ids(nodes=None): del nodes_by_uuid[uuid_by_nodes[node]] if node in fprint_by_nodes: del nodes_by_fprint[fprint_by_nodes[node]] - uuid = bigmap[node].get('id.uuid', {}).get('value', None) + uuid = bigmap[node].get('id.uuid', {}).get('value', '').lower() if uuid_is_valid(uuid): nodes_by_uuid[uuid] = node fprint = bigmap[node].get(