-
Notifications
You must be signed in to change notification settings - Fork 211
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
Owls85582 take all ALWAYS servers before considering rest of the servers when meet cluster replicas requirement #2020
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
599e5b5
add all Always servers before consider IfNeeded servers
doxiao 83fc388
add unit test cases for NEVER policy
doxiao 7bb9ae3
clean up unit tests
doxiao b7251b9
minor changes to the unit tests
doxiao 3bea312
resort the final server startup list
doxiao bf4a4d9
Merge remote-tracking branch 'origin/develop' into owls85582-always-r…
doxiao 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 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 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 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 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.
Would this approach affect the guaranteed 'lexi numeric' order in which we start or shutdown servers? Or which servers are reported in status? (For example, when we're shutting down a cluster's servers one-at-a-time, the goal is to shutdown only the 'highest' server first, then the second highest, and so on.)
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.
The approach considers this. The pending list is in the original order. We have unit test cases covering this too.
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.
But the final list does not maintain the original order. For example, if server3 is always and replicas count is 2, server1 and server3 will be started, and server3 will be started before server1.
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.
In the sample example, if cluster later scales down, server1 will be taken down, which is the correct.
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.
The only behavior difference is the startup order among servers that need to be started up in the same round of make right check; servers with ALWAYS policy will be started before the servers with If-needed policy.
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.
We want the overall startup and shutdown order to be very intuitive, predictable, and the exact reverse of each-other.
Question 1: I think it'd be better if server1 always first in a cluster, then server2, and so on, if they aren't configured to start concurrently -- regardless of whether any of the servers are marked 'always'. So, based on your analysis of the cluster use case ^^^ where server3 (marked always) starts before server1 (marked if_needed), it sounds like this pull may need to be refined?
Question 2: As for shutdown, if replica count is 3, and server1 & 3 are 'if needed' while server2 is always, then reducing replica count to 1 (or 0) should always shutdown server3 first and then shutdown server1 second. (Side note: when setting the entire cluster to NEVER the entire cluster is expected to shutdown concurrently, so no worries there.) Based on your analysis, it sounds like this will be honored?
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 understand why you started the ALWAYS servers first, but I agree that it's more important that servers be started (and stopped) in a predictable and consistent order. We've had a few customers ask about startup ordering, so I could see us doing something like that in a future release. I think that means we need to keep the order very, very simple now so that customers would understand what they are configuring 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.
"Yes" to both questions. Good catch on sequential startup order. I agree we need to resort the final list.
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.
Kicked off a new Jenkins job (passed) https://build.weblogick8s.org:8443/job/weblogic-kubernetes-operator-kind-new/2893/.