When removing a mongodb application from a model the replica-set-realtion-broken hook errors

Bug #1806029 reported by Martin Hilton on 2018-11-30
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MongoDB Charm
Undecided
Unassigned

Bug Description

When removing a mongodb application that is configured as a replica the unit goes into an error state following the replica-set-relation-broken hook failing.

The log is:

2018-11-30 12:25:51 INFO juju-log replica-set:47: replica_set_relation_broken-start
2018-11-30 12:26:23 DEBUG replica-set-relation-broken Traceback (most recent call last):
2018-11-30 12:26:23 DEBUG replica-set-relation-broken File "/var/lib/juju/agents/unit-mongodb-7/charm/hooks/replica-set-relation-broken", line 1872, in <module>
2018-11-30 12:26:23 DEBUG replica-set-relation-broken hooks.execute(sys.argv)
2018-11-30 12:26:23 DEBUG replica-set-relation-broken File "/var/lib/juju/agents/unit-mongodb-7/charm/hooks/charmhelpers/core/hookenv.py", line 731, in execute
2018-11-30 12:26:23 DEBUG replica-set-relation-broken self._hooks[hook_name]()
2018-11-30 12:26:23 DEBUG replica-set-relation-broken File "/var/lib/juju/agents/unit-mongodb-7/charm/hooks/replica-set-relation-broken", line 1386, in replica_set_relation_broken
2018-11-30 12:26:23 DEBUG replica-set-relation-broken if am_i_primary():
2018-11-30 12:26:23 DEBUG replica-set-relation-broken File "/var/lib/juju/agents/unit-mongodb-7/charm/hooks/replica-set-relation-broken", line 1240, in am_i_primary
2018-11-30 12:26:23 DEBUG replica-set-relation-broken r = run_admin_command(c, 'replSetGetStatus')
2018-11-30 12:26:23 DEBUG replica-set-relation-broken File "/var/lib/juju/agents/unit-mongodb-7/charm/hooks/replica-set-relation-broken", line 538, in run_admin_command
2018-11-30 12:26:23 DEBUG replica-set-relation-broken return client.admin.command(cmdstr)
2018-11-30 12:26:23 DEBUG replica-set-relation-broken File "/usr/lib/python2.7/dist-packages/pymongo/database.py", line 529, in command
2018-11-30 12:26:23 DEBUG replica-set-relation-broken with client._socket_for_reads(read_preference) as (sock_info, slave_ok):
2018-11-30 12:26:23 DEBUG replica-set-relation-broken File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__
2018-11-30 12:26:23 DEBUG replica-set-relation-broken return self.gen.next()
2018-11-30 12:26:23 DEBUG replica-set-relation-broken File "/usr/lib/python2.7/dist-packages/pymongo/mongo_client.py", line 982, in _socket_for_reads
2018-11-30 12:26:23 DEBUG replica-set-relation-broken server = topology.select_server(read_preference)
2018-11-30 12:26:23 DEBUG replica-set-relation-broken File "/usr/lib/python2.7/dist-packages/pymongo/topology.py", line 224, in select_server
2018-11-30 12:26:23 DEBUG replica-set-relation-broken address))
2018-11-30 12:26:23 DEBUG replica-set-relation-broken File "/usr/lib/python2.7/dist-packages/pymongo/topology.py", line 183, in select_servers
2018-11-30 12:26:23 DEBUG replica-set-relation-broken selector, server_timeout, address)
2018-11-30 12:26:23 DEBUG replica-set-relation-broken File "/usr/lib/python2.7/dist-packages/pymongo/topology.py", line 199, in _select_servers_loop
2018-11-30 12:26:23 DEBUG replica-set-relation-broken self._error_message(selector))
2018-11-30 12:26:23 DEBUG replica-set-relation-broken pymongo.errors.ServerSelectionTimeoutError: localhost:27017: [Errno 111] Connection refused
2018-11-30 12:26:24 ERROR juju.worker.uniter.operation runhook.go:129 hook "replica-set-relation-broken" failed: exit status 1

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers