From 620e49c480499231f6cc270e502c64f2c4b539cb Mon Sep 17 00:00:00 2001 From: Manuel Date: Wed, 21 Jan 2026 14:19:44 +0100 Subject: [PATCH 1/2] Fix cluster_id length check in startup.py MAX_ID_LENGTH suggests a maximum length, not a static length. I adapted the condition accordingly --- bibigrid/core/startup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bibigrid/core/startup.py b/bibigrid/core/startup.py index a96bfb2e..30816cde 100755 --- a/bibigrid/core/startup.py +++ b/bibigrid/core/startup.py @@ -68,7 +68,7 @@ def check_cid(cluster_id): LOG.info("-cid %s is not a cid, but probably the master's ip. " "Using the master ip instead of cid only works if a cluster key is in your systems default ssh key " "location (~/.ssh/). Otherwise bibigrid can't identify the cluster key.") - if len(cluster_id) != id_generation.MAX_ID_LENGTH or not set(cluster_id).issubset( + if len(cluster_id) > id_generation.MAX_ID_LENGTH or not set(cluster_id).issubset( id_generation.CLUSTER_UUID_ALPHABET): LOG.warning( f"Cluster id doesn't fit length ({id_generation.MAX_ID_LENGTH}) or defined alphabet " From feb1fe758d4355b73f16621af91113e28863a33e Mon Sep 17 00:00:00 2001 From: Manuel Date: Fri, 30 Jan 2026 11:46:50 +0100 Subject: [PATCH 2/2] Fix condition for cluster_id length check in startup_rest.py --- bibigrid/core/startup_rest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bibigrid/core/startup_rest.py b/bibigrid/core/startup_rest.py index e995e090..f56e1af3 100644 --- a/bibigrid/core/startup_rest.py +++ b/bibigrid/core/startup_rest.py @@ -64,7 +64,7 @@ def setup(cluster_id, configurations_json=None): """ if cluster_id: if cluster_id and ( - len(cluster_id) != id_generation.MAX_ID_LENGTH or not set(cluster_id).issubset( + len(cluster_id) > id_generation.MAX_ID_LENGTH or not set(cluster_id).issubset( id_generation.CLUSTER_UUID_ALPHABET)): LOG.warning(f"Cluster id doesn't fit length ({id_generation.MAX_ID_LENGTH}) or defined alphabet " f"({id_generation.CLUSTER_UUID_ALPHABET}). Aborting.")