Comment 1 for bug 1517607

Revision history for this message
Simon Davy (bloodearnest) wrote : Re: string/tuple unbpacking bug in new rewrite

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?