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

Allow to send empty subscription and update version afterward (1.66.x backport) #11435

Merged
merged 1 commit into from
Aug 2, 2024

Conversation

ejona86
Copy link
Member

@ejona86 ejona86 commented Aug 2, 2024

Closes #11232

As described in the original issue:

If a CDS update revoke all subscribed resources, all EDS subscriptions will be cancelled.

adjustResourceSubscription issue

The first observation of the istiod logs is,

>>>>> CDS PUSH
2024-06-04T08:30:16.705222Z	info	ads	CDS: PUSH for node:e2e-service-consumer-base-5dd4cb9fbf-v6gjk.default resources:0 size:0B nonce:af2f0bd1-c785-4232-b381-de703b6e3e7d version:2024-06-04T08:30:16Z/7
>>>>> EDS PUSH immediately after CDS
2024-06-04T08:30:16.705384Z	info	ads	EDS: PUSH for node:e2e-service-consumer-base-5dd4cb9fbf-v6gjk.default resources:2 size:395B empty:0 cached:0/2 nonce:cea5b0b2-82d7-4c81-99cc-744ae9a7948e version:2024-06-04T08:30:16Z/7
2024-06-04T08:30:16.705464Z	debug	grpcgen	building lds for e2e-service-consumer-base-5dd4cb9fbf-v6gjk.default with filter:
map[e2e-service-provider.default.svc.cluster.local:{map[e2e-service-provider.default.svc.cluster.local:{}] map[80:{}]}]
2024-06-04T08:30:16.705535Z	info	ads	LDS: PUSH for node:e2e-service-consumer-base-5dd4cb9fbf-v6gjk.default resources:1 size:450B nonce:29cd5728-2464-48b7-ac40-1acb5bd2bc22 version:2024-06-04T08:30:16Z/7
2024-06-04T08:30:16.706144Z	info	ads	RDS: PUSH for node:e2e-service-consumer-base-5dd4cb9fbf-v6gjk.default resources:1 size:4.8kB nonce:1866c85b-4695-4b37-91b0-d9cb844b4181 version:2024-06-04T08:30:16Z/7
2024-06-04T08:30:16.710333Z	debug	ads	ADS:CDS: REQ e2e-service-consumer-base-5dd4cb9fbf-v6gjk.default-1 resources:2 nonce:af2f0bd1-c785-4232-b381-de703b6e3e7d version:2024-06-04T08:30:16Z/7 
2024-06-04T08:30:16.710475Z	debug	ads	ADS:CDS: ACK e2e-service-consumer-base-5dd4cb9fbf-v6gjk.default-1 2024-06-04T08:30:16Z/7 af2f0bd1-c785-4232-b381-de703b6e3e7d
2024-06-04T08:30:16.713459Z	debug	ads	ADS:EDS: REQ e2e-service-consumer-base-5dd4cb9fbf-v6gjk.default-1 resources:1 nonce:2dd9df3c-e64c-4a8e-9787-429e5dcf2719 version:2024-06-04T08:30:14Z/6 
2024-06-04T08:30:16.713508Z	debug	ads	ADS:EDS: REQ e2e-service-consumer-base-5dd4cb9fbf-v6gjk.default-1 Expired nonce received 2dd9df3c-e64c-4a8e-9787-429e5dcf2719, sent cea5b0b2-82d7-4c81-99cc-744ae9a7948e
>>>>>> NO resources:0 REQ log
2024-06-04T08:30:16.718041Z	debug	ads	ADS:LDS: REQ e2e-service-consumer-base-5dd4cb9fbf-v6gjk.default-1 resources:1 nonce:29cd5728-2464-48b7-ac40-1acb5bd2bc22 version:2024-06-04T08:30:16Z/7 
2024-06-04T08:30:16.718084Z	debug	ads	ADS:LDS: ACK e2e-service-consumer-base-5dd4cb9fbf-v6gjk.default-1 2024-06-04T08:30:16Z/7 29cd5728-2464-48b7-ac40-1acb5bd2bc22

If EDS is empty, adjustResourceSubscription does not work.

resourceVersion update issue

If all resources are removed from a type, e.g. EDS, subscribedResourceTypeUrls entry will be also removed. This will prevent nonce being updated from the upstream EDS PUSH.

Backport of #11264

Otherwise, the server will continue sending updates and if we
re-subscribe to the last resource, the server won't re-send it. Also
completely remove the per-type state, as it could only add confusion.
@ejona86 ejona86 requested a review from larry-safran August 2, 2024 16:09
@ejona86 ejona86 merged commit 19c9b99 into grpc:v1.66.x Aug 2, 2024
13 checks passed
@ejona86 ejona86 deleted the backport-fix-xds-client-1.66 branch August 2, 2024 19:31
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 1, 2024
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.

3 participants