Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,6 @@
**/ItIntrospectVersion,
**/ItLiftAndShiftFromOnPremDomain,
**/ItLivenessProbeCustomization,
**/ItManageNameSpace,
**/ItManagedCoherence,
**/ItMiiDynamicUpdate*,
**/ItMiiCustomSslStore,
Expand All @@ -476,8 +475,7 @@
**/ItSystemResOverrides,
**/ItMonitoringExporterWebApp,
**/ItMonitoringExporterSideCar,
**/ItMonitoringExporterSamples,
**/ItUsabilityOperatorHelmChart
**/ItMonitoringExporterSamples
</includes-failsafe>
</properties>
</profile>
Expand Down Expand Up @@ -520,7 +518,6 @@
**/ItIntrospectVersion,
**/ItLiftAndShiftFromOnPremDomain,
**/ItLivenessProbeCustomization,
**/ItManageNameSpace,
**/ItManagedCoherence,
**/ItMiiDynamicUpdate*,
**/ItMiiCustomSslStore,
Expand All @@ -539,8 +536,7 @@
**/ItSystemResOverrides,
**/ItMonitoringExporterWebApp,
**/ItMonitoringExporterSideCar,
**/ItMonitoringExporterSamples,
**/ItUsabilityOperatorHelmChart
**/ItMonitoringExporterSamples
</includes-failsafe>
</properties>
</profile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,8 @@ private void verifyIntrospectorRuns() {

//create a standard WebLogic domain.
private void createDomain() {

String uniquePath = "/shared/" + domainNamespace + "/domains";

// create WebLogic domain credential secret
createSecretWithUsernamePassword(wlSecretName, domainNamespace,
Expand All @@ -840,7 +842,7 @@ private void createDomain() {
-> File.createTempFile("domain", ".properties"),
"Failed to create domain properties file");
Properties p = new Properties();
p.setProperty("domain_path", "/shared/domains");
p.setProperty("domain_path", uniquePath);
p.setProperty("domain_name", domainUid);
p.setProperty("cluster_name", clusterName);
p.setProperty("admin_server_name", adminServerName);
Expand All @@ -852,7 +854,7 @@ private void createDomain() {
p.setProperty("admin_t3_channel_port", Integer.toString(t3ChannelPort));
p.setProperty("number_of_ms", "2");
p.setProperty("managed_server_name_base", managedServerNameBase);
p.setProperty("domain_logs", "/shared/logs");
p.setProperty("domain_logs", uniquePath + "/logs");
p.setProperty("production_mode_enabled", "true");
assertDoesNotThrow(()
-> p.store(new FileOutputStream(domainPropertiesFile), "domain properties file"),
Expand All @@ -878,7 +880,7 @@ private void createDomain() {
.overrideDistributionStrategy("DYNAMIC")
.introspectorJobActiveDeadlineSeconds(300L))
.domainUid(domainUid)
.domainHome("/shared/domains/" + domainUid) // point to domain home in pv
.domainHome(uniquePath + "/" + domainUid) // point to domain home in pv
.domainHomeSourceType("PersistentVolume") // set the domain home source type as pv
.image(WEBLOGIC_IMAGE_TO_USE_IN_SPEC)
.imagePullPolicy("IfNotPresent")
Expand All @@ -890,7 +892,7 @@ private void createDomain() {
.namespace(domainNamespace))
.includeServerOutInPodLog(true)
.logHomeEnabled(Boolean.TRUE)
.logHome("/shared/logs/" + domainUid)
.logHome(uniquePath + "/logs/" + domainUid)
.dataHome("")
.serverStartPolicy("IF_NEEDED")
.serverPod(new ServerPod() //serverpod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class ItFmwDomainInPVUsingWDT {
private static final String RCUSCHEMAUSERNAME = "myrcuuser";
private static final String RCUSCHEMAPASSWORD = "Oradoc_db1";

private static final String DOMAINHOMEPREFIX = "/shared/domains/";
private static final String DOMAINHOMEPREFIX = "/shared/" + domainNamespace + "/domains/";

private static String dbUrl = null;
private static LoggingFacade logger = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,11 @@ void testFmwDomainInPvUsingWlst() {
java_home = getImageEnvVar(FMWINFRA_IMAGE_TO_USE_IN_SPEC, "JAVA_HOME");
logger.info("JAVA_HOME in image {0} is: {1}", FMWINFRA_IMAGE_TO_USE_IN_SPEC, java_home);

String uniquePath = "/shared/" + jrfDomainNamespace + "/domains/";
Properties p = new Properties();
p.setProperty("oracleHome", oracle_home); //default $ORACLE_HOME
p.setProperty("javaHome", java_home); //default $JAVA_HOME
p.setProperty("domainParentDir", "/shared/domains/");
p.setProperty("domainParentDir", uniquePath);
p.setProperty("domainName", domainUid);
p.setProperty("domainUser", ADMIN_USERNAME_DEFAULT);
p.setProperty("domainPassword", ADMIN_PASSWORD_DEFAULT);
Expand Down Expand Up @@ -237,7 +238,7 @@ void testFmwDomainInPvUsingWlst() {
.namespace(jrfDomainNamespace))
.spec(new DomainSpec()
.domainUid(domainUid)
.domainHome("/shared/domains/" + domainUid) // point to domain home in pv
.domainHome(uniquePath + domainUid) // point to domain home in pv
.domainHomeSourceType("PersistentVolume") // set the domain home source type as pv
.image(FMWINFRA_IMAGE_TO_USE_IN_SPEC)
.imagePullPolicy("IfNotPresent")
Expand All @@ -249,7 +250,7 @@ void testFmwDomainInPvUsingWlst() {
.namespace(jrfDomainNamespace))
.includeServerOutInPodLog(true)
.logHomeEnabled(Boolean.TRUE)
.logHome("/shared/logs/" + domainUid)
.logHome(uniquePath + "logs/" + domainUid)
.dataHome("")
.serverStartPolicy("IF_NEEDED")
.serverPod(new ServerPod() //serverpod
Expand Down Expand Up @@ -350,5 +351,4 @@ private void createDomainOnPVUsingWlst(Path wlstScriptFile, Path domainPropertie

}

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -969,6 +969,7 @@ void testIntrospectDomainScript() {
}

private static void createDomain() {
String uniquePath = "/shared/" + introDomainNamespace + "/domains";

// create WebLogic domain credential secret
createSecretWithUsernamePassword(wlSecretName, introDomainNamespace,
Expand All @@ -981,7 +982,7 @@ private static void createDomain() {
File.createTempFile("domain", "properties"),
"Failed to create domain properties file");
Properties p = new Properties();
p.setProperty("domain_path", "/shared/domains");
p.setProperty("domain_path", uniquePath);
p.setProperty("domain_name", domainUid);
p.setProperty("cluster_name", cluster1Name);
p.setProperty("admin_server_name", adminServerName);
Expand All @@ -993,7 +994,7 @@ private static void createDomain() {
p.setProperty("admin_t3_channel_port", Integer.toString(t3ChannelPort));
p.setProperty("number_of_ms", "2"); // maximum number of servers in cluster
p.setProperty("managed_server_name_base", cluster1ManagedServerNameBase);
p.setProperty("domain_logs", "/shared/logs");
p.setProperty("domain_logs", uniquePath + "/logs");
p.setProperty("production_mode_enabled", "true");
assertDoesNotThrow(() ->
p.store(new FileOutputStream(domainPropertiesFile), "domain properties file"),
Expand All @@ -1016,7 +1017,7 @@ private static void createDomain() {
.namespace(introDomainNamespace))
.spec(new DomainSpec()
.domainUid(domainUid)
.domainHome("/shared/domains/" + domainUid) // point to domain home in pv
.domainHome(uniquePath + "/" + domainUid) // point to domain home in pv
.domainHomeSourceType("PersistentVolume") // set the domain home source type as pv
.image(WEBLOGIC_IMAGE_TO_USE_IN_SPEC)
.imagePullPolicy("IfNotPresent")
Expand All @@ -1025,7 +1026,7 @@ private static void createDomain() {
.namespace(introDomainNamespace))
.includeServerOutInPodLog(true)
.logHomeEnabled(Boolean.TRUE)
.logHome("/shared/logs/" + domainUid)
.logHome(uniquePath + "/logs/" + domainUid)
.dataHome("")
.serverStartPolicy("IF_NEEDED")
.serverPod(new ServerPod() //serverpod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ void testLogHomeChangeEvents() {
Map<String, OffsetDateTime> podsWithTimeStamps = getPodsWithTimeStamps(domainNamespace3,
adminServerPodName, managedServerPodNamePrefix, replicaCount);

String newLogHome = "/shared/" + domainNamespace3 + "/domains/logHome";
String newLogHome = "/shared/" + domainNamespace3 + "/domains/logHome/" + domainUid;
//print out the original image name
String logHome = domain1.getSpec().getLogHome();
logger.info("Changing the current log home used by the domain : {0} to {1}", logHome, newLogHome);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,8 @@ private void verifyIntrospectorRuns() {
}

//create a standard WebLogic domain.
private void createDomain() {
private void createDomain() {
String uniquePath = "/shared/" + domainNamespace + "/domains";

// create WebLogic domain credential secret
createSecretWithUsernamePassword(wlSecretName, domainNamespace,
Expand All @@ -322,7 +323,7 @@ private void createDomain() {
-> File.createTempFile("domain", ".properties"),
"Failed to create domain properties file");
Properties p = new Properties();
p.setProperty("domain_path", "/shared/domains");
p.setProperty("domain_path", uniquePath);
p.setProperty("domain_name", domainUid);
p.setProperty("cluster_name", clusterName);
p.setProperty("admin_server_name", adminServerName);
Expand All @@ -334,7 +335,7 @@ private void createDomain() {
p.setProperty("admin_t3_channel_port", Integer.toString(t3ChannelPort));
p.setProperty("number_of_ms", "2");
p.setProperty("managed_server_name_base", managedServerNameBase);
p.setProperty("domain_logs", "/shared/logs");
p.setProperty("domain_logs", uniquePath + "/logs");
p.setProperty("production_mode_enabled", "true");
assertDoesNotThrow(()
-> p.store(new FileOutputStream(domainPropertiesFile), "domain properties file"),
Expand All @@ -359,7 +360,7 @@ private void createDomain() {
.configuration(new Configuration()
.overrideDistributionStrategy("DYNAMIC"))
.domainUid(domainUid)
.domainHome("/shared/domains/" + domainUid) // point to domain home in pv
.domainHome(uniquePath + "/" + domainUid) // point to domain home in pv
.domainHomeSourceType("PersistentVolume") // set the domain home source type as pv
.image(WEBLOGIC_IMAGE_TO_USE_IN_SPEC)
.imagePullPolicy("IfNotPresent")
Expand All @@ -371,7 +372,7 @@ private void createDomain() {
.namespace(domainNamespace))
.includeServerOutInPodLog(true)
.logHomeEnabled(Boolean.TRUE)
.logHome("/shared/logs/" + domainUid)
.logHome(uniquePath + "/logs/" + domainUid)
.dataHome("")
.serverStartPolicy("IF_NEEDED")
.serverPod(new ServerPod() //serverpod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import static oracle.weblogic.kubernetes.actions.ActionConstants.WORK_DIR;
import static oracle.weblogic.kubernetes.actions.impl.primitive.Installer.defaultInstallRemoteconsoleParams;
import static oracle.weblogic.kubernetes.utils.ApplicationUtils.callWebAppAndWaitTillReady;
import static oracle.weblogic.kubernetes.utils.CommonTestUtils.testUntil;
import static oracle.weblogic.kubernetes.utils.ExecCommand.exec;
import static oracle.weblogic.kubernetes.utils.FileUtils.copyFileFromPod;
import static oracle.weblogic.kubernetes.utils.ThreadSafeLogger.getLogger;
Expand Down Expand Up @@ -103,7 +104,11 @@ private static boolean accessRemoteconsole() {
+ " --write-out %{http_code} -o /dev/null";
logger.info("Executing curl command {0}", curlCmd);

return callWebAppAndWaitTillReady(curlCmd, 10);
testUntil((() -> {
return callWebAppAndWaitTillReady(curlCmd, 1);
}), logger, "Waiting for remote console access to return 200 status code");

return true;

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,7 @@ public static Domain createDomainResourceWithLogHome(
securityList.add(dbSecretName);
}

String uniquePath = "/shared/" + domNamespace + "/" + domainResourceName;
DomainSpec domainSpec = new DomainSpec()
.domainUid(domainResourceName)
.domainHomeSourceType("FromModel")
Expand All @@ -545,7 +546,7 @@ public static Domain createDomainResourceWithLogHome(
.namespace(domNamespace))
.includeServerOutInPodLog(true)
.logHomeEnabled(Boolean.TRUE)
.logHome("/shared/logs")
.logHome(uniquePath + "/logs")
.serverStartPolicy("IF_NEEDED")
.serverPod(new ServerPod()
.addEnvItem(new V1EnvVar()
Expand Down Expand Up @@ -582,7 +583,7 @@ public static Domain createDomainResourceWithLogHome(
.introspectorJobActiveDeadlineSeconds(300L));

if (setDataHome) {
domainSpec.dataHome("/shared/data");
domainSpec.dataHome(uniquePath + "/data");
}
// create the domain CR
Domain domain = new Domain()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,8 @@ public static Domain createDomainResourceForDomainOnPV(String domainUid,
String pvcName,
String clusterName,
int replicaCount) {

String uniquePath = "/u01/shared/" + domainNamespace + "/domains/" + domainUid;
// create the domain custom resource
getLogger().info("Creating domain custom resource");
Domain domain = new Domain()
Expand All @@ -356,7 +358,7 @@ public static Domain createDomainResourceForDomainOnPV(String domainUid,
.namespace(domainNamespace))
.spec(new DomainSpec()
.domainUid(domainUid)
.domainHome("/u01/shared/domains/" + domainUid)
.domainHome(uniquePath)
.domainHomeSourceType("PersistentVolume")
.image(WEBLOGIC_IMAGE_TO_USE_IN_SPEC)
.imagePullPolicy("IfNotPresent")
Expand All @@ -368,7 +370,7 @@ public static Domain createDomainResourceForDomainOnPV(String domainUid,
.namespace(domainNamespace))
.includeServerOutInPodLog(true)
.logHomeEnabled(Boolean.TRUE)
.logHome("/u01/shared/logs/" + domainUid)
.logHome(uniquePath + "/logs")
.dataHome("")
.serverStartPolicy("IF_NEEDED")
.serverPod(new ServerPod()
Expand Down Expand Up @@ -428,6 +430,8 @@ private static void runCreateDomainOnPVJobUsingWdt(Path domainCreationScriptFile
domainScriptFiles.add(domainCreationScriptFile);
domainScriptFiles.add(domainPropertiesFile);
domainScriptFiles.add(modelFile);

String uniquePath = "/u01/shared/" + namespace + "/domains/" + domainUid;

getLogger().info("Creating a config map to hold domain creation scripts");
String domainScriptConfigMapName = "create-domain-scripts-cm-" + testClassName.toLowerCase();
Expand Down Expand Up @@ -459,7 +463,7 @@ private static void runCreateDomainOnPVJobUsingWdt(Path domainCreationScriptFile
.value(System.getenv("http_proxy")))
.addEnvItem(new V1EnvVar()
.name("DOMAIN_HOME_DIR")
.value("/u01/shared/domains/" + domainUid))
.value(uniquePath))
.addEnvItem(new V1EnvVar()
.name("https_proxy")
.value(HTTPS_PROXY));
Expand Down