-
Notifications
You must be signed in to change notification settings - Fork 216
OWLS-96896 - Restart Evicted Pods #2979
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
Changes from 13 commits
f73e6dc
57f507b
fe7aed5
5387cf3
9722d24
e525c9e
93fa8e7
09b2510
af5e400
aef4f0b
109df81
6a851c8
7cae250
1711276
ea95a75
196bb63
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -91,6 +91,7 @@ | |
| import static oracle.kubernetes.operator.helpers.PodHelper.getPodDomainUid; | ||
| import static oracle.kubernetes.operator.helpers.PodHelper.getPodName; | ||
| import static oracle.kubernetes.operator.helpers.PodHelper.getPodNamespace; | ||
| import static oracle.kubernetes.operator.helpers.PodHelper.getPodStatusMessage; | ||
| import static oracle.kubernetes.operator.logging.ThreadLoggingContext.setThreadContext; | ||
|
|
||
| public class DomainProcessorImpl implements DomainProcessor { | ||
|
|
@@ -405,7 +406,15 @@ private void processServerPodWatch(V1Pod pod, String watchType) { | |
| info.setServerPodBeingDeleted(serverName, Boolean.FALSE); | ||
| // fall through | ||
| case MODIFIED: | ||
| info.setServerPodFromEvent(serverName, pod); | ||
| boolean podAlreadyEvicted = info.setServerPodFromEvent(serverName, pod, PodHelper::isEvicted); | ||
| if (PodHelper.isEvicted(pod) && !podAlreadyEvicted) { | ||
|
||
| if (PodHelper.shouldRestartEvictedPod(pod)) { | ||
| LOGGER.info(MessageKeys.POD_EVICTED, getPodName(pod), getPodStatusMessage(pod)); | ||
| createMakeRightOperation(info).interrupt().withExplicitRecheck().execute(); | ||
| } else { | ||
| LOGGER.info(MessageKeys.POD_EVICTED_NO_RESTART, getPodName(pod), getPodStatusMessage(pod)); | ||
| } | ||
| } | ||
| break; | ||
| case DELETED: | ||
| boolean removed = info.deleteServerPodFromEvent(serverName, pod); | ||
|
|
||
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.
to not -> not to
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.
fixed. thanks