Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
apiserver/uniter: Ignore EnterScope from invalid units #7547
Conversation
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
|
Check failure looks spurious - presence pruner tests failed? |
|
Build failed: Tests failed |
|
Looks like a spurious failure of MachineSuite.TestMigratingModelWorkers in cmd/jujud/agent. $$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
jujubot
merged commit b6932f3
into
juju:2.2
Jun 23, 2017
1 check failed
github-check-merge-juju
Ran tests against PR. Use !!.*!! to request another build. IE, !!build!!, !!retry!!
Details
babbageclunk
referenced this pull request
Jun 23, 2017
Closed
apiserver/uniter: Ignore EnterScope with invalid principals #7542
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
babbageclunk commentedJun 23, 2017
Description of change
If we see a request to EnterScope where the unit's principal isn't in
the relation specified, we log and ignore it. These requests can happen
when a controller is upgraded from 2.1 to 2.2, and the model has a
subordinate application related to multiple principals - the uniter used to think
that those units should be in the relation, but they shouldn't, and
allowing them to enter scope will prevent the application from being
removed because its relations don't go away (since they have units in
scope that never leave).
Ignore the requests to prevent the old uniters from crashing with an
error, which would prevent upgrading them.
Alternative implementation of #7542, with the check for validity of the relation unit being
opt-in rather than raising an error on construction - there are at least 3 or 4 places in the
code that create potentially-invalid
RelationUnits to queryInScopeorJoined, andthis was a simpler fix to avoid breaking them.
QA steps
Bug reference
Really fixes https://bugs.launchpad.net/juju/+bug/1699050