Skip to content

Commit

Permalink
[patch] ensure operator gets amlens out of maintenance (#199)
Browse files Browse the repository at this point in the history
Co-authored-by: Jon Levell <[email protected]>
  • Loading branch information
jonquark and Jon Levell authored Oct 11, 2024
1 parent 23efc56 commit 04bc3ce
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions operator/roles/amlen/library/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ def configureHA(server1, server2, groupName):
logger.warn(content)

server2.clean_store()
server2.switch_to_production_mode()

if not server2.check_ha_status():
logger.error("Error configuring HA for Amlen server %s" % (server2.server_name))
Expand Down Expand Up @@ -348,10 +349,12 @@ def configureHA(server1, server2, groupName):
if ok == False:
# Restart both servers and try again
logger.warn("Initial HA synchronization failed, restarting server1")
server1.restart()
server1.restart(maintenance="stop")

if server2 != None:
logger.warn("Initial HA synchronization failed, restarting server2")
server2.restart()
server2.restart(maintenance="stop")

ok = server1.check_ha_status()

if ok == False:
Expand Down

0 comments on commit 04bc3ce

Please sign in to comment.