Skip to content

Commit 01056c8

Browse files
committed
Add server restart info
1 parent e1fd7b8 commit 01056c8

File tree

1 file changed

+103
-17
lines changed

1 file changed

+103
-17
lines changed

site/server-lifecycle.md

Lines changed: 103 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,11 @@ To start, stop or restart servers, the should user modify these properties on th
1111
(e.g. using kubectl or the Kubernetes REST api). The operator will notice the changes
1212
and apply them.
1313

14-
### Starting and Stopping Servers
14+
## Starting and Stopping Servers
1515

1616
The "serverStartPolicy" property on domain resource controls which servers should be running.
1717
The operator runtime monitors this property and creates or deletes the corresponding server pods.
1818

19-
### Restarting Servers
20-
21-
The operator runtime automatically recreates (restarts) server pods when properties on the domain resource that affect server pods change (such as "image", "volumes" and "env").
22-
The "restartVersion" property on the domain resource lets the user force the operator to restart a set of server pods.
23-
24-
The operator runtime does rolling restarts of clustered servers so that service is maintained.
25-
The "maxUnavailable" property determines how many of the cluster's servers may be taken out of service at a time when doing a rolling restart.
26-
By default, the servers are restarted one at a time.
27-
28-
## Starting and Stopping Servers
29-
30-
The "serverStartPolicy" property determine which servers should be running.
31-
3219
### "serverStartPolicy" Rules
3320

3421
"serverStartPolicy" can be specified at the domain, cluster and server levels. Each level supports a different set of values:
@@ -40,21 +27,21 @@ The "serverStartPolicy" property determine which servers should be running.
4027
| Cluster | IF_NEEDED | IF_NEEDED, NEVER |
4128
| Server | IF_NEEDED | IF_NEEDED, ALWAYS, NEVER |
4229

43-
#### Admin Server Rules
30+
#### Admin Server Start/Stop Rules
4431
| Domain | Admin Server | Started / Stopped |
4532
| --- | --- | --- |
4633
| NEVER | IF_NEEDED, ALWAYS, NEVER | Stopped |
4734
| ADMIN_ONLY, IF_NEEDED | NEVER | Stopped |
4835
| ADMIN_ONLY, IF_NEEDED | IF_NEEDED, ALWAYS | Started |
4936

50-
#### Standalone Managed Server Rules
37+
#### Standalone Managed Server Start/Stop Rules
5138
| Domain | Standalone Server | Started / Stopped |
5239
| --- | --- | --- |
5340
| ADMIN_ONLY, NEVER | IF_NEEDED, ALWAYS, NEVER | Stopped |
5441
| IF_NEEDED | NEVER | Stopped |
5542
| IF_NEEDED | IF_NEEDED, ALWAYS | Started |
5643

57-
#### Clustered Managed Server Rules
44+
#### Clustered Managed Server Start/Stop Rules
5845
| Domain | Cluster | Clustered Server | Started / Stopped |
5946
| --- | --- | --- | --- |
6047
| ADMIN_ONLY, NEVER | IF_NEEDED, NEVER | IF_NEEDED, ALWAYS, NEVER | Stopped |
@@ -136,3 +123,102 @@ This is done by adding the server to the domain resource and settings its "serve
136123
```
137124

138125
Note: the server will count towards the cluster's "replicas" count. Also, if the user configures more than "replicas" servers to "ALWAYS", they will all be started, even though "replicas" will be exceeded.
126+
127+
## Restarting Servers
128+
129+
The operator runtime automatically recreates (restarts) server pods when properties on the domain resource that affect server pods change (such as "image", "volumes" and "env").
130+
The "restartVersion" property on the domain resource lets the user force the operator to restart a set of server pods.
131+
132+
The operator runtime does rolling restarts of clustered servers so that service is maintained.
133+
134+
### Properties that Cause Servers To Be Restarted
135+
The operator will restart servers when any of the follow properties on the domain resource that affect the server are changed.
136+
137+
| Property |
138+
| --- |
139+
| annotations |
140+
| containerSecurityContext |
141+
| image |
142+
| imagePullPolicy |
143+
| imagePullSecrets |
144+
| labels |
145+
| livenessProbe |
146+
| podSecurityContext |
147+
| readinessProbe |
148+
| resources |
149+
| restartLabel |
150+
| volumes |
151+
| volumeMounts |
152+
153+
### Rolling Restarts
154+
155+
Clustered servers that need to be restarted are gradually restarted (i.e. 'rolling restarts') so that the cluster is not taken out of service and so that in-flight work can be migrated to other servers in the cluster.
156+
157+
The "maxUnavailable" property on the domain resource determines how many of the cluster's servers may be taken out of service at a time when doing a rolling restart.
158+
By default, the servers are restarted one at a time.
159+
160+
### Using restartVersion to Force the Operator to Restart Servers
161+
162+
The "restartVersion" property lets users force the operator to restart servers.
163+
164+
It's basically a user-specified string that gets added to new server pods (as a label) so that the operator can tell which servers need to be restarted.
165+
If the value is different, then the server pod is old and needs to be restarted. If the value matches, then the server pod has already been restarted.
166+
167+
Each time the user wants to restart some servers, the user needs to set "restartVersion" to a different string (the particular value doesn't matter).
168+
169+
The operator will notice the new value and restart the affected servers (using the same mechanisms as when other properties that affect the server pods are changed, including doing rolling restarts of clustered servers).
170+
171+
"restartVersion" can be specified at the domain, cluster and server levels. A server will be restarted if any of these three values change.
172+
173+
### Common Scenarios
174+
175+
#### Restart All the Servers in the Domain
176+
177+
Set "restartVersion" at the domain level to a new value.
178+
179+
```
180+
domain:
181+
spec:
182+
restartVersion: "domainV1"
183+
...
184+
```
185+
186+
#### Restart All the Servers in the Cluster
187+
188+
Set "restartVersion" at the cluster level to a new value.
189+
190+
```
191+
domain:
192+
spec:
193+
clusters:
194+
- clusterName : "cluster1"
195+
restartVersion: "cluster1V1"
196+
...
197+
```
198+
199+
#### Restart the Admin Server
200+
201+
Set "restartVersion" at the adminServer level to a new value.
202+
203+
```
204+
domain:
205+
spec:
206+
adminServer:
207+
restartVersion: "adminV1"
208+
...
209+
```
210+
211+
#### Restart a Standalone or Clustered Manged Server
212+
213+
Set "restartVersion" at the managedServer level to a new value.
214+
215+
```
216+
domain:
217+
spec:
218+
managedServers:
219+
- serverName: "standalone_server1"
220+
restartVersion: "v1"
221+
- serverName: "cluster1_server1"
222+
restartVersion: "v1"
223+
...
224+
```

0 commit comments

Comments
 (0)