Redis integration. Do not use StoredState. #225
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Related to #208 (failing S3 upload_assets). Also story ISD-1767.
When the Redis IP address changes, if discourse also restarts/upgrades, it can get into error state, and it will not advance.
The charm will be unable to migrate/upload to s3 or any other similar action in the workload, as the Redis IP address is wrong. The reason for the Redis IP address to be wrong is because it was stored previously in StoredState, being the correct one is in the relation data of the Redis integration.
The fix consists in not using StoredState and getting the IP address from the relation data.
Rationale
There is a fix that can get Discourse into error state, without any fix except changing the charm code manually (or undeploying the charm).
Juju Events Changes
Module Changes
Library Changes
Checklist
src-docs
urgent
,trivial
,complex
)