-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
Remove incorrect/vague explanation of probe config #48536
base: main
Are you sure you want to change the base?
Conversation
Remove the incorrect explanation of initialDelaySeconds with periodSeconds relation in configure probes. Page: Configure Liveness, Readiness, Startup Probes. Signed-off-by: Qiyue Yao <[email protected]>
Welcome @qiyueyao! |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
✅ Pull request preview available for checkingBuilt without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
This line was introduced in #43289, and the author then said that the behavior was tested. So ... this needs a tech review. |
/sig node |
@kubernetes/sig-node-pr-reviews I've not tested this, but I do agree: it will need a tech review from SIG Node before we can merge the change. |
Thanks for your attention. Using this example to test on K8s v1.27 several times, the same behaviors show that if |
Thanks for the confirmation. Please make sure the revised text clearly and precisely describe the system behavior then. Setting |
readiness probe delays do not begin until the startup probe has succeeded. Defaults to 0 | ||
seconds. Minimum value is 0. | ||
readiness probe delays do not begin until the startup probe has succeeded. | ||
`initialDelaySeconds` will block probes, but `periodSeconds` remains active. The probe may |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
by "active", do you mean "effective"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better be explicit when you say "the probe". Which probe are you referring to in this context?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original wording is much more clear for me. I can't think of a suggestion for rewording this, but I don't think the current phrasing is an improvement.
Maybe something like:
An `initialDelaySeconds` value greater than 0 will delay when the first probe starts. If `periodSeconds` is less than the `initialDelaySeconds` regular periodic probes will begin. For example, if `initialDelaySeconds` is set to 20, but `periodSeconds` is set to 10, periodic probes will still begin after an initial 10 seconds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestions. This is probably still a bit confusing, because I was trying to say if initialDelaySeconds
is set to 20, periodSeconds
is set to 10, the initial probe is around 30; if initialDelaySeconds
is set to 10, periodSeconds
is set to 20, the initial probe is around 20.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have combined your suggestions into a modified explanation, does that sound clearer? Thanks.
the value of `periodSeconds` is greater than `initialDelaySeconds` then `periodSeconds` | ||
intervals remain effective. For example, if `initialDelaySeconds` is set to 20, but | ||
`periodSeconds` is set to 10, periodic probes will still begin after an initial 20 seconds. | ||
Defaults to 0 seconds. Minimum value is 0. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic is much more confusing in the revised text.
If the value of
periodSeconds
is greater thaninitialDelaySeconds
thenperiodSeconds
intervals remain effective.
This talks about periodSeconds > initialDelaySeconds
.
For example, if
initialDelaySeconds
is set to 20 ...
This talks about initialDelaySeconds > periodSeconds
. It is not an example of the
sentence above.
Please clear your mind first and then try articulate what you are trying to clarify here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry that was a typo, I stick to the discussions above, and have modified the text.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright. The revised text makes sense now.
The next question then is what are the value of adding this example.
The existing text already indicated that the delay threshold is ignored when the period is longer than delay, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The intention of the PR was to remove the incorrect explanation "If the value of periodSeconds
is greater than initialDelaySeconds
then the initialDelaySeconds
will be ignored", and then advised to precisely describe the actual system behavior, but it doesn't seems easy to come up with a good explanation. If no one knows how to explain it in a better way, should we just remove the wrong explanation, like the first version of the PR does: 78c4a52
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When periodSeconds>initialDelaySeconds, the initialDelaySeconds is ignored. Isn't that what you are trying to clarify here? The existing text is clear on that, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The point of the PR is that's wrong. I thought this has been clarified in #48536 (comment) and the issue #48519?
e4e4597
to
d875e2e
Compare
Trying to rephrase the problem: I intend to fix the explanation that when Thanks for the discussions, and sorry for bringing confusion, but I intend to avoid future misunderstanding. Thanks @tengqm @stmcginnis @tnqn @Dyanngg |
liveness or readiness probes are effective. If a startup probe is defined, liveness and | ||
readiness probe delays do not begin until the startup probe has succeeded. If the value of | ||
`periodSeconds` is greater than `initialDelaySeconds` then the `initialDelaySeconds` will | ||
be included in the first period interval. Defaults to 0 seconds. Minimum value is 0. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the value of periodSeconds
is greater than initialDelaySeconds
then the initialDelaySeconds
will be ignored. The delayed probes will start after the end
of the first periodSeconds
. However, when initialDelaySeconds
is omitted
(defaulted to 0), the liveness, readiness probes are not delayed and they will start
immediately after the container has started.
Is this what you were trying to clarify?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the value of periodSeconds is greater than initialDelaySeconds then the initialDelaySeconds will be ignored.
I think we are on the same page in terms of the actual behavior here but I would not say it will be "ignored". My understanding is that if 0 < initialDelaySeconds < periodSeconds
, then the "initial" probe immediately after container start will be skipped due to initialDelaySeconds
. It is not "ignored"; it has a clear effect compared to the field not being set / default to 0. I think what the author was trying to express was, as long as 0 < initialDelaySeconds < periodSeconds
, it does not matter what exact value you specify for initialDelaySeconds
, the first probe will always happen at the end of first periodSeconds
. However it is quite different from "it is ignored"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I intend to change the wording of "are initiated" and "will be ignored", because they are misleading and do not match the actual behavior, especially for the case initialDelaySeconds=0
.
The issue is: based on the Doc, I tried to remove initialDelaySeconds
for value less than periodSeconds
, because Doc says it will be ignored anyway. Then the probe happened immediately, not after periodSeconds
, which is not expected from the Doc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@qiyueyao I take it as, for people writing pod specs and wonder if they can/should set initialDelaySeconds
to be a value less than periodSeconds
, we don't want them to read the doc as is currently and think they can just remove the initialDelaySeconds
(which will be ignored anyways). As a fact, setting it to a non-zero value will cause the "0th" probe to delay for periodSeconds
Description
Remove the incorrect/vague explanation of
initialDelaySeconds
withperiodSeconds
relation in configure probes. It misleads understanding ofinitialDelaySeconds
andperiodSeconds
behavior.Page: Configure Liveness, Readiness, Startup Probes.
Issue
Closes: #48519