File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed
src/main/java/oracle/kubernetes/operator/helpers Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -67,11 +67,15 @@ public NextAction apply(Packet packet) {
67
67
"# Kubernetes periodically calls this liveness probe script to determine whether\n " +
68
68
"# the pod should be restarted. The script checks a WebLogic Server state file which\n " +
69
69
"# is updated by the node manager.\n " +
70
- "STATEFILE=/shared/domain/$1/servers/$2/data/nodemanager/$2.state\n " +
70
+ "DOMAIN_NAME=$1\n " +
71
+ "SERVER_NAME=$2\n " +
72
+ "STATEFILE=/shared/domain/${DOMAIN_NAME}/servers/${SERVER_NAME}/data/nodemanager/${SERVER_NAME}.state\n " +
71
73
"if [ `jps -l | grep -c \" weblogic.NodeManager\" ` -eq 0 ]; then\n " +
74
+ " echo \" Error: WebLogic NodeManager process not found.\" \n " +
72
75
" exit 1\n " +
73
76
"fi\n " +
74
77
"if [ -f ${STATEFILE} ] && [ `grep -c \" FAILED_NOT_RESTARTABLE\" ${STATEFILE}` -eq 1 ]; then\n " +
78
+ " echo \" Error: WebLogic Server FAILED_NOT_RESTARTABLE.\" \n " +
75
79
" exit 1\n " +
76
80
"fi\n " +
77
81
"exit 0" );
@@ -83,9 +87,12 @@ public NextAction apply(Packet packet) {
83
87
"# the pod should be included in load balancing. The script checks a WebLogic Server state\n " +
84
88
"# file which is updated by the node manager.\n " +
85
89
"\n " +
86
- "STATEFILE=/shared/domain/$1/servers/$2/data/nodemanager/$2.state\n " +
90
+ "DOMAIN_NAME=$1\n " +
91
+ "SERVER_NAME=$2\n " +
92
+ "STATEFILE=/shared/domain/${DOMAIN_NAME}/servers/${SERVER_NAME}/data/nodemanager/${SERVER_NAME}.state\n " +
87
93
"\n " +
88
94
"if [ `jps -l | grep -c \" weblogic.NodeManager\" ` -eq 0 ]; then\n " +
95
+ " echo \" Error: WebLogic NodeManager process not found.\" \n " +
89
96
" exit 1\n " +
90
97
"fi\n " +
91
98
"\n " +
Original file line number Diff line number Diff line change @@ -166,9 +166,9 @@ public NextAction apply(Packet packet) {
166
166
readinessAction .addCommandItem (weblogicDomainName );
167
167
readinessAction .addCommandItem (spec .getAsName ());
168
168
readinessProbe .exec (readinessAction );
169
- readinessProbe .setInitialDelaySeconds (2 );
169
+ readinessProbe .setInitialDelaySeconds (5 );
170
170
readinessProbe .setTimeoutSeconds (5 );
171
- readinessProbe .setPeriodSeconds (10 );
171
+ readinessProbe .setPeriodSeconds (5 );
172
172
readinessProbe .setFailureThreshold (1 );
173
173
container .readinessProbe (readinessProbe );
174
174
@@ -180,7 +180,7 @@ public NextAction apply(Packet packet) {
180
180
livenessProbe .exec (livenessAction );
181
181
livenessProbe .setInitialDelaySeconds (10 );
182
182
livenessProbe .setTimeoutSeconds (5 );
183
- livenessProbe .setPeriodSeconds (10 );
183
+ livenessProbe .setPeriodSeconds (5 );
184
184
livenessProbe .setFailureThreshold (1 );
185
185
container .livenessProbe (livenessProbe );
186
186
You can’t perform that action at this time.
0 commit comments