Merge ~silverdrake11/landscape-charm:install-and-bootstrap-bug_lndeng-466 into landscape-charm:main
Proposed by
Kevin Nasto
Status: | Merged |
---|---|
Merged at revision: | c2fecfd36a8f683e3a12b9327c56b012f883f9ca |
Proposed branch: | ~silverdrake11/landscape-charm:install-and-bootstrap-bug_lndeng-466 |
Merge into: | landscape-charm:main |
Diff against target: |
185 lines (+38/-40) 4 files modified
src/charm.py (+8/-19) src/settings_files.py (+9/-0) tests/test_charm.py (+16/-18) tests/test_settings_files.py (+5/-3) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mitch Burton | Approve | ||
Review via email: mp+441128@code.launchpad.net |
Commit message
Fixed install/
Description of the change
Manual testing instructions:
Install race:
Use the following code to trigger a failure in the install and make sure it first errors then resolves itself
import random
num = random.randint(1,3)
if num == 3:
logger.
check_
else:
logger.
Bootstrap bug:
Make sure that filling out these fields before deploying in the bundle, creates the admin
admin_email:
admin_name:
admin_password:
To post a comment you must log in.
I learned that Juju's exponential retry behavior can be triggered by raising an exception. Some things are useful for this such as this install bug/ race condition. The install initially fails but will resolve itself when it's ready. Other things are not useful for this, like erroring out on a mistake in the config (retrying doesn't change the config value). So because of this, raising an exception can be useful for other charm functions in the future or when needed.