-
Notifications
You must be signed in to change notification settings - Fork 217
Changes for OWLS-82011 to reflect introspector status in domain status #1832
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
824ed80
Changes for OWLS-82011 to reflect introspector status in domain status
ankedia 16da37b
change method name
ankedia aa56cae
Code refactoring
ankedia e5ead73
cleanup debug message
ankedia 53169c5
Remove unused method
ankedia da40bef
Added check to terminate fiber when intro job fails with BackoffLimit…
ankedia 3c2a486
implement review comment suggestions
ankedia e36ed1d
added unit test for introspector pod phase failed
ankedia File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
What do these statuses indicate? I'd have thought that once you selected a status, that indicated what had to be updated in the domain status - and yet this seems to do a fair bit of additional processing. Can you explain your approach?
Uh oh!
There was an error while loading. Please reload this page.
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.
Unfortunately Kubernetes seem to have different way of dealing with various failures and reason/message for failure is captured in different json stanza/object.
The UNSCHEDULABLE status indicates that pod can't be scheduled and is in pending state (for e.g. due to missing pv/c). The reason/message for this condition is captured in pod conditions which is part of pod status.
The WAITING_NON_NULL_MESSAGE indicates that pod container is stuck in waiting state (for e.g. to due to image pull error). The reason/message for this is captured in waiting state object in container statuses which is part of pod status.
The PHASE_FAILED status indicates that pod has failed due to timeout (Deadline exceeded). In this case both conditions and container statuses in pod status are null (pls see below). The pod status phase is "Failed" and reason/message is captured directly as part of pod status.
V1PodStatus:
{
conditions: null
containerStatuses: [class V1ContainerStatus {
containerID: docker://b823ffd3fe05d101b22529485ce9d946b652631487e8ce82e94f2e8ec1c2acb0
image: model-in-image-1:v1
imageID: docker://sha256:1cb49428989aec3007cd887d5b31cbf8da6fa0da30998e03d2ebec29ed4bf5ec
lastState: class V1ContainerState {
running: null
terminated: null
waiting: null
}
name: domain1-introspect-domain-job
ready: false
restartCount: 0
started: null
state: class V1ContainerState {
running: class V1ContainerStateRunning {
startedAt: 2020-07-23T23:07:08.000Z
}
terminated: null
waiting: null
}
}]
ephemeralContainerStatuses: null
hostIP: null
initContainerStatuses: null
message: Pod was active on the node longer than the specified deadline
nominatedNodeName: null
phase: Failed
podIP: 192.168.4.110
podIPs: null
qosClass: Burstable
reason: DeadlineExceeded
startTime: 2020-07-23T23:07:07.000Z
}
There are other cases where pod/container is terminated due to error and reason/message is captured in terminated state in container statuses which is part of pod status. This is indicated by TERMINATED_ERROR_REASON.
Earlier logic was updating domain status unconditionally with reason/message from waiting state of container statuses which is part of pod status after receiving pod added/modified watch event.
Additionally, there's job watcher and pod watcher and both of them update domain status. We might have to decide which one gets higher priority or if we can update domain status only in pod watcher based on additional testing and results of integration tests.
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 was hoping for a simple way to make this more readable, but I don't see one that is obvious. I may want to revisit in the future.