string/tuple unpacking bug in new rewrite

Bug #1517607 reported by Simon Davy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
postgresql (Juju Charms Collection)
Fix Released
Undecided
Simon Davy

Bug Description

Trying the new rewrite in a manually added lxd container, there's a traceback

Log here:

http://paste.ubuntu.com/13334361/

I'm not sure as to the cause, I will try an investigate some more.

Revision history for this message
Simon Davy (bloodearnest) wrote :

On line 440 of service.py, rules was thus:

(Pdb) pprint(rules)
[('### BEGIN JUJU SETTINGS ###',),
 ('local', 'all', 'postgres', 'peer', 'map=juju_charm'),
 ('local', 'all', 'all', 'peer'),
 ('host', 'all', 'all', '10.0.0.0/8', 'md5', '# admin_addresses config'),
 ('host', 'all', 'all', '127.0.0.1/32', 'md5', '# admin_addresses config'),
 (('local all sso md5,local all ssoadmin md5', '# extra_pg_auth config'),),
 ('local', 'all', 'all', 'reject', '# Refuse by default'),
 ('host', 'all', 'all', 'all', 'reject', '# Refuse by default'),
 ('### END JUJU SETTINGS ###',)]

So, this is specific config that I've added to the charm to allow ssoadmin to use the local socket like so:

juju set sso-postgresql extra_pg_conf="local all sso md5,local all ssoadmin md5"

Is it possible there's a regression here?

Line service.py:414 has the following:

    # And anything-goes rules, if specified by the operator.
    for line in config['extra_pg_auth'].splitlines():
        add((line, '# extra_pg_auth config'))

Should that split on ',' rather than lines? Or is this is intended as a breaking change?

Stuart Bishop (stub)
summary: - string/tuple unbpacking bug in new rewrite
+ string/tuple unpacking bug in new rewrite
Stuart Bishop (stub)
Changed in postgresql (Juju Charms Collection):
assignee: nobody → Simon Davy (bloodearnest)
status: New → Fix Released
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.