Skip to content

OWLS 85938 - Server lifecycle script changes to use domain.status.minimumReplicas when stopping/starting server #2042

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 2 commits into from
Nov 9, 2020

Conversation

ankedia
Copy link
Member

@ankedia ankedia commented Nov 9, 2020

OWLS 85938 - Server lifecycle script changes to use domain.status.minimumReplicas when allowReplicasBelowMinDynClusterSize is set to false. It also fixes a minor bug when setting server start policy to ALWAYS.

This change adds a check in stop script to see if replica count value is same as minimum replica count value and prevents script from incorrectly assuming that decreasing the replica count would shut down a server. Additionally, when replica count value of cluster is lower than minimum replica count, it resets the replica count value to minimum replica count value. This helps server start script to know the value of effective replica count.

# check if replica count can decrease below current value
isReplicaCountEqualToMinReplicas "${domainJson}" "${clusterName}" replicasEqualsMinReplicas
if [ "${replicasEqualsMinReplicas}" == 'true' ]; then
printInfo "Current replica count value is same as minimum number of replica count. \

Choose a reason for hiding this comment

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

Maybe provide a little more detail:

Not decreasing replica count: it is at its minimum. (See 'domain.spec.allowReplicasBelowMinDynClusterSize' and 'domain.status.clusters[].minimumReplicas' for details.)

Copy link
Member Author

Choose a reason for hiding this comment

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

Changed the message in 6dae3f1. Please let me know if more details are needed.

@ankedia ankedia closed this Nov 9, 2020
@ankedia ankedia deleted the owls-85938-min-replicas-changes branch November 9, 2020 20:39
@ankedia ankedia restored the owls-85938-min-replicas-changes branch November 9, 2020 20:39
@ankedia ankedia reopened this Nov 9, 2020
@ankedia
Copy link
Member Author

ankedia commented Nov 9, 2020

Sorry, I had accidently deleted the branch which inadvertently closed the PR.

@rjeberhard rjeberhard merged commit 42e6828 into develop Nov 9, 2020
@ankedia ankedia deleted the owls-85938-min-replicas-changes branch November 9, 2020 22:08
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.

3 participants