canonical / canonical/mongos-operator
Error message for "cluster-relation-change" hook failure is unclear for user
- Dominant language
- Python
- Stars
- 4
- Forks
- 1
- Avg merge
- 7h 28m
- Merged PRs (30d)
- 11
Description
## Issue
Mongos' message `hook failed: "cluster-relation-changed"` and `error` status are not very informative for an end user.
## Example
On a sharded cluster, I deployed `data-integrator` without any config specifications:
```shell
juju deploy data-integrator
juju deploy mongos --channel 6/edge
```
which leaves it in a `blocked` state.
While still `blocked`, I tried to integrate it with mongos:
```shell
juju integrate mongos data-integrator
```
This gave the following `juju status` output for `mongos`:
```shell
App Version Status Scale Charm Channel Rev Exposed Message
config-server active 1 mongodb 6/beta 149 no Primary
data-integrator blocked 1 data-integrator stable 19 no Please specify either topic, index, or database name
mongos error 1 mongos 6/edge 5 no hook failed: "cluster-relation-changed"
shard0 active 1 mongodb 6/beta 149 no Primary
shard1 active 1 mongodb 6/beta 149 no Primary
```
## Solution
As suggested by @MiaAltieri, the status for this event could instead go into `blocked` with a more explanatory error message.
Contributor guide
Research direction
Reproduce the blocked data-integrator and mongos integration with the Juju commands and inspect the cluster-relation-changed hook handling. The work is complete when this failure leaves mongos blocked with an explanatory user-facing status message instead of error and hook failed: "cluster-relation-changed".
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mongodb, python
- Domain
- databases, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100