Merge lp://staging/~stub/charms/precise/postgresql/extract-pgpass into lp://staging/charms/postgresql

Proposed by Stuart Bishop
Status: Merged
Merged at revision: 46
Proposed branch: lp://staging/~stub/charms/precise/postgresql/extract-pgpass
Merge into: lp://staging/charms/postgresql
Prerequisite: lp://staging/~stub/charms/precise/postgresql/extract-repmgr
Diff against target: 99 lines (+22/-15)
2 files modified
hooks/hooks.py (+17/-15)
templates/recovery.conf.tmpl (+5/-0)
To merge this branch: bzr merge lp://staging/~stub/charms/precise/postgresql/extract-pgpass
Reviewer Review Type Date Requested Status
Marco Ceppi (community) Approve
Review via email: mp+156838@code.staging.launchpad.net

Description of the change

There is no longer any need to use the global ~postgres/.pgpass file, so move it to the charm directory and move us a step closer to allowing colocation.

To post a comment you must log in.
106. By Stuart Bishop

Merged extract-repmgr into extract-pgpass.

107. By Stuart Bishop

Merged extract-repmgr into extract-pgpass.

108. By Stuart Bishop

Merged extract-repmgr into extract-pgpass.

Revision history for this message
Marco Ceppi (marcoceppi) wrote :

This looks good. However, it appears this change will break upgrades since the file location changes but current existing files aren't migrated to the new location/format. Can you confirm that this is the intended behavior?

review: Needs Information
Revision history for this message
Stuart Bishop (stub) wrote :

The upgrade-charm hook greates the new replication user (juju_replication) on the master, and publishes the password on the relationship. This triggers the config-changed hook on the hot standbys, which calls generate_pgpass() to regenerate the $PGPASSFILE.

The old file is left in ~postgres/.pgpass - I didn't want to risk removing it as I don't think I can tell if the file was generated by an old charm or added by an administrator or cohosted charm. I don't think it matters as no access is granted to the user in the pg_hba.conf access control file.

So I think we are good...

Revision history for this message
Marco Ceppi (marcoceppi) wrote :

Thanks for the clarification, LGTM

review: Approve
109. By Stuart Bishop

Merged extract-repmgr into extract-pgpass.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches