Skip to content

remove init fetch timeout env var#30948

Merged
istio-testing merged 6 commits intoistio:masterfrom
ramaraochavali:fix/default_fetch
Feb 22, 2021
Merged

remove init fetch timeout env var#30948
istio-testing merged 6 commits intoistio:masterfrom
ramaraochavali:fix/default_fetch

Conversation

@ramaraochavali
Copy link
Copy Markdown
Contributor

We already use default fetch time out for clusters and listeners via bootstrap and 0s for SDS. Only EDS and RDS use this flag which I think should behave similar to clusters and listeners. So there is no need for this env var.
[ ] Configuration Infrastructure
[ ] Docs
[ ] Installation
[ X] Networking
[ ] Performance and Scalability
[ ] Policies and Telemetry
[ ] Security
[ ] Test and Release
[ ] User Experience
[ ] Developer Infrastructure

Pull Request Attributes

Please check any characteristics that apply to this pull request.

[X ] Does not have any changes that may affect Istio users.

Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
@ramaraochavali ramaraochavali requested review from a team as code owners February 19, 2021 11:03
@istio-policy-bot istio-policy-bot added area/networking release-notes-none Indicates a PR that does not require release notes. labels Feb 19, 2021
@google-cla google-cla bot added the cla: yes Set by the Google CLA bot to indicate the author of a PR has signed the Google CLA. label Feb 19, 2021
@istio-testing istio-testing added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 19, 2021
Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
@istio-testing istio-testing added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 19, 2021
@ramaraochavali
Copy link
Copy Markdown
Contributor Author

/retest

Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
Ads: &core.AggregatedConfigSource{},
},
ResourceApiVersion: core.ApiVersion_V3,
InitialFetchTimeout: features.InitialFetchTimeout,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This removes the ability to set InitialFetchTimeout=0 and not timeout?

Copy link
Copy Markdown
Contributor Author

@ramaraochavali ramaraochavali Feb 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. But do we need that for EDS and RDS when we do not give that ability for CDS and LDS? It looked inconsistent to me.

Copy link
Copy Markdown
Member

@howardjohn howardjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure this is a safe change to make, see comments inline

},
},
ResourceApiVersion: core.ApiVersion_V3,
ResourceApiVersion: core.ApiVersion_V3,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will cause a blocked DNS cluster to stop envoy permanently rather than for 15s, which I think is undesired?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just for TLS setting. The DNS cluster block may happen because of resolution not happening which is not impacted by this change and we do not have control over that behaviour. This envoyproxy/envoy#10728 fixed that in Envoy. So we should be good - unless you are thinking about some thing different than this?

},
ResourceApiVersion: core.ApiVersion_V3,
InitialFetchTimeout: features.InitialFetchTimeout,
InitialFetchTimeout: ptypes.DurationProto(time.Second * 0),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means a missing cert (which is possible for Gateways) can block envoy forever

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. So we do want this SDS? If yes, I would say we default to 15s here instead of forever because that is sensible default?. But current default is to block forever

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is some thing odd about this though. When I made this change, tests are failing even though features.InitialFetchTimeout is same as what I changed here and sdsAdsConfig. Let me debug this bit more

Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
@istio-testing istio-testing added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 20, 2021
@howardjohn
Copy link
Copy Markdown
Member

howardjohn commented Feb 20, 2021 via email

@ramaraochavali
Copy link
Copy Markdown
Contributor Author

ramaraochavali commented Feb 20, 2021

I think current behavior is unset which defaults to 15s. New behavior is 0s
(forever)

Sorry I did not follow. This is for SDS?

@ramaraochavali
Copy link
Copy Markdown
Contributor Author

I see what you mean. I did not fully look at this method

	timeout, f := testTimeoutVar.Lookup()
		if !f {
			return nil
		}
		return ptypes.DurationProto(timeout)

Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
@ramaraochavali
Copy link
Copy Markdown
Contributor Author

ramaraochavali commented Feb 20, 2021

@howardjohn I cleanup all the stuff but still removed the env var because

  • I think EDS and RDS should be consistent with CDS and LDS (We default it to 15s and do not provide ability to override for them) and I think EDS and RDS do not need the ability. Let me know if you think there are any special cases in them that need that behaviour
  • Defaulted the SdsAdsConfig and ConstructSdsSecretConfig to same 15s

Do you have any other concerns on why we need that control? If you think it is still safe to leave it - I am fine to close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/networking cla: yes Set by the Google CLA bot to indicate the author of a PR has signed the Google CLA. release-notes-none Indicates a PR that does not require release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants