Skip to content

Commit

Permalink
Check for powa major version compatibility between repo and remote se…
Browse files Browse the repository at this point in the history
…rver
  • Loading branch information
rjuju committed Jul 8, 2024
1 parent a72c72d commit 9b46664
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions powa_collector/powa_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,20 @@ def __take_snapshot(self):
return

powa_ver = get_powa_version(self.__repo_conn)
powa_remote_ver = get_powa_version(self.__remote_conn)

# We require the same powa major version (X.Y) on the repository and
# each remote server.
if (powa_ver[0][0] != powa_remote_ver[0][0] or
powa_ver[0][1] != powa_remote_ver[0][1]):
error = ("Incompatible PoWA version between the repository server"
+ " (%s.X) and the remote host (%s.X)" % (
powa_ver[0][0] + "." + powa_ver[0][1],
powa_remote_ver[0][0] + "." + powa_remote_ver[0][1]))

self.__report_error(error)
self.__disconnect_repo()
return
ins = self.__repo_conn.cursor()

# Retrieve the global data from the remote server
Expand Down

0 comments on commit 9b46664

Please sign in to comment.