Sharing a DB user password among units of the app

Marco Ceppi marco at ondina.co
Wed Oct 30 14:50:35 UTC 2013


On Wed, Oct 30, 2013 at 10:47 AM, Gustavo Niemeyer <gustavo at niemeyer.net>wrote:

> On Wed, Oct 30, 2013 at 7:35 AM, Kapil Thangavelu
> <kapil.thangavelu at canonical.com> wrote:
> > Just thinking outloud, but In the active-active db scenario, there's an
> > available db for the charm to store this info. ie. the charm could keep
> some
> > bookeeping tables/db instead of using files on disk (a shared key via
> peer
> > relation used for storing the credentials in db).
>
> So you share the credentials for the credentials? :-)
>
> Just share the credentials over the peer relation. Unit 0 creates them.
>

You can't make that assumption and we really frown upon it in charm
reviews. I've seen cases where `juju deploy -n 5 service` results in unit 2
or really unit > 0 being first up. There's also scenarios where there might
not actually be a "unit 0" there's no way to safely guarentee a leader
right now.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20131030/3f357a7f/attachment.html>


More information about the Juju mailing list