Skip to content
This repository has been archived by the owner on Jan 9, 2020. It is now read-only.

Cleanup reactive states handling and expose replset relation parameter #6

Closed
wants to merge 2 commits into from

Conversation

dshcherb
Copy link
Contributor

This PR is attempts to make state handling better by deleting set_state("*.removed") calls and adding calls to actually remove .available states.

The second patch exposes the replset parameter of a relation which is already present in the mongodb charm code:
https://bazaar.launchpad.net/~charmers/charms/trusty/mongodb/trunk/view/head:/hooks/hooks.py#L1141

Some applications (like zaqar) require replicated or sharded configurations only and do not work with standalone instances which is why the change is needed.

Dmitrii Shcherbakov added 2 commits February 13, 2017 21:33
Instead of setting new states - remove them, otherwise, a situation
will be possible where two states are set indicating that the relation
data is both available and not available.

Signed-off-by: Dmitrii Shcherbakov <dmitrii.shcherbakov@canonical.com>
Some applications require replicaset parameter appended to the mongodb
connection string. For example, zaqar-server does not allow
connections to individual mongodb instances without replset. The
service simply fails after start.

The mongodb charm itself already exports that argument and does a
relation_set. However, reactive charms that might use this interface
are not able to use this parameter without the introduced code.

Also, for granularity, a new state is introduced to distinguish the
states where only a connection string is available from the state where
replset is available.

Signed-off-by: Dmitrii Shcherbakov <dmitrii.shcherbakov@canonical.com>
@dshcherb dshcherb closed this by deleting the head repository Nov 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant