Skip to content
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

Fix global service incompatibility when v1.14 agents connect to a v1.13 cluster #27882

Merged
merged 1 commit into from Sep 7, 2023

Conversation

giorio94
Copy link
Member

@giorio94 giorio94 commented Sep 1, 2023

Note: this fix targets v1.14 only, as the ClusterID field of the ClusterService struct has been introduced in v1.14, and thus on v1.15 we can safely assume that it is present (as we support one minor version skew between clusters).

2819d7c ("service: add extra validation for global services") introduced a validation function to prevent unmarshalling invalid global service objects retrieved from remote clusters. In particular, it flags a ClusterID=0 as invalid, unless it matches the one of the local cluster (as that case is supported for external workloads).

Yet, the ClusterID field was not present as part of the ClusterService struct in v1.13, causing a failure when the v1.14 agents connect to a cluster still running the v1.13 clustermesh-apiserver. Hence, let's relax this validation to support ClusterID=0 and prevent issues during upgrades.

Fixes: 2819d7c ("service: add extra validation for global services")
Reported-by: @LukeFrostmourne

Fix global service incompatibility when v1.14 agents connect to a v1.13 cluster

@giorio94 giorio94 requested a review from a team as a code owner September 1, 2023 09:45
@maintainer-s-little-helper maintainer-s-little-helper bot added backport/1.14 This PR represents a backport for Cilium 1.14.x of a PR that was merged to main. kind/backports This PR provides functionality previously merged into master. labels Sep 1, 2023
@giorio94 giorio94 requested review from a team and YutaroHayakawa and removed request for a team September 1, 2023 09:45
@giorio94 giorio94 added kind/bug This is a bug in the Cilium logic. release-note/bug This PR fixes an issue in a previous release of Cilium. area/clustermesh Relates to multi-cluster routing functionality in Cilium. labels Sep 1, 2023
@giorio94
Copy link
Member Author

giorio94 commented Sep 1, 2023

/test-backport-1.14

@youngnick
Copy link
Contributor

/test-backport-1.14

2819d7c ("service: add extra validation for global services")
introduced a validation function to prevent unmarshalling invalid global
service objects retrieved from remote clusters. In particular, it
flags a ClusterID=0 as invalid, unless it matches the one of the local
cluster (as that case is supported for external workloads).

Yet, the ClusterID field was not present as part of the ClusterService
struct in v1.13, causing a failure when the v1.14 agents connect to
a cluster still running the v1.13 clustermesh-apiserver. Hence, let's
relax this validation to support ClusterID=0 and prevent issues during
upgrades.

Fixes: 2819d7c ("service: add extra validation for global services")
Reported-by:  Luke <lifeixiangchina@gmail.com>
Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
@bimmlerd bimmlerd force-pushed the pr/giorio94/v1.14/fix-cluster-service-validation branch from 81aafe3 to d6ab500 Compare September 7, 2023 12:47
@bimmlerd
Copy link
Member

bimmlerd commented Sep 7, 2023

/test-backport-1.14

Required tests were borked due to recent renaming of stuff, I've rebased and kicked them off again.

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Sep 7, 2023
@tklauser tklauser merged commit f135240 into v1.14 Sep 7, 2023
189 checks passed
@tklauser tklauser deleted the pr/giorio94/v1.14/fix-cluster-service-validation branch September 7, 2023 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/clustermesh Relates to multi-cluster routing functionality in Cilium. backport/1.14 This PR represents a backport for Cilium 1.14.x of a PR that was merged to main. kind/backports This PR provides functionality previously merged into master. kind/bug This is a bug in the Cilium logic. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/bug This PR fixes an issue in a previous release of Cilium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants