Skip to content

Commit

Permalink
fix: reduce computer title retry delay
Browse files Browse the repository at this point in the history
  • Loading branch information
st3v3nmw committed Jul 31, 2024
1 parent bea9394 commit 9d5d5be
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions landscape/client/deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def juju_filename(self):
backwards-compatibility."""
return os.path.join(self.data_path, "juju-info.json")

def auto_configure(self, retry=False, delay=120, max_retries=5):
def auto_configure(self, retry=False, delay=15, max_retries=7):
"""Automatically configure the client snap."""
client_conf = snap_http.get_conf("landscape-client").result
auto_enroll_conf = client_conf.get("auto-register", {})
Expand All @@ -224,8 +224,10 @@ def auto_configure(self, retry=False, delay=120, max_retries=5):
if not retry:
break

# retry until we get the computer title (exponential backoff)
# number of retries capped by `max_retries`
# Retry until we get the computer title (with exponential backoff)
# The number of retries is capped by `max_retries`
# With the defaults (delay=15, max_retries=7), we'll
# retry over a period of ~30 minutes.
time.sleep(delay)
delay *= 2

Expand Down

0 comments on commit 9d5d5be

Please sign in to comment.