Skip to content
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

OWLS-88569 add events for rolling restart #2364

Merged
merged 12 commits into from
May 19, 2021
Merged

Conversation

doxiao
Copy link
Member

@doxiao doxiao commented May 18, 2021

  1. Enhanced the existing compatibility check logic to support scoped compatibility checks, only checking the fields that are specific to a particular scope.
  2. Modified the format of the compatibility results to make it more consistent and clear.
  3. Added three new events for the domain rolling restart scenarios: DomainRollStarting, DomainRollCompleted, and PodCycleStarting.
  4. Added unit tests for the compatibility check infrastructure changes and the new events.
  5. Modified the operator event documentation to cover the new events.

Integration test passed in Jenkins: https://build.weblogick8s.org:8443/job/weblogic-kubernetes-operator-kind-new/5005/.

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.

Few minor edits

* `DomainProcessingCompleted`: The operator successfully completed the processing of a domain resource.
* `DomainProcessingAborted`: The operator stopped processing a domain when the operator encountered a fatal error or a failure that persisted after the specified maximum number of retries.
* `DomainRollStarting`: The operator has started a rolling restart of a domain after it detects a change or changes in the domain resource or WebLogic domain configuration, which require a restart of all running pods in the domain. The operator makes its best efforts in providing the reason of the rolling restart. If the rolling restart is caused by one or more of the following fields in the domain resource, the event message contains the fields that have changed as well as their old and new values: image, imagePullPolicy, livenessProbe, readinessProbe, domain restartVersion, domainHome, includeServerOutInPodLog, and logHome. When the rolling restart is caused by changes in the other domain resource fields (Please refer to [Fields in domain resource that cause servers to be restarted]({{< relref "/userguide/managing-domains/domain-lifecycle/startup#fields-that-cause-servers-to-be-restarted" >}})), the event message simply indicates that the domain resource has changed. If the cause of the rolling restart is in the WebLogic domain configuration, the event message indicates that as well without the details.
Copy link
Member

Choose a reason for hiding this comment

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

the reason of the rolling restart -> the reason for the rolling restartimage, imagePullPolicy, livenessProbe, readinessProbe, domain restartVersion, domainHome, includeServerOutInPodLog, and logHome -> all the field names should be in code font: image, imagePullPolicy, livenessProbe, etc.
Please refer to -> see
indicates that as well without the details -> indicates that, as well, without the details

* `DomainProcessingCompleted`: The operator successfully completed the processing of a domain resource.
* `DomainProcessingAborted`: The operator stopped processing a domain when the operator encountered a fatal error or a failure that persisted after the specified maximum number of retries.
* `DomainRollStarting`: The operator has started a rolling restart of a domain after it detects a change or changes in the domain resource or WebLogic domain configuration, which require a restart of all running pods in the domain. The operator makes its best efforts in providing the reason of the rolling restart. If the rolling restart is caused by one or more of the following fields in the domain resource, the event message contains the fields that have changed as well as their old and new values: image, imagePullPolicy, livenessProbe, readinessProbe, domain restartVersion, domainHome, includeServerOutInPodLog, and logHome. When the rolling restart is caused by changes in the other domain resource fields (Please refer to [Fields in domain resource that cause servers to be restarted]({{< relref "/userguide/managing-domains/domain-lifecycle/startup#fields-that-cause-servers-to-be-restarted" >}})), the event message simply indicates that the domain resource has changed. If the cause of the rolling restart is in the WebLogic domain configuration, the event message indicates that as well without the details.
* `DomainRollCompleted`: The operator has successfully completed a rolling restart of a domain.
* `PodCycleStarting`: The operator has started to replace a server pod after it detects that the current pod is not conformed to the current domain resource or WebLogic domain configuration.
Copy link
Member

Choose a reason for hiding this comment

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

the current pod is not conformed -> the current pod does not conform


Example of the sequence of operator generated events in a domain rolling restart after the domain resource's `image` and `logHomeEnabled` changed.

The output of command `kubectl get events -n sample-domain1-ns --selector=weblogic.domainUID=sample-domain1,weblogic.createdByOperator=true --sort-by=lastTimestamp'.
Copy link
Member

Choose a reason for hiding this comment

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

output of command -> output of the command
Instead of a period at the end of this phrase (it is not not a complete sentence), it should be a colon.

@doxiao doxiao requested a review from tbarnes-us May 18, 2021 18:32
@rjeberhard rjeberhard merged commit a1d2c80 into main May 19, 2021
@rjeberhard rjeberhard deleted the OWLS-88569-v1-scope branch January 31, 2022 14:22
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.

4 participants