From 680c62a6e442f661513a1e56d2da151f9db116cc Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Sun, 13 Jun 2021 14:43:37 -0400 Subject: [PATCH] Fix schema path call and version check --- daemon-common/cluster.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon-common/cluster.py b/daemon-common/cluster.py index fb1ab2ea..f4ea1d82 100644 --- a/daemon-common/cluster.py +++ b/daemon-common/cluster.py @@ -318,12 +318,12 @@ def cluster_restore(zkhandler, cluster_data): kv = [] schema_version = None for key in cluster_data: - if key == zkhandler.zkschema.path('base.schema.version'): + if key == zkhandler.schema.path('base.schema.version'): schema_version = cluster_data[key] data = cluster_data[key] kv.append((key, data)) - if schema_version != zkhandler.schema.version: + if int(schema_version) != int(zkhandler.schema.version): return False, 'ERROR: Schema version of backup ({}) does not match cluster schema version ({}).'.format(schema_version, zkhandler.schema.version) # Close the Zookeeper connection