-
Notifications
You must be signed in to change notification settings - Fork 499
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JUJU-3968] Fix token generation for offered apps that also consume #15714
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wallyworld
force-pushed
the
offer-consume=sameapp
branch
from
June 8, 2023 06:00
bd442cf
to
b2ef883
Compare
hpidcock
approved these changes
Jun 8, 2023
wallyworld
force-pushed
the
offer-consume=sameapp
branch
from
June 8, 2023 08:21
b2ef883
to
efc6ce0
Compare
/merge |
Merged
jujubot
added a commit
that referenced
this pull request
Jun 8, 2023
#15716 Merge 2.9 [Merge pull request](6390036) #15714 [from wallyworld/offer-consume=sameapp](6390036) Conflicts was new auth param. ``` # Conflicts: # apiserver/common/crossmodel/crossmodel.go # apiserver/facades/controller/crossmodelrelations/crossmodelrelations.go # apiserver/facades/controller/remoterelations/remoterelations.go # ``` ## QA steps See PRs
Merged
jujubot
added a commit
that referenced
this pull request
Jun 8, 2023
#15717 Merge 3.1 #15676 [from wallyworld/newer-clients-migrate](7c1f884) #15672 [from hpidcock/bump-juju-description-v3.0.15](acec126) #15683 [from hpidcock/fix-persistent-storage-test](460dd21) #15673 [from barrettj12/check-merge](5c253c3) #15677 [from barrettj12/invalid-offer](3cb3f8b) #15654 [from ycliuhw/fix/backendRefCount](4e5ae3c) #15692 [from wallyworld/fix-secrets-cmr](a1fb0c4) [t](840bc09) #15709 [from wallyworld/hook-secret-revison](840bc09) #15701 [from hpidcock/fix-upgrade-podspec-sidecar](d465c93) #15681 [from anvial/JUJU-3882-fix-test-deploy-test-…](f54c1ad) #15714 [from wallyworld/offer-consume=sameapp](6390036) Conflicts were upgrade steps - the 3.1.3 step has been moved to 3.2.1. Also an auth tweak to crossmodelrelaltions. ``` # Conflicts: # apiserver/common/crossmodel/auth_test.go # apiserver/facades/controller/crossmodelrelations/crossmodelrelations.go # rpc/params/apierror.go # state/upgrades.go # state/upgrades_test.go # upgrades/backend.go # ``` ## QA steps See PRs
Merged
jujubot
added a commit
that referenced
this pull request
Jun 9, 2023
#15719 Merge 3.2 No conflicts. Upgrade steps were deleted. #15636 [from jack-w-shaw/JUJU-3822_replace_ubuntu_w…](1a2759d) #15650 [from SimonRichardson/fix-machine-test-logs-aws](c316413) #15652 [from barrettj12/ojson](4436840) #15653 [from barrettj12/teardown-logs](ee886dd) #15633 [from anvial/JUJU-3821-fix-test-deploy-aks-c…](0bb6df2) #15657 [from anvial/JUJU-3842-fix-deploy-aks-clean-…](f16dd80) #15660 [from hpidcock/ignore-delete-network-interface](686b6f2) #15661 [from hpidcock/fix-data-race-getosfromseries](f639f09) #15662 [from hpidcock/fix-relation-departing-test](68ef945) #15663 [from hpidcock/fix-test-branch](c14bcb3) #15313 [from tlm/teardown-2.0](243fd66) #15542 [from masnax/project-fix](8ba03ec) #15676 [from wallyworld/newer-clients-migrate](7c1f884) #15672 [from hpidcock/bump-juju-description-v3.0.15](acec126) #15683 [from hpidcock/fix-persistent-storage-test](460dd21358378e7d1204348c37a9ba26e49b5871)https://github.com/juju/juju/pull/15673 [from barrettj12/check-merge](5c253c3) #15677 [from barrettj12/invalid-offer](3cb3f8b) #15654 [from ycliuhw/fix/backendRefCount](4e5ae3c) #15692 [from wallyworld/fix-secrets-cmr](a1fb0c4) #15709 [from wallyworld/hook-secret-revison](840bc09) #15701 [from hpidcock/fix-upgrade-podspec-sidecar](d465c93) #15681 [from anvial/JUJU-3882-fix-test-deploy-test-…](f54c1ad) #15573 [from jack-w-shaw/JUJU-3447_implement_ModelF…](f7082ca) #15714 [from wallyworld/offer-consume=sameapp](6390036) ## QA steps See PRs
Merged
jujubot
added a commit
that referenced
this pull request
Jun 9, 2023
#15721 Merge 3.3 #15636 [from jack-w-shaw/JUJU-3822_replace_ubuntu_w…](1a2759d) #15650 [from SimonRichardson/fix-machine-test-logs-aws](c316413) #15652 [from barrettj12/ojson](4436840) #15653 [from barrettj12/teardown-logs](ee886dd) #15633 [from anvial/JUJU-3821-fix-test-deploy-aks-c…](0bb6df2) #15657 [from anvial/JUJU-3842-fix-deploy-aks-clean-…](f16dd80) #15660 [from hpidcock/ignore-delete-network-interface](686b6f2) #15661 [from hpidcock/fix-data-race-getosfromseries](f639f09) #15662 [from hpidcock/fix-relation-departing-test](68ef945) #15663 [from hpidcock/fix-test-branch](c14bcb3) #15313 [from tlm/teardown-2.0](243fd66) #15542 [from masnax/project-fix](8ba03ec) #15676 [from wallyworld/newer-clients-migrate](7c1f884) #15672 [from hpidcock/bump-juju-description-v3.0.15](acec126) #15683 [from hpidcock/fix-persistent-storage-test](460dd21358378e7d1204348c37a9ba26e49b5871)https://github.com/juju/juju/pull/15673 [from barrettj12/check-merge](5c253c3) #15677 [from barrettj12/invalid-offer](3cb3f8b) #15654 [from ycliuhw/fix/backendRefCount](4e5ae3c) #15692 [from wallyworld/fix-secrets-cmr](a1fb0c4) #15709 [from wallyworld/hook-secret-revison](840bc09) #15701 [from hpidcock/fix-upgrade-podspec-sidecar](d465c93) #15681 [from anvial/JUJU-3882-fix-test-deploy-test-…](f54c1ad) #15573 [from jack-w-shaw/JUJU-3447_implement_ModelF…](f7082ca) #15714 [from wallyworld/offer-consume=sameapp](6390036) Conflicts ``` # Conflicts: # apiserver/facades/client/client/client_test.go # featuretests/package_test.go # ``` ## QA steps See PRs
manadart
changed the title
[JUJU-3968] Fix token generation for offered apps which also consume
[JUJU-3968] Fix token generation for offered apps that also consume
Jun 9, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes a cross model relations corner case:
Model 1
app A
offer app A
Model 2
app B
app C
offer app C
Model 1
relate A->C
Model 2
relate B->A
The unit relation hooks for C do not fire.
The root cause is that only one cmr token for app A is created and used for both the offer relation and consumer relation. So model 2 gets a duplicate remote entity token and the resolution of token to entity tag fails for the C->A relation.
The fix is to create the token for offering relations keyed on application offer tag, not application tag. This allows the same app to be in both an offering and consuming relation to a given model since different tokens are created for the different roles of the app.
There was also an unused app token parameter in the ingress address change watcher which was removed. This is lucky as it avoids the need to look up offers in the firewaller worker.
QA steps
I used modified dummy-source and dummy-sink charms with extra endpoints to set up a cross model scenario as per the description. After the relations were created, show-status-log on each of the various units showed relation created and joined hooks being run. Previously, the relation joined hooks for one of the units would have been missing.
Bug reference
https://bugs.launchpad.net/juju/+bug/2022855