Destroying deployed mongodb service fails with 'replica-set-relation-broken'

Bug #1436029 reported by Mario Splivalo
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
MongoDB Charm
In Progress
Undecided
Mario Splivalo

Bug Description

When completely removing deployed mongodb service, the unit which is currently 'primary' will not get removed - it will remain stuck in this state:

agent-state-info: 'hook failed: "replica-set-relation-broken"'

This is the excerpt from the log file:

2015-03-24 19:27:18 INFO unit.m7/0.replica-set-relation-broken logger.go:40 Traceback (most recent call last):
2015-03-24 19:27:18 INFO unit.m7/0.replica-set-relation-broken logger.go:40 File "/var/lib/juju/agents/unit-m7-0/charm/hooks/replica-set-relation-broken", line 1618, in <module>
2015-03-24 19:27:18 INFO unit.m7/0.replica-set-relation-broken logger.go:40 hooks.execute(sys.argv)
2015-03-24 19:27:18 INFO unit.m7/0.replica-set-relation-broken logger.go:40 File "/var/lib/juju/agents/unit-m7-0/charm/hooks/charmhelpers/core/hookenv.py", line 528, in execute
2015-03-24 19:27:18 INFO unit.m7/0.replica-set-relation-broken logger.go:40 self._hooks[hook_name]()
2015-03-24 19:27:18 INFO unit.m7/0.replica-set-relation-broken logger.go:40 File "/var/lib/juju/agents/unit-m7-0/charm/hooks/replica-set-relation-broken", line 1238, in replica_set_relation_broken
2015-03-24 19:27:18 INFO unit.m7/0.replica-set-relation-broken logger.go:40 master_node = r['primary']
2015-03-24 19:27:18 INFO unit.m7/0.replica-set-relation-broken logger.go:40 KeyError: 'primary'

The workaround is to manually resolve failed unit with 'juju resolved'. After that juju will remove the unit, and completely destroy the service.

Related branches

Changed in mongodb (Juju Charms Collection):
assignee: nobody → Mario Splivalo (mariosplivalo)
status: New → Confirmed
status: Confirmed → New
Changed in mongodb (Juju Charms Collection):
status: New → In Progress
affects: mongodb (Juju Charms Collection) → mongodb-charm
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.