Status conditions
Contents
Overview
The WebLogic Kubernetes Operator populates status conditions on Domain and Cluster resources to provide high-level status reporting. Status conditions are a Kubernetes standard mechanism and the conditions generated by the operator are similar to those that Kubernetes provides for Pod and Deployment resources.
Checking domain or cluster conditions
Conditions can be found under the status.conditions field in a Domain resource or a Cluster resource.
You can check the conditions in a Domain resource by using:
kubectl -n MY_NAMESPACE describe domain MY_DOMAIN_RESOURCE_NAME. Similarly, you can check the conditions in a Cluster resource by using:
kubectl -n MY_NAMESPACE describe cluster MY_CLUSTER_NAME.
The conditions for
Cluster resources referenced by a domain
are also listed in the domain status under domain.status.clusters.
Attributes in a condition
The following attributes can be found in a condition:
type- The type of the condition, such asFailedorAvailable. See Types of domain status conditions .status- The status of the condition, such asTrueorFalse.message- An optional, human-readable message providing more details about the condition.reason- The reason for theFailedcondition. Not applicable to other types of condition.severity- The severity for theFailedcondition. Not applicable to other types of condition.lastTransitionTime- A timestamp of when the condition was created or the last time time the condition transitioned from one status to another.
Types of domain conditions
The following is a list of condition types for a Domain resource.
Failed
- The desired state of the Domain resource cannot be achieved due to failures encountered in processing the Domain resource. For information about how to diagnose failures, see debugging .
- The
statusattribute is alwaysTruefor aFailedcondition. TheFailedcondition is removed from the domain status when the underlying failure is resolved. - The
messageattribute contains an error message with details of the failure. - The
reasonattribute is set to one of the reasons listed in domain failure reasons . - The
severityattribute is set to one of the severity levels listed in domain failure severities .
Completed
- The
statusattribute of aCompletedcondition indicates whether the desired state of the Domain resource has been fully achieved. - The
statusattribute is set toTruewhen all of the following are true:- There are no
Failedconditions, for example, no failures are detected. - One of the following conditions are met:
- All WebLogic Server pods that are expected to be running are
readyat their target image or images,restartVersion, andintrospectVersion. - No WebLogic Server pods are running and this is the expected state.
- The domain is configured to have a
spec.serverStartPolicyvalue ofAdminOnlyand the Administration Server pod is running and ready.
- All WebLogic Server pods that are expected to be running are
- There are no pending server shutdown requests.
- There are no
Available
- The
statusattribute is set toTruewhen a sufficient number of pods are ready such that all of the following are true:- At least one WebLogic Server pod is ready.
- Every non-clustered server with a
serverStartPolicyvalue ofIfNeededorAlwaysis ready. - Every Cluster resource referenced by the domain has
Truein itsAvailablecondition. Clusters that are configured with areplicasvalue of0or aserverStartPolicyvalue ofNeverare ignored.
- NOTE: The
Availablestatuscan beTrueeven when thestatusfor theCompletedcondition isFalse, aFailedcondition is reported, or a cluster has up tocluster.spec.maxUnavailablepods that are not ready.
ConfigChangesPendingRestart
- This condition tracks the progress of runtime updates to the WebLogic Deploy Tooling model of a Model in Image domain home source type.
- The
statusattribute isTrueif all of the following are true:- The Domain resource attribute
domain.spec.configuration.model.onlineUpdate.onNonDynamicChangesisCommitUpdateOnly. - The Domain resource attribute
domain.spec.configuration.model.onlineUpdate.enabledisTrue. - There were model changes and these changes modify non-dynamic WebLogic configuration.
- Processing successfully completed, including the introspector job.
- The administrator has not subsequently rolled or restarted each WebLogic Server pod (to propagate the pending non-dynamic changes).
- The Domain resource attribute
- The
ConfigChangesPendingRestartcondition is removed from the domain status when pending non-dynamic runtime updates complete their processing due to a roll or restart. - For how to see which pods are awaiting restart using WebLogic pod labels, see Online update status and labels .
Rolling
- This condition indicates that the operator is rolling the server pods in a domain, such as after it has detected an update to the Domain resource or Model in Image model that requires it to perform a rolling restart of the domain.
- The
statusattribute is alwaysTruefor aRollingcondition. - The
Rollingcondition is removed from the domain status when the rolling is completed.
Types of cluster conditions
The following is a list of condition types for a Cluster resource.
Completed
- The
statusattribute of aCompletedcondition indicates whether the desired state of the Cluster resource has been fully achieved. - The
statusattribute is set toTruewhen all of the following are true:- There are no
Faileddomain.status.conditions. - No WebLogic Server pods are expected to be running, or all server pods in the cluster that are expected to be running are ready at their target
image or images,
restartVersion, andintrospectVersion - There are no pending server shutdown requests.
- There are no
Available
- The
statusattribute is set toTruewhen 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 readyserver pods, which are expected to run, is less than or equal to the value ofcluster.spec.maxUnavailable, which defaults to1.
- At least one pod in the cluster is expected to run and is
- Examples:
- If a cluster has a
serverStartPolicyofNever, orreplicasis0, or a cluster is in a domain withserverStartPolicyofAdminOnlyorNever, then the cluster will have anAvailablecondition that isFalse. - If a cluster and domain both have a
serverStartPolicyofIfNeeded, andcluster.spec.replicasis1, then the cluster will have anAvailablecondition that isTrueonly when its single pod is ready. - If a cluster and domain both have a
serverStartPolicyofIfNeeded,cluster.spec.replicasis4, andcluster.spec.maxUnavailableis1(the default), then the cluster will have anAvailablecondition that isTrueonly when three or four of its pods are ready.
- If a cluster has a
- NOTE: The
Availablecondition’sstatuscan beTrueeven when thestatusfor theCompletedcondition isFalse, aFailedcondition is reported on the Domain resource, or the cluster has up tocluster.spec.maxUnavailablepods that are not ready.
Conditions life cycle
After the operator detects a Cluster or Domain resource, it will ensure that each resource always has
exactly one occurrence of an Available and of a Completed condition. The operator will not
subsequently remove these conditions but instead, will change their status to True or False
as appropriate. You can use this fact as a way to determine when an operator has detected a
Domain or Cluster resource.
The Failure, Rolling, and ConfigChangesPendingRestart conditions are ephemeral; they are only
added when they apply, and are removed when they no longer apply.
The Failure condition is the only condition that can have multiple occurrences. This occurs when
there are multiple concurrent failures of different types.
Conditions and generations
Use metadata.generation and status.observedGeneration in Domain and Cluster resources
to detect when their conditions and other status are up-to-date. Specifically, conditions may not
be up-to-date when domain.status.observedGeneration generation does not equal
domain.metadata.generation, or when cluster.status.observedGeneration does not equal
cluster.metadata.generation in any of the domain’s Cluster resources. This may indicate either
the operator is in the process of updating the status or the operator is not running.
Conditions and events
A corresponding event is generated when an Available, Completed, Failure, or Rolling
condition has changed. For details, see
operator-generated event types
.