-
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
OWLS-88569 add events for rolling restart #2364
Changes from 9 commits
ad87657
fac122f
2cd5bda
d144b55
cea3930
9cdff47
5582024
e0c12e9
63f17c9
c8938b7
f2dde5d
060a120
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,9 +27,12 @@ The operator generates these event types in a domain namespace, which indicate t | |
* `DomainDeleted`: An existing domain has been deleted. | ||
* `DomainProcessingStarting`: The operator has started to process a new domain or to update an existing domain. This event may be a result of a `DomainCreate`, `DomainChanged`, or `DomainDeleted` event, or a result of a retry after a failed attempt. | ||
* `DomainProcessingFailed`: The operator has encountered a problem while it was processing the domain resource. The failure either could be a configuration error or a Kubernetes API error. | ||
* `DomainProcessingRetrying`: The operator is going to retry the processing of a domain after it encountered an failure. | ||
* `DomainProcessingRetrying`: The operator is going to retry the processing of a domain after it encountered a failure. | ||
* `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. | ||
tbarnes-us marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* `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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the current pod is not conformed -> the current pod does not conform |
||
* `DomainValidationError`: A validation error or warning is found in a domain resource. Please refer to the event message for details. | ||
* `NamespaceWatchingStarted`: The operator has started watching for domains in a namespace. | ||
* `NamespaceWatchingStopped`: The operator has stopped watching for domains in a namespace. Note that the creation of this event in a domain namespace is the operator's best effort only; the event will not be generated if the required Kubernetes privilege is removed when a namespace is no longer managed by the operator. | ||
|
@@ -85,7 +88,7 @@ $ kubectl get events -n [namespace] --selector=weblogic.createdByOperator=true | |
To get all the events that are generated by the operator for a particular domain resource, for example `sample-domain1`, run: | ||
|
||
```shell | ||
$ kubectl get events -n [namespace] --selector=weblogic.domainUID=sample-domain1,weblogic.createdByOperator=true --sort-by=lastTimestamp | ||
$ kubectl get events -n [namespace] --selector=weblogic.domainUID=sample-domain1&&weblogic.createdByOperator=true --sort-by=lastTimestamp | ||
tbarnes-us marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` | ||
|
||
#### Examples of generated events | ||
|
@@ -285,3 +288,100 @@ Source: | |
Type: Normal | ||
Events: <none> | ||
``` | ||
|
||
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'. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. output of command -> output of the command |
||
|
||
``` | ||
LAST SEEN TYPE REASON OBJECT MESSAGE | ||
2m58s Normal DomainChanged domain/sample-domain1 Domain resource sample-domain1 was changed | ||
2m58s Normal DomainProcessingStarting domain/sample-domain1 Creating or updating Kubernetes presence for WebLogic Domain with UID sample-domain1 | ||
2m58s Normal DomainRollStarting domain/sample-domain1 Rolling restart WebLogic server pods in domain sample-domain1 because: 'image' changed from 'oracle/weblogic' to 'oracle/weblogic:14.1.1.0', | ||
'logHome' changed from 'null' to '/shared/logs/sample-domain1' | ||
2m58s Normal PodCycleStarting domain/sample-domain1 Replacing pod sample-domain1-adminserver because: In container 'weblogic-server': | ||
'image' changed from 'oracle/weblogic' to 'oracle/weblogic:14.1.1.0', | ||
env 'LOG_HOME' changed from 'null' to '/shared/logs/sample-domain1' | ||
tbarnes-us marked this conversation as resolved.
Show resolved
Hide resolved
|
||
2m7s Normal PodCycleStarting domain/sample-domain1 Replacing pod sample-domain1-managed-server1 because: In container 'weblogic-server': | ||
'image' changed from 'oracle/weblogic' to 'oracle/weblogic:14.1.1.0', | ||
env 'LOG_HOME' changed from 'null' to '/shared/logs/sample-domain1' | ||
71s Normal PodCycleStarting domain/sample-domain1 Replacing pod sample-domain1-managed-server2 because: In container 'weblogic-server': | ||
'image' changed from 'oracle/weblogic' to 'oracle/weblogic:14.1.1.0', | ||
env 'LOG_HOME' changed from 'null' to '/shared/logs/sample-domain1' | ||
19s Normal DomainRollCompleted domain/sample-domain1 Rolling restart of domain sample-domain1 completed | ||
19s Normal DomainProcessingCompleted domain/sample-domain1 Successfully completed processing domain resource sample-domain1 | ||
|
||
``` | ||
|
||
Example of a `DomainRollStarting` event: | ||
|
||
``` | ||
Name: sample-domain1.DomainRollStarting.7d33e9b787e9c318 | ||
Namespace: sample-domain1-ns | ||
Labels: weblogic.createdByOperator=true | ||
weblogic.domainUID=sample-domain1 | ||
Annotations: <none> | ||
API Version: v1 | ||
Count: 1 | ||
Event Time: <nil> | ||
First Timestamp: 2021-05-18T02:00:24Z | ||
Involved Object: | ||
API Version: weblogic.oracle/v8 | ||
Kind: Domain | ||
Name: sample-domain1 | ||
Namespace: sample-domain1-ns | ||
UID: 5df7dcda-d606-4509-9a06-32f25e16e166 | ||
Kind: Event | ||
Last Timestamp: 2021-05-18T02:00:24Z | ||
Message: Rolling restart WebLogic server pods in domain sample-domain1 because: 'image' changed from 'oracle/weblogic' to 'oracle/weblogic:14.1.1.0', | ||
'logHome' changed from 'null' to '/shared/logs/sample-domain1' | ||
Metadata: | ||
Creation Timestamp: 2021-05-18T02:00:24Z | ||
Resource Version: 12842363 | ||
Self Link: /api/v1/namespaces/sample-domain1-ns/events/sample-domain1.DomainRollStarting.7d33e9b787e9c318 | ||
UID: 6ec92655-9d06-43b1-8b26-c01ebccadecf | ||
Reason: DomainRollStarting | ||
Reporting Component: weblogic.operator | ||
Reporting Instance: weblogic-operator-fc4ccc8b5-rh4v6 | ||
Source: | ||
Type: Normal | ||
Events: <none> | ||
|
||
``` | ||
|
||
Example of a `PodCycleStarting` event: | ||
|
||
``` | ||
Name: sample-domain1.PodCycleStarting.7d34bc3232231f49 | ||
Namespace: sample-domain1-ns | ||
Labels: weblogic.createdByOperator=true | ||
weblogic.domainUID=sample-domain1 | ||
Annotations: <none> | ||
API Version: v1 | ||
Count: 1 | ||
Event Time: <nil> | ||
First Timestamp: 2021-05-18T02:01:18Z | ||
Involved Object: | ||
API Version: weblogic.oracle/v8 | ||
Kind: Domain | ||
Name: sample-domain1 | ||
Namespace: sample-domain1-ns | ||
UID: 5df7dcda-d606-4509-9a06-32f25e16e166 | ||
Kind: Event | ||
Last Timestamp: 2021-05-18T02:01:18Z | ||
Message: Replacing pod sample-domain1-managed-server1 because: In container 'weblogic-server': | ||
'image' changed from 'oracle/weblogic' to 'oracle/weblogic:14.1.1.0', | ||
env 'LOG_HOME' changed from 'null' to '/shared/logs/sample-domain1' | ||
Metadata: | ||
Creation Timestamp: 2021-05-18T02:01:18Z | ||
Resource Version: 12842530 | ||
Self Link: /api/v1/namespaces/sample-domain1-ns/events/sample-domain1.PodCycleStarting.7d34bc3232231f49 | ||
UID: 4c6a203e-9b93-4b46-b9e3-1a448b52c7ca | ||
Reason: PodCycleStarting | ||
Reporting Component: weblogic.operator | ||
Reporting Instance: weblogic-operator-fc4ccc8b5-rh4v6 | ||
Source: | ||
Type: Normal | ||
Events: <none> | ||
|
||
``` |
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 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