Is there a universal interface I can use?
tilman.baumann at canonical.com
Fri Nov 24 14:19:32 UTC 2017
On 22.11.2017 18:51, Cory Johns wrote:
> However, I see that you also want to retrieve relation data that the
> cassandra charm provides using the "cassandra" interface protocol. Here
> it becomes important to note that whether a relation is subordinate or
> not is independent of the interface protocol the relation uses. Thus,
> you could mark the endpoint as "scope: container" and still use the
> "cassandra" interface protocol. You would then want to drop the
> "host-system" endpoint from your charm, mark the "database" endpoint as
> "interface: cassandra", and connect as you were trying to do. However,
> I seem to recall that Stuart (the maintainer of the cassandra charm)
> raised a possible issue with subordinates using relations that the other
> end doesn't expect to be subordinate, so there might be some concerns
Fascinatingly this works. I always thought the implicit juju-info
relation is something that is only implicit in the provides section.
So I tried this
And indeed cassandra:database connects with cassandra-backup:database
and creates a subordinate charm. Wonderful.
But it doesn't actually work. :/
$ juju run --unit cassandra-backup/7 -- relaton-ids database
/tmp/juju-exec940792089/script.sh: line 1: relaton-ids: command not found
$ juju run --unit cassandra-backup/7 -- relation-ids database
$ juju run --unit cassandra-backup/7 -- relation-list -r database:499
$ juju run --unit cassandra-backup/7 -- relation-get -r database:499 -
There is basically nothing to read in that relation.
If I compare that with a properly connected relation to the same
$ juju run --unit contrail-analytics/1 -- relation-get -r cassandra:277
So something, perhaps the scope, makes this not work.
More information about the Juju