Skip to content

Commit

Permalink
do not fail if missing k8s-dqlite port (#4488)
Browse files Browse the repository at this point in the history
  • Loading branch information
neoaggelos authored Jun 10, 2024
1 parent a2acc08 commit dff3627
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions scripts/wrappers/join.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,10 +594,13 @@ def update_dqlite(cluster_cert, cluster_key, voters, host):

# We get the dqlite port from the already existing deployment
port = 19001
with open("{}/info.yaml".format(cluster_backup_dir)) as f:
data = yaml.safe_load(f)
if "Address" in data:
port = data["Address"].rsplit(":")[-1]
try:
with open("{}/info.yaml".format(cluster_backup_dir)) as f:
data = yaml.safe_load(f)
if "Address" in data:
port = data["Address"].rsplit(":")[-1]
except OSError:
pass

# If host is an IPv6 address, wrap it in square brackets
try:
Expand Down

0 comments on commit dff3627

Please sign in to comment.