Skip to content

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

Merged
merged 16 commits into from
Apr 21, 2022
Merged

OWLS-96896 - Restart Evicted Pods #2979

merged 16 commits into from
Apr 21, 2022

Conversation

alai8
Copy link
Member

@alai8 alai8 commented Apr 21, 2022

@alai8 alai8 requested review from russgold, jshum2479 and doxiao April 21, 2022 15:54
@@ -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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to not -> not to

Copy link
Member Author

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) {
Copy link
Member

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?

Copy link
Member Author

@alai8 alai8 Apr 21, 2022

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?

Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renamed to podPreviouslyEvicted. Thanks

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

89.1% 89.1% Coverage
0.0% 0.0% Duplication

@rjeberhard rjeberhard merged commit 2827a6e into main Apr 21, 2022
@alai8 alai8 deleted the owls-96896 branch April 22, 2022 16:43
rjeberhard pushed a commit to rjeberhard/weblogic-kubernetes-operator that referenced this pull request Apr 14, 2023
robertpatrick pushed a commit that referenced this pull request Apr 26, 2023
* restart evicted server pods
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Restart Evicted Pods
3 participants