Does juju support 'named' interfaces?
Sidnei da Silva
sidnei.da.silva at canonical.com
Tue Jun 26 12:55:46 UTC 2012
On Tue, Jun 26, 2012 at 3:41 AM, Clint Byrum <clint at ubuntu.com> wrote:
> I think this shouldn't be too challenging:
> Some stipulations:
> * both requires and provides can be satisfied/utilized multiple times.
> * each established relationship has an ID. You will see it in the
> *-relation-* hooks as $JUJU_RELATION_ID. They can also be enumerated
> with `relation-ids`.
> * Each unit of each service related to you will cause relation-joined
> and relation-changed hooks with a different $JUJU_UNIT_NAME.
> * One can have multiple relations of the same interface type
> Given that, I'd do this with the current pgsql charm:
> * Require a separate relation name for the "mapping" database.
> * Make the number of shards configurable. Default to -1 which means
> "1 per shard db server" shard names are just shard#
> * mapping-relation-changed: assign all unassigned shards in all available
> shard dbs.
> * shard-relation-changed: record shard db target in a list of available
> shard dbs.
> * Use $JUJU_RELATION_ID+$JUJU_UNIT_NAME to uniquely name them.
> * re-run mapping-relation-changed
> * shard-relation-departed/broken: shard is funneled to an unused pool
> if possible, or somehow flagged as "dead" or "orphaned"
> * config-changed basically just re-runs mapping-relation-changed
I think what's missing here is a way to identify which shard unit
contains the data for a specific shard, by naming it explicitly. I
like Gustavo's suggestion to make the shard name a property of the
Make the most of Ubuntu with Ubuntu One
More information about the Juju