-
Notifications
You must be signed in to change notification settings - Fork 0
[MISC] Blocked status when database relation is not initialised #369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
3737228
to
6507244
Compare
6507244
to
bb8f0fd
Compare
src/charm.py
Outdated
"""Only sets an Active status.""" | ||
self.unit.status = ActiveStatus() | ||
"""Sets initial Waiting status and checks if writes should be restarted.""" | ||
self.unit.status = WaitingStatus() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should most probably replace it with Blocked
status, as it needs a relation to be formed (based on the status's meaning from the figure from https://documentation.ubuntu.com/juju/3.6/reference/status/#application-status).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blocked status may require tweaks in downstream CIs, IIRC libjuju
's wait for idle errors out by default on blocked status.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, AS IS, but please explain the test skip + improve blocked status if possible. Tnx!
client = Client(namespace=ops_test.model.info.name) | ||
client.delete(Pod, name=f"{TEST_APP_NAME}-0") | ||
else: | ||
pytest.skip("Unstable LXC restart test") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please mention this problem in PR description at least.
BTW. what is unstable in LXD restart?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This removes the unstable marker for LXD added in #368 (comment). The test passes now, so it's no longer to be skipped.
src/charm.py
Outdated
"""Only sets an Active status.""" | ||
self.unit.status = ActiveStatus() | ||
"""Sets initial Waiting status and checks if writes should be restarted.""" | ||
self.unit.status = BlockedStatus("Waiting for integration") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for reacting on Marcelo comment about Waiting=>Blocked switch, but the Juju status message is still confusingly saying waiting
, which may confuse end-users.
Let's hint them to act:
Integrate with the database provider
(e.g. data-integrator)
or
No database relation available
(e.g. sysbench charm)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed message to No database integration available
.
448aef4
to
6963c85
Compare
Uh oh!
There was an error while loading. Please reload this page.