-
Notifications
You must be signed in to change notification settings - Fork 218
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
Conversation
…sary changes from PodWatcher
@@ -185,6 +185,8 @@ WLSKO-0223=When fluentdSpecification is specified in the domain spec, a secret c | |||
must be specified in {0} | |||
WKSKO-0224=Fluentd configmap created. | |||
WKSKO-0225=Fluentd configmap replaced. | |||
WLSKO-0226=Pod {0} was evicted due to {1}; validating domain | |||
WLSKO-0227=Pod {0} was evicted due to {1} but the operator is configured to not restart it. |
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
@@ -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) { |
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's the difference between PodHelper.isEvicted() vs podAlreadyEvicted ? When will podAlreadyEvicted be true?
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.
PodHelper.isEvicted(pod) is true if the new pod from the PodWatch event is evicted.
podAlreadyEvicted is true if the original pod from getSko(serverName).getPod() was already evicted.
should the variable be renamed to avoid confusion? podPreviouslyEvicted?
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, the variable naming is confusing. Thanks.
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.
renamed to podPreviouslyEvicted. Thanks
Kudos, SonarCloud Quality Gate passed! |
* restart evicted server pods
* restart evicted server pods
resolves #2794
jenkins https://build.weblogick8s.org:8443/job/weblogic-kubernetes-operator-kind-new/10119/