~ahasenack/charms/precise/postgresql/postgresql-fix-null-json

  • Committer: Juan L. Negron
  • Date: 2012-11-28 20:23:57 UTC
  • mfrom: (25.3.1 password-handling)
  • Revision ID: juan.negron@canonical.com-20121128202357-tykh90h62grdpi3q
While putting together a charm with a postgresql relation, I ran into a situation that appears to have been anticipated by a TODO comment in the postgresql charm:

    # XXX: This appears to reset the password every time
    # this might not end well

Specifically, I found that the password was being reset (IIRC by the db-{,admin-}relation-changed hook) after I'd made use of it in my charm, and of course then everything went wrong.

There doesn't seem any particularly nice way to deal with this; I don't think we can rely on the password being cached in the relation, because multiple relations might make use of the same user. But given the existing password handling, it doesn't seem that bad to just cache it in a file readable only by root, and this fixed the problem for me. Of course I'm open to better suggestions. MP: 135128
Filename Latest Rev Last Changed Committer Comment Size
..
hooks 1 12 years ago Mark Mims convert Diff
scripts 24.1.30 11 years ago JuanJo Ciarlante adding permanent storage support to postgresql - s Diff
templates 24.1.1 11 years ago Tom Haddon Initial try and custom postgresql charm Diff
.bzrignore 24.1.57 11 years ago Tom Haddon Update .bzrignore Empty Diff Download File
config.yaml 24.1.45 11 years ago Matthew Wedgwood Add nrpe support 7.7 KB Diff Download File
copyright 1 12 years ago Mark Mims convert 756 bytes Diff Download File
metadata.yaml 24.1.59 11 years ago Tom Haddon Update maintainer 748 bytes Diff Download File
README.markdown 16 12 years ago Clint Byrum - removing obsolete ip handling - adding open-port 565 bytes Diff Download File
revision 24.1.58 11 years ago Tom Haddon Add a revision file per charm tools 3 bytes Diff Download File
TODO 24.1.26 11 years ago Tom Haddon Add a TODO 152 bytes Diff Download File