Comment 2 for bug 1239681

Revision history for this message
Dave Cheney (dave-cheney) wrote : Re: [Bug 1239681] Re: relation-get failing with 'permission denied'

is your relation really called u'db ?

On Tue, Oct 15, 2013 at 12:05 AM, Stuart Bishop
<email address hidden> wrote:
> I won't be able to look at this further for the next two weeks.
>
> --
> You received this bug notification because you are subscribed to juju-
> core.
> Matching subscriptions: MOAR JUJU SPAM!
> https://bugs.launchpad.net/bugs/1239681
>
> Title:
> relation-get failing with 'permission denied'
>
> Status in juju-core:
> New
> Status in “postgresql-psql” package in Juju Charms Collection:
> New
>
> Bug description:
> The PostgreSQL test suite is no longer passing with Juju 1.16 and the
> local provider, with relation-get failing with 'permission denied'
> exceptions under some circumstances. It was working fine with Juju
> 1.14
>
> ./test.py -vv PostgreSQLCharmTestCase.test_failover_election seems to
> trigger it every time. I haven't yet isolated the trigger.
>
> error: permission denied
> Traceback (most recent call last):
> File "/var/lib/juju/agents/unit-psql-0/charm/hooks/db-relation-changed", line 153, in <module>
> hooks.execute(sys.argv)
> File "/var/lib/juju/agents/unit-psql-0/charm/hooks/charmhelpers/core/hookenv.py", line 322, in execute
> self._hooks[hook_name]()
> File "/var/lib/juju/agents/unit-psql-0/charm/hooks/db-relation-changed", line 149, in rebuild_hook
> return rebuild_all_relations()
> File "/var/lib/juju/agents/unit-psql-0/charm/hooks/db-relation-changed", line 58, in rebuild_all_relations
> for _, relid, unit, relation in all_relations(relation_types=['db']):
> File "/var/lib/juju/agents/unit-psql-0/charm/hooks/db-relation-changed", line 43, in all_relations
> unit=unit, rid=relid)
> File "/var/lib/juju/agents/unit-psql-0/charm/hooks/charmhelpers/core/hookenv.py", line 42, in wrapper
> res = func(*args, **kwargs)
> File "/var/lib/juju/agents/unit-psql-0/charm/hooks/charmhelpers/core/hookenv.py", line 174, in relation_get
> return json.loads(subprocess.check_output(_args))
> File "/usr/lib/python2.7/subprocess.py", line 544, in check_output
> raise CalledProcessError(retcode, cmd, output=output)
> subprocess.CalledProcessError: Command '['relation-get', '--format=json', '-r', u'db:23', '-', u'postgresql/0']' returned non-zero exit status 1
> failed: exit status 1
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju-core/+bug/1239681/+subscriptions