Skip to content
This repository has been archived by the owner on Mar 4, 2024. It is now read-only.

Fix cross-model relations #16

Merged
merged 1 commit into from Apr 30, 2019
Merged

Fix cross-model relations #16

merged 1 commit into from Apr 30, 2019

Conversation

johnsca
Copy link
Contributor

@johnsca johnsca commented Apr 18, 2019

With cross-model relations (CMR), the "unit name" visible on the offering side of the relation is a UUID which doesn't match with the unit's own view of its unit name. Thus, the unit cannot find the responses to its cert requests, as they are keyed by the UUID rather than the unit name. By explicitly publishing the unit name over the relation, it ensures that the provider and requirer will use the same key.

We use the unit name rather than a UUID or nonce to ensure that non-CMR deployments are not broken upon upgrade.

Fixes #14 and lp:1813605

With cross-model relations (CMR), the "unit name" visible on the
offering side of the relation is a UUID which doesn't match with the
unit's own view of its unit name.  Thus, the unit cannot find the
responses to its cert requests, as they are keyed by the UUID rather
than the unit name.  By explicitly publishing the unit name over the
relation, it ensures that the provider and requirer will use the same
key.

We use the unit name rather than a UUID or nonce to ensure that non-CMR
deployments are not broken upon upgrade.

Fixes #14
@Cynerva
Copy link
Contributor

Cynerva commented Apr 26, 2019

Is it possible with CMRs to be related to two units with the same name? e.g. kubernetes-worker/0 on two different models.

If so, should we be concerned about it?

This otherwise LGTM.

@johnsca
Copy link
Contributor Author

johnsca commented Apr 29, 2019

@Cynerva It is possible, which is part of why the remote unit name ends up being replaced by a UUID, which is what was causing the problem in the first place. However, because the relation data is scoped by the relation, the only units that will see the data will be the ones of the application involved in the relation, so the unit name is only need to tell which unit within the application should get which data, rather than which unit of which application, if that makes sense.

@Cynerva
Copy link
Contributor

Cynerva commented Apr 30, 2019

Got it. Thanks.

@Cynerva Cynerva merged commit 231c86c into master Apr 30, 2019
@Cynerva Cynerva deleted the johnsca/bug/14/cmr branch April 30, 2019 12:54
tf-gerrit-replicator pushed a commit to tungstenfabric/tf-charms that referenced this pull request Jun 29, 2021
With cross-model relations (CMR), the "unit name" visible
on the offering side of the relation is a UUID which doesn't
match with the unit's own view of its unit name. Thus, the
unit cannot find the responses to its cert requests, as they
are keyed by the UUID rather than the unit name. By explicitly
publishing the unit name over the relation, it ensures that
the provider and requirer will use the same key.
We use the unit name rather than a UUID or nonce to ensure
that non-CMR deployments are not broken upon upgrade.

juju-solutions/interface-tls-certificates#16

Change-Id: I3df63b92fc25423d930b5bf1c263eb62125a0a3f
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Requests for certificates hang when using vault charm in Juju Cross Model Relation
2 participants