Repository navigation
Propagate termination message of a failing pod to the revision. - #2722
Conversation
knative-prow-robot
left a comment
There was a problem hiding this comment.
@markusthoemmes: 2 warnings.
Details
In response to this:
…sion.
Fixes #499
Proposed Changes
- Start a user-container with the termination message policy "TerminationMessageFallbackToLogsOnError".
- Propagate the termination message and reason to the revision if pods fail to come up.
Todo
- Unit tests
- Conformance test
Release Note
The reason and message for crashing pods are now propagated to the revision to ease debuggability.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
|
|
||
| const ( | ||
| userContainerName = "user-container" | ||
| UserContainerName = "user-container" |
There was a problem hiding this comment.
Golint comments: exported const UserContainerName should have comment (or a comment on this block) or be unexported. More info.
| revCondSet.Manage(rs).MarkTrue(RevisionConditionContainerHealthy) | ||
| } | ||
|
|
||
| func (rs *RevisionStatus) MarkContainerExiting(exitCode int32, message string) { |
There was a problem hiding this comment.
Golint comments: exported method RevisionStatus.MarkContainerExiting should have comment or be unexported. More info.
|
@mattmoor could you give this a quick glance on whether the approach is suitable? I tried to guard the API call as good as possible. I wouldn't want the controller to have an informer for pods as that could have very high churn, so the |
6bfa535 to
2419316
Compare
|
@markusthoemmes What does the Service report for your example? Generally I don't have anything against the approach (still drinking my coffee). The main thing I'd like to make sure is that this can be covered by a reliable conformance test. We should also make sure that this is covered in errors.md |
|
@mattmoor it's already covered in errors.md (which was my inspiration to actually attack it). Conformance test is on the way of being implemented. The revision in my example reports: |
|
/test pull-knative-serving-unit-tests The usual GlobalRouteSync flake. |
f785e59 to
055a047
Compare
|
/test pull-knative-serving-integration-tests |
|
Non-evicted pods twice in a row. Wondering if it's related 🤔 /test pull-knative-serving-integration-tests |
|
@mattmoor all your comments have been addressed. I'll need to figure out why the autoscaling test seems keeps failing with non-evicted pods though 🤔 /test pull-knative-serving-integration-tests |
|
Trying again to see if Prow was just acting up yesterday: /test pull-knative-serving-integration-tests |
|
GlobalSync flake... /test pull-knative-serving-unit-tests |
|
@mattmoor this is finally done from my end. I had to adjust the Autoscale test to only look for non-evicted pods of its own deployment, because the conformance tests kept the list of pods at non-zero causing that test to timeout. That race might've been surfaced by the move of the error-condition tests to conformance. |
| WantUpdates: []clientgotesting.UpdateActionImpl{{ | ||
| Object: rev("foo", "pod-error", | ||
| WithK8sServiceName, WithLogURL, AllUnknownConditions, MarkActive, | ||
| MarkContainerExiting(5, "I failed man!")), |
There was a problem hiding this comment.
I was absolutely amazed that the test-framework already accounted for being able to list fake things with a client etc. Great stuff 😁
|
Oh great, it never failed in that test before... /hold |
|
This was not the case. |
df12425 to
ea26fd6
Compare
|
@mattmoor I think I discovered and fixed the race. It was due to the lack of a readiness probe. The container was intermittently "Ready", thus an endpoint was marked available and thus the Revision was considered ready for a brief amount of time. Plumbing in a readinessProbe should fix that condition. /hold cancel |
|
The following is the coverage report on pkg/.
|
|
Intermittent unit test failure. Surely unrelated. Logged an issue #2774. /test pull-knative-serving-unit-tests |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: markusthoemmes, mattmoor The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/test pull-knative-serving-upgrade-tests |
Fixes #499
Fixes #2010
Proposed Changes
Release Note