Skip to content

Owls 103828 - Fix for the Cluster and Domain 'Available' conditions for admin only domains and intentionally shutdown clusters #3602

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 9 commits into from
Nov 1, 2022

Conversation

ankedia
Copy link
Member

@ankedia ankedia commented Nov 1, 2022

Owls 103828 - Fix for the Cluster and Domain 'Available' Conditions for admin only domains and intentionally shutdown clusters. In addition, it contains fix for Completed:false for domain with NEVER policy. This PR includes changes from the PR # 3597 (OWLS-103825 branch).

  • Set Cluster 'Available' Condition to false if no servers expected to run.
  • Set Domain 'Available' Condition to true if only admin server is running and cluster(s) and managed servers are intentionally shutdown.
  • Set Domain Completed Condition to true if domain start policy is NEVER.

Integration test run - https://build.weblogick8s.org:8443/job/weblogic-kubernetes-operator-kind-new/13685/console

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Nov 1, 2022
@alai8
Copy link
Member

alai8 commented Nov 1, 2022

@ankedia @lennyphan Does this PR include all the changes from PR 3597 for OWLS-103825? Do we still need PR 3597?

@lennyphan
Copy link
Member

@ankedia @lennyphan Does this PR include all the changes from PR 3597 for OWLS-103825? Do we still need PR 3597?

This PR includes the changes from PR 3597. We made a conflicting change so decided it was best to resolve both JIRA's in one PR, if possible.

@tbarnes-us
Copy link

tbarnes-us commented Nov 1, 2022

Please also update the doc to something similar to what we discussed in the Slack...

#### `Available` {id="cluster-available"}
- The `status` attribute is set to `True` when a sufficient number of WebLogic Server pods are
  ready in the cluster. Both of the following must be true:
  - At least one pod in the cluster is expected to run and is `ready`.
  - The number of `not ready` server pods which are expected to run
    is less than or equal to `cluster.spec.maxUnavailable` which defaults to `1`.
- Examples:
  - If a cluster has `serverStartPolicy` `Never` or `replicas` `0`,
    or a cluster is in a domain with `serverStartPolicy` `AdminOnly` or `Never`,
    then the cluster will have `Available` `False`.
  - If a cluster and domain both have a `serverStartPolicy` of `IfNeeded`,
    and `cluster.spec.replicas` is `1`,
    then the cluster `Available` will be `True` only when its single pod is `ready`. 
  - If a cluster and domain both have a `serverStartPolicy` of `IfNeeded`,
    `cluster.spec.replicas` is `4`,
    and `cluster.spec.maxUnavailable` is `1` (the default),
    then the cluster `Available` will be `True` only when three are four of its pods are `ready`. 
- **Note**: The `Available` `status` can be `True` even when the `status` for the `Completed`
  condition is `False`, a `Failed` condition is reported on the Domain resource, or the cluster
  has up to `cluster.spec.maxUnavailable` pods that are not ready. 

@tbarnes-us
Copy link

The doc update LGTM.

Copy link
Member

@alai8 alai8 left a comment

Choose a reason for hiding this comment

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

LGTM. Please update PR comment with Never serverStartPolicy related changes. Also, please ask Rosemary to review the doc change. Thanks.

Updated. @rosemarymarano - please review the doc changes.

@alai8 alai8 requested review from rosemarymarano and removed request for rosemarymarano November 1, 2022 21:37
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 1, 2022

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

93.1% 93.1% Coverage
0.0% 0.0% Duplication

@rjeberhard rjeberhard merged commit 83846b3 into main Nov 1, 2022
Copy link
Member

@rosemarymarano rosemarymarano left a comment

Choose a reason for hiding this comment

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

review edits and suggestions

- The `status` attribute is set to `True` when a sufficient number of WebLogic Server pods are
ready in the cluster. Both of the following must be true:
- At least one pod in the cluster is expected to run and is `ready`.
- The number of `not ready` server pods which are expected to run
Copy link
Member

Choose a reason for hiding this comment

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

pods which are expected to run -> pods, which are expected to run, (two commas needed)

ready in the cluster. Both of the following must be true:
- At least one pod in the cluster is expected to run and is `ready`.
- The number of `not ready` server pods which are expected to run
is less than or equal to `cluster.spec.maxUnavailable` which defaults to `1`.
Copy link
Member

@rosemarymarano rosemarymarano Nov 2, 2022

Choose a reason for hiding this comment

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

is less than or equal to cluster.spec.maxUnavailable, which defaults to 1. -> (at a minimum, you need a comma before the word "which')
If you want to make it more explicit, then consider this wording -> is less than or equal to the value of cluster.spec.maxUnavailable, which defaults to 1.

- Examples:
- If a cluster has `serverStartPolicy` `Never` or `replicas` `0`,
or a cluster is in a domain with `serverStartPolicy` `AdminOnly` or `Never`,
then the cluster will have `Available` `False`.
Copy link
Member

Choose a reason for hiding this comment

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

Re-write (I can hardly understand the meaning of this sentence, but here's a stab at it): If a cluster has a serverStartPolicy of Never, (comma) or replicas is 0, or a cluster is in a domain with a serverStartPolicy of AdminOnly or Never, (comma) then the cluster will be Available, False.

@rjeberhard rjeberhard deleted the owls_103828 branch February 18, 2023 14:30
rjeberhard pushed a commit to rjeberhard/weblogic-kubernetes-operator that referenced this pull request Apr 14, 2023
…or admin only domains and intentionally shutdown clusters (oracle#3602)

* Fix for the Cluster and Domain 'Available' conditions for admin only domains and intentionally shutdown clusters

Co-authored-by: Lenny Phan <lenny.phan@oracle.com>
robertpatrick pushed a commit that referenced this pull request Apr 26, 2023
…or admin only domains and intentionally shutdown clusters (#3602)

* Fix for the Cluster and Domain 'Available' conditions for admin only domains and intentionally shutdown clusters

Co-authored-by: Lenny Phan <lenny.phan@oracle.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants