Skip to content

Commit 08c0ef8

Browse files
committed
OWLS-67651: Verizon POC: WLS cluster is unstable when startupControl is set to ALL
1 parent 3be08ce commit 08c0ef8

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

operator/src/main/java/oracle/kubernetes/operator/logging/MessageKeys.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ private MessageKeys() {}
123123
public static final String RESTART_SERVERS_STARTING = "WLSKO-0116";
124124
public static final String ROLLING_CLUSTERS_STARTING = "WLSKO-0117";
125125
public static final String CYCLING_SERVERS = "WLSKO-0118";
126-
public static final String ROLLING_SERVERS = "WLSKO-0118";
126+
public static final String ROLLING_SERVERS = "WLSKO-0119";
127127
public static final String REMOVING_INGRESS = "WLSKO-0120";
128128
public static final String LIST_INGRESS_FOR_DOMAIN = "WLSKO-0121";
129129
public static final String POD_DELETED = "WLSKO-0122";

operator/src/main/java/oracle/kubernetes/operator/steps/ManagedServersUpStep.java

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,13 @@ public NextAction apply(Packet packet) {
168168
String serverName = wlsServerConfig.getListenAddress();
169169
// do not start admin server
170170
if (!serverName.equals(asName) && !servers.contains(serverName)) {
171+
List<V1EnvVar> env = null;
172+
// find ClusterStartup for WlsClusterConfig
173+
ClusterStartup cs = findClusterStartup(wlsClusterConfig.getClusterName(), lcs);
174+
if (cs != null) {
175+
env = cs.getEnv();
176+
}
177+
171178
// start server
172179
servers.add(serverName);
173180
ssic.add(new ServerStartupInfo(wlsServerConfig, wlsClusterConfig, null, null));
@@ -222,6 +229,26 @@ public NextAction apply(Packet packet) {
222229
}
223230
}
224231

232+
/**
233+
* Find corresponding ClusterStartup for WLS cluster, if defined.
234+
*
235+
* @param wlsClusterName - name of WLS cluster
236+
* @param lcs - List of defined ClusterStartup's
237+
* @return - ClusterStartup, if exists, or Null
238+
*/
239+
private static ClusterStartup findClusterStartup(
240+
String wlsClusterName, List<ClusterStartup> lcs) {
241+
if (lcs != null) {
242+
for (ClusterStartup cs : lcs) {
243+
String clusterName = cs.getClusterName();
244+
if (clusterName.equals(wlsClusterName)) {
245+
return cs;
246+
}
247+
}
248+
}
249+
return null;
250+
}
251+
225252
private static List<V1EnvVar> startInAdminMode(List<V1EnvVar> env) {
226253
if (env == null) {
227254
env = new ArrayList<>();

0 commit comments

Comments
 (0)