replicaset not always available in relation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MongoDB Charm |
Won't Fix
|
Low
|
Mario Splivalo |
Bug Description
I've noticed that 'replicaset' is available in the database relation when a replica set has already been explicitly set, and then a relation to mongodb:database is established.
However, I've encountered some problems:
1. The default 'myset' replicaset name is not set on the relation, if I first relate to mongodb:database and then add some units.
2. If I change the replica set name with something like 'juju set mongodb replicaset=foo' after relating to mongodb:database , the relation changed hook does not fire.
I found both of these surprising behaviors. I can work around them by breaking the relation and adding it -- or restricting the order of Juju operations -- so that the mongodb will set the replicaset name on the relation.
However, I am concerned this is fragile behavior.
Are these limitations of Juju, or a defect in the charm that could be improved? My application requires the replicaset name if replication is used with MongoDB (due to driver limitations).
Thanks!
Casey
description: | updated |
Changed in mongodb (Juju Charms Collection): | |
assignee: | nobody → Mario Splivalo (mariosplivalo) |
affects: | mongodb (Juju Charms Collection) → mongodb-charm |
Changed in charm-mongodb: | |
importance: | Undecided → Low |
Changed in charm-mongodb: | |
status: | Incomplete → Won't Fix |
It does appear that the reverse is also true. That a mongodb reporting
> rs.status()
{ "ok" : 0, "errmsg" : "not running with --replSet" }
Can report via the charm a replicaset name