Skip to content

Commit 86da5c2

Browse files
committed
remove failBootOnSituationalError from DomainSpec. Doc fixes
1 parent fc41185 commit 86da5c2

File tree

9 files changed

+8
-69
lines changed

9 files changed

+8
-69
lines changed

docs-source/content/userguide/managing-domains/configoverrides/_index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -338,10 +338,10 @@ spec:
338338
339339
Incorrectly formatted override files may be accepted without warnings or errors and will not prevent WebLogic pods from booting. So, it is important to make sure that the template files are correct in a QA environment, otherwise your WebLogic Servers may start even though critically required overrides are failing to take effect.
340340
341-
On WebLogic Servers that support the `weblogic.SituationalConfig.failBootOnError` system property ( Note: It is not supported in WebLogic Server 12.2.1.3.0 ),
342-
by default the WebLogic server will fail to boot if any situational configuration files are invalid.
343-
By setting the `failBootOnSituationalError` attribute in the Domain spec to `false`, you can start up the WebLogic Servers even with
344-
incorrectly formatted override files.
341+
On WebLogic Servers that support the `weblogic.SituationalConfig.failBootOnError` system property ( Note: It is not supported in WebLogic Server 12.2.1.3.0 ),
342+
by default the WebLogic server will fail to boot if any situational configuration files are invalid,
343+
if it encounters an error while loading situational configuration files.
344+
By setting the `FAIL_BOOT_ON_SITUATIONAL_CONFIG_ERROR` environment variable in the Kubernetes containers for the WebLogic Servers to `false`, you can start up the WebLogic Servers even with incorrectly formatted override files.
345345
346346
* Make sure you've followed each step in the [Step-by-step guide](#step-by-step-guide).
347347

docs/domains/Domain.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,10 +270,6 @@
270270
"description": "The in-pod name of the directory in which to store the domain, node manager, server logs, and server *.out files",
271271
"type": "string"
272272
},
273-
"failBootOnSituationalError": {
274-
"description": "In WebLogic Server versions that support this feature (greater than 12.2.1.3.0): \u003cli\u003eIf true (the default) the WebLogic Server would fail to boot if it encounters an error while loading situational configuration files during server startup, or if any situational configuration file has an invalid format, \u003c/li\u003e \u003cli\u003eIf false, and if there are errors in the situational configuration files, then WebLogic Server would start but some configuration overrides may be skipped.\u003c/li\u003e",
275-
"type": "boolean"
276-
},
277273
"includeServerOutInPodLog": {
278274
"description": "If true (the default), the server .out file will be included in the pod\u0027s stdout.",
279275
"type": "boolean"

docs/domains/Domain.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ DomainSpec is a description of a domain.
2323
| `domainHome` | string | The folder for the WebLogic Domain. Not required. Defaults to /shared/domains/domains/domainUID if domainHomeInImage is false Defaults to /u01/oracle/user_projects/domains/ if domainHomeInImage is true |
2424
| `domainHomeInImage` | Boolean | True if this domain's home is defined in the docker image for the domain. Defaults to true. |
2525
| `domainUID` | string | Domain unique identifier. Must be unique across the Kubernetes cluster. Not required. Defaults to the value of metadata.name |
26-
| `failBootOnSituationalError` | Boolean | In WebLogic Server versions that support this feature (greater than 12.2.1.3.0): <li>If true (the default) the WebLogic Server would fail to boot if it encounters an error while loading situational configuration files during server startup, or if any situational configuration file has an invalid format, </li> <li>If false, and if there are errors in the situational configuration files, then WebLogic Server would start but some configuration overrides may be skipped.</li> |
2726
| `image` | string | The WebLogic Docker image; required when domainHomeInImage is true; otherwise, defaults to container-registry.oracle.com/middleware/weblogic:12.2.1.3. |
2827
| `imagePullPolicy` | string | The image pull policy for the WebLogic Docker image. Legal values are Always, Never and IfNotPresent. Defaults to Always if image ends in :latest, IfNotPresent otherwise. |
2928
| `imagePullSecrets` | array of [Local Object Reference](k8s1.13.5.md#local-object-reference) | A list of image pull secrets for the WebLogic Docker image. |

docs/domains/index.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1190,10 +1190,6 @@
11901190
"description": "The in-pod name of the directory in which to store the domain, node manager, server logs, and server *.out files",
11911191
"type": "string"
11921192
},
1193-
"failBootOnSituationalError": {
1194-
"description": "In WebLogic Server versions that support this feature (greater than 12.2.1.3.0): \u003cli\u003eIf true (the default) the WebLogic Server would fail to boot if it encounters an error while loading situational configuration files during server startup, or if any situational configuration file has an invalid format, \u003c/li\u003e \u003cli\u003eIf false, and if there are errors in the situational configuration files, then WebLogic Server would start but some configuration overrides may be skipped.\u003c/li\u003e",
1195-
"type": "boolean"
1196-
},
11971193
"includeServerOutInPodLog": {
11981194
"description": "If true (the default), the server .out file will be included in the pod\u0027s stdout.",
11991195
"type": "boolean"

model/src/main/java/oracle/kubernetes/weblogic/domain/model/Domain.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -345,10 +345,6 @@ public boolean isIncludeServerOutInPodLog() {
345345
return spec.getIncludeServerOutInPodLog();
346346
}
347347

348-
public boolean isFailBootOnSituationalError() {
349-
return spec.getFailBootOnSituationalError();
350-
}
351-
352348
public boolean isDomainHomeInImage() {
353349
return spec.isDomainHomeInImage();
354350
}

model/src/main/java/oracle/kubernetes/weblogic/domain/model/DomainSpec.java

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -99,23 +99,6 @@ public class DomainSpec extends BaseConfiguration {
9999
@Description("If true (the default), the server .out file will be included in the pod's stdout.")
100100
private Boolean includeServerOutInPodLog;
101101

102-
/**
103-
* Whether to fail to WebLogic server boot if any situational configuration error occurs during
104-
* server startup. Default is true.
105-
*
106-
* @since 2.3.0
107-
*/
108-
@Description(
109-
"In WebLogic Server versions that support this feature (greater than 12.2.1.3.0): "
110-
+ " <li>If true (the default) the WebLogic Server would fail to boot"
111-
+ " if it encounters an error while loading situational configuration files"
112-
+ " during server startup, or if any situational configuration file has an invalid format,"
113-
+ " </li>"
114-
+ " <li>If false, and if there are errors in the situational configuration "
115-
+ "files, then WebLogic Server would start but some configuration overrides may"
116-
+ " be skipped.</li>")
117-
private Boolean failBootOnSituationalError;
118-
119102
/**
120103
* The WebLogic Docker image.
121104
*
@@ -429,21 +412,6 @@ public DomainSpec withIncludeServerOutInPodLog(boolean includeServerOutInPodLog)
429412
return this;
430413
}
431414

432-
/**
433-
* @return whether to fail WebLogic server boot if any error occurs when applying situational
434-
* configuration files during server startup.
435-
* @since 2.3.0
436-
*/
437-
boolean getFailBootOnSituationalError() {
438-
return Optional.ofNullable(failBootOnSituationalError)
439-
.orElse(KubernetesConstants.DEFAULT_FAIL_BOOT_ON_SITUATIONAL_ERROR);
440-
}
441-
442-
public DomainSpec withFailBootOnSituationalError(boolean failBootOnSituationalError) {
443-
this.failBootOnSituationalError = failBootOnSituationalError;
444-
return this;
445-
}
446-
447415
/**
448416
* Returns true if this domain's home is defined in the default docker image for the domain.
449417
*
@@ -551,7 +519,6 @@ public String toString() {
551519
.append("logHome", logHome)
552520
.append("logHomeEnabled", logHomeEnabled)
553521
.append("includeServerOutInPodLog", includeServerOutInPodLog)
554-
.append("failBootOnSituationalError", failBootOnSituationalError)
555522
.append("configOverrides", configOverrides)
556523
.append("configOverrideSecrets", configOverrideSecrets);
557524

operator/src/main/java/oracle/kubernetes/operator/helpers/PodStepContext.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -207,10 +207,6 @@ private String getIncludeServerOutInPodLog() {
207207
return Boolean.toString(getDomain().isIncludeServerOutInPodLog());
208208
}
209209

210-
private boolean getFailBootOnSituationalError() {
211-
return getDomain().isFailBootOnSituationalError();
212-
}
213-
214210
private List<V1ContainerPort> getContainerPorts() {
215211
if (scan != null) {
216212
List<V1ContainerPort> ports = new ArrayList<>();
@@ -818,9 +814,6 @@ void overrideContainerWeblogicEnvVars(List<V1EnvVar> vars) {
818814
addEnvVar(
819815
vars, "SERVICE_NAME", LegalNames.toServerServiceName(getDomainUID(), getServerName()));
820816
addEnvVar(vars, "AS_SERVICE_NAME", LegalNames.toServerServiceName(getDomainUID(), getAsName()));
821-
if (!getFailBootOnSituationalError()) {
822-
addEnvVar(vars, "FAIL_BOOT_ON_SITUATIONAL_ERROR", "false");
823-
}
824817
if (mockWLS()) {
825818
addEnvVar(vars, "MOCK_WLS", "true");
826819
}

operator/src/main/resources/scripts/startNodeManager.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
# Default:
2828
# Use LOG_HOME. If LOG_HOME not set, use NODEMGR_HOME.
2929
# ADMIN_PORT_SECURE = "true" if the admin protocol is secure. Default is false
30-
# FAIL_BOOT_ON_SITUATIONAL_ERROR = "true" if WebLogic server should fail to
30+
# FAIL_BOOT_ON_SITUATIONAL_CONFIG_ERROR = "true" if WebLogic server should fail to
3131
# boot if situational configuration related errors are
3232
# found. Default to "true" if unspecified.
3333
#
@@ -116,14 +116,14 @@ export NODEMGR_HOME=${NODEMGR_HOME}/${DOMAIN_UID}/${SERVER_NAME}
116116
createFolder ${NODEMGR_HOME}
117117

118118
NODEMGR_LOG_HOME=${NODEMGR_LOG_HOME:-${LOG_HOME:-${NODEMGR_HOME}/${DOMAIN_UID}}}
119-
FAIL_BOOT_ON_SITUATIONAL_ERROR=${FAIL_BOOT_ON_SITUATIONAL_ERROR:-true}
119+
FAIL_BOOT_ON_SITUATIONAL_CONFIG_ERROR=${FAIL_BOOT_ON_SITUATIONAL_CONFIG_ERROR:-true}
120120

121121
trace "Info: NODEMGR_HOME='${NODEMGR_HOME}'"
122122
trace "Info: LOG_HOME='${LOG_HOME}'"
123123
trace "Info: SERVER_NAME='${SERVER_NAME}'"
124124
trace "Info: DOMAIN_UID='${DOMAIN_UID}'"
125125
trace "Info: NODEMGR_LOG_HOME='${NODEMGR_LOG_HOME}'"
126-
trace "Info: FAIL_BOOT_ON_SITUATIONAL_ERROR='${FAIL_BOOT_ON_SITUATIONAL_ERROR}'"
126+
trace "Info: FAIL_BOOT_ON_SITUATIONAL_CONFIG_ERROR='${FAIL_BOOT_ON_SITUATIONAL_CONFIG_ERROR}'"
127127

128128
createFolder ${NODEMGR_LOG_HOME}
129129

@@ -244,7 +244,7 @@ RestartInterval=3600
244244
NumberOfFilesLimited=true
245245
FileTimeSpan=24
246246
NMHostName=${SERVICE_NAME}
247-
Arguments=${USER_MEM_ARGS} -XX\\:+UnlockExperimentalVMOptions -XX\\:+UseCGroupMemoryLimitForHeap -Dweblogic.SituationalConfig.failBootOnError=${FAIL_BOOT_ON_SITUATIONAL_ERROR} ${serverOutOption} ${JAVA_OPTIONS}
247+
Arguments=${USER_MEM_ARGS} -XX\\:+UnlockExperimentalVMOptions -XX\\:+UseCGroupMemoryLimitForHeap -Dweblogic.SituationalConfig.failBootOnError=${FAIL_BOOT_ON_SITUATIONAL_CONFIG_ERROR} ${serverOutOption} ${JAVA_OPTIONS}
248248
249249
EOF
250250

operator/src/test/java/oracle/kubernetes/operator/helpers/PodHelperTestBase.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -473,14 +473,6 @@ public void whenPodCreated_withoutLogHomeSpecified_hasDefaultLogHomeEnvVariable(
473473
getCreatedPodSpecContainer().getEnv(), allOf(hasEnvVar("LOG_HOME", LOG_HOME + "/" + UID)));
474474
}
475475

476-
@Test
477-
public void whenPodCreated_withFalseFailBootOnSituationalError_hasEnvVariable() {
478-
domainPresenceInfo.getDomain().getSpec().withFailBootOnSituationalError(false);
479-
assertThat(
480-
getCreatedPodSpecContainer().getEnv(),
481-
allOf(hasEnvVar("FAIL_BOOT_ON_SITUATIONAL_ERROR", "false")));
482-
}
483-
484476
static Matcher<Iterable<? super V1EnvVar>> hasEnvVar(String name, String value) {
485477
return hasItem(new V1EnvVar().name(name).value(value));
486478
}

0 commit comments

Comments
 (0)