postgresql charm fails to handle nagios user on the slave node

Bug #1409942 reported by David Ames
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Juju Charms Collection
New
Undecided
Unassigned

Bug Description

When more than one postgres instance has been deployed the slave node(s) fail to setup the nagios user when in a relation with nrpe-external-master:

2015-01-12 22:29:22 INFO nrpe-external-master-relation-changed Traceback (most recent call last):
2015-01-12 22:29:22 INFO nrpe-external-master-relation-changed File "/var/lib/juju/agents/unit-push-gateway-pg-1/charm/hooks/nrpe-external-master-relation-changed", line 2636, in <module>
2015-01-12 22:29:22 INFO nrpe-external-master-relation-changed hooks.execute(sys.argv)
2015-01-12 22:29:22 INFO nrpe-external-master-relation-changed File "/var/lib/juju/agents/unit-push-gateway-pg-1/charm/hooks/charmhelpers/core/hookenv.py", line 490, in execute
2015-01-12 22:29:22 INFO nrpe-external-master-relation-changed self._hooks[hook_name]()
2015-01-12 22:29:22 INFO nrpe-external-master-relation-changed File "/var/lib/juju/agents/unit-push-gateway-pg-1/charm/hooks/nrpe-external-master-relation-changed", line 2460, in update_nrpe_checks
2015-01-12 22:29:22 INFO nrpe-external-master-relation-changed nagios_password = create_user('nagios')
2015-01-12 22:29:22 INFO nrpe-external-master-relation-changed File "/var/lib/juju/agents/unit-push-gateway-pg-1/charm/hooks/nrpe-external-master-relation-changed", line 1445, in create_user
2015-01-12 22:29:22 INFO nrpe-external-master-relation-changed run_sql_as_postgres(sql, AsIs(quote_identifier(user)), password)
2015-01-12 22:29:22 INFO nrpe-external-master-relation-changed File "/var/lib/juju/agents/unit-push-gateway-pg-1/charm/hooks/nrpe-external-master-relation-changed", line 920, in run_sql_as_postgres
2015-01-12 22:29:22 INFO nrpe-external-master-relation-changed cur.execute(sql, parameters)
2015-01-12 22:29:22 INFO nrpe-external-master-relation-changed psycopg2.InternalError: cannot execute ALTER ROLE in a read-only transaction
2015-01-12 22:29:22 INFO nrpe-external-master-relation-changed

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.