Skip to content

Commit 2cacdfc

Browse files
committed
Merge remote-tracking branch 'origin/develop' into cluster-template
2 parents 80f6f34 + 40e7489 commit 2cacdfc

File tree

13 files changed

+180
-218
lines changed

13 files changed

+180
-218
lines changed

docs-source/content/quickstart/get-images.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ and accept the license agreement for the [WebLogic Server image](https://hub.doc
1919
1. Pull the operator image:
2020

2121
```bash
22-
$ docker pull oracle/weblogic-kubernetes-operator:2.2.0
22+
$ docker pull oracle/weblogic-kubernetes-operator:2.2.1
2323
```
2424

2525
1. Pull the Traefik load balancer image:

docs-source/content/quickstart/install.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ $ helm install stable/traefik \
5757
$ helm install kubernetes/charts/weblogic-operator \
5858
--name sample-weblogic-operator \
5959
--namespace sample-weblogic-operator-ns \
60-
--set image=oracle/weblogic-kubernetes-operator:2.2.0 \
60+
--set image=oracle/weblogic-kubernetes-operator:2.2.1 \
6161
--set serviceAccount=sample-weblogic-operator-sa \
6262
--set "domainNamespaces={}" \
6363
--wait

docs-source/content/userguide/introduction/architecture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The operator is packaged in a [Docker image](https://hub.docker.com/r/oracle/web
1818

1919
```
2020
$ docker login
21-
$ docker pull oracle/weblogic-kubernetes-operator:2.2.0
21+
$ docker pull oracle/weblogic-kubernetes-operator:2.2.1
2222
```
2323

2424
For more details on acquiring the operator image and prerequisites for installing the operator, consult the [Quick Start guide]({{< relref "/quickstart/_index.md" >}}).

docs-source/content/userguide/managing-domains/domain-lifecycle/restarting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ d. Update the `image` property of the domain resource specifying the new image n
161161
```
162162
domain:
163163
spec:
164-
image: oracle/weblogic-updated:2.2
164+
image: oracle/weblogic-updated:2.2.1
165165
```
166166
e. The operator will now initiate a rolling restart, which will apply the updated image, for all the server pods in the domain.
167167

docs-source/content/userguide/managing-operators/using-the-operator/using-helm.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ javaLoggingLevel: "FINE"
101101

102102
Specifies the Docker image containing the operator code.
103103

104-
Defaults to `weblogic-kubernetes-operator:2.2.0`.
104+
Defaults to `weblogic-kubernetes-operator:2.2.1`.
105105

106106
Example:
107107
```
@@ -119,7 +119,7 @@ image: "Always"
119119
```
120120

121121
##### `imagePullSecrets`
122-
Contains an optional list of Kubernetes secrets, in the operator's namepace, that are needed to access the registry containing the operator Docker image. You are responsible for creating the secret. If no secrets are required, then omit this property.
122+
Contains an optional list of Kubernetes secrets, in the operator's namespace, that are needed to access the registry containing the operator Docker image. You are responsible for creating the secret. If no secrets are required, then omit this property.
123123

124124
Example:
125125
```

integration-tests/USECASES.MD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Basic Use Cases described above are verified in all the domain configurations. A
4343
| Domain | Use Case |
4444
| --- | --- |
4545
| Domain on PV using WDT | WLDF scaling |
46-
| Domain with ADMIN_ONLY | making sure only admin server is started and managed servers are not started. Shutdown domain by deleting domain CRD. Create domain on existing PV dir, pv is already populated by a shutdown domain. |
46+
| Domain with ADMIN_ONLY | making sure only admin server is started and managed servers are not started. Make some changes in domain configuration by changing admin server tuning backlog configuration and restart domain. Shutdown domain by deleting domain CRD. Create domain on existing PV dir, pv is already populated by a shutdown domain. |
4747
| Domain with situational config | create domain with listen address not set for admin server and t3 channel/NAP and incorrect file for admin server log location. Introspector should override these with sit-config automatically. Also, with some junk value for t3 channel public address and using custom situational config override replace with valid public address using secret. Also, on Jenkins this domain uses NFS instead of HOSTPATH PV storage |
4848
| Two domains managed by two operators | verify scaling and restart of one domain doesn't impact another domain. Delete domain resources using delete script from samples. |
4949
| Domain with Recycle policy | create domain with pvReclaimPolicy="Recycle" and using Configured cluster. Verify that the PV is deleted once the domain and PVC are deleted |

integration-tests/src/test/java/oracle/kubernetes/operator/ItElasticLogging.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,10 @@ public void testWeblogicLogSearch() throws Exception {
234234
String managedServerNameBase = domainMap.get("managedServerNameBase").toString();
235235
String managedServerPodName = domainUid + "-" + managedServerNameBase + "1";
236236

237+
// Wait 30 seconds for WLS log to be pushed to ELK Stack
238+
logger.info("Wait 30 seconds for WLS log to be pushed to ELK Stack");
239+
Thread.sleep(30 * 1000);
240+
237241
// Verify that log hits for admin server are not empty
238242
String regex = ".*took\":(\\d+),.*hits\":\\{(.+)\\}";
239243
String queryCriteria = "/_search?q=log:" + adminServerPodName + " | grep RUNNING";

integration-tests/src/test/java/oracle/kubernetes/operator/ItOperator.java

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,9 @@ public void testTwoDomainsManagedByTwoOperators() throws Exception {
235235

236236
/**
237237
* Create operator if its not running and create domain with serverStartPolicy="ADMIN_ONLY".
238-
* Verify only admin server is created. shutdown by deleting domain CRD. Create domain on existing
239-
* PV dir, pv is already populated by a shutdown domain.
238+
* Verify only admin server is created. Make domain configuration change and restart the domain.
239+
* shutdown by deleting domain CRD. Create domain on existing PV dir, pv is already populated by a
240+
* shutdown domain.
240241
*
241242
* @throws Exception exception
242243
*/
@@ -255,6 +256,10 @@ public void testCreateDomainWithStartPolicyAdminOnly() throws Exception {
255256
try {
256257
domain = TestUtils.createDomain(DOMAIN_ADMINONLY_YAML);
257258
domain.verifyDomainCreated();
259+
// change domain config by modifying accept backlog on adminserver tuning
260+
modifyDomainConfig(domain);
261+
domain.shutdownUsingServerStartPolicy();
262+
domain.restartUsingServerStartPolicy();
258263
} finally {
259264
if (domain != null) {
260265
// create domain on existing dir
@@ -516,4 +521,28 @@ private Domain testAdvancedUseCasesForADomain(Operator operator, Domain domain)
516521
}
517522
return domain;
518523
}
524+
525+
private void modifyDomainConfig(Domain domain) throws Exception {
526+
String adminPod = domain.getDomainUid() + "-" + domain.getAdminServerName();
527+
String scriptsLocInPod = "/u01/oracle";
528+
TestUtils.copyFileViaCat(
529+
BaseTest.getProjectRoot() + "/integration-tests/src/test/resources/modifyAcceptBacklog.py",
530+
scriptsLocInPod + "/modifyAcceptBacklog.py",
531+
adminPod,
532+
domain.getDomainNs());
533+
534+
TestUtils.copyFileViaCat(
535+
BaseTest.getProjectRoot() + "/integration-tests/src/test/resources/callpyscript.sh",
536+
scriptsLocInPod + "/callpyscript.sh",
537+
adminPod,
538+
domain.getDomainNs());
539+
String[] args = {
540+
scriptsLocInPod + "/modifyAcceptBacklog.py",
541+
BaseTest.getUsername(),
542+
BaseTest.getPassword(),
543+
"t3://" + adminPod + ":" + domain.getDomainMap().get("t3ChannelPort")
544+
};
545+
TestUtils.callShellScriptByExecToPod(
546+
adminPod, domain.getDomainNs(), scriptsLocInPod, "callpyscript.sh", args);
547+
}
519548
}

integration-tests/src/test/java/oracle/kubernetes/operator/ItSessionMigration.java

Lines changed: 6 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import java.util.regex.Pattern;
1111

1212
import oracle.kubernetes.operator.utils.Domain;
13-
import oracle.kubernetes.operator.utils.ExecCommand;
1413
import oracle.kubernetes.operator.utils.ExecResult;
1514
import oracle.kubernetes.operator.utils.Operator;
1615
import oracle.kubernetes.operator.utils.TestUtils;
@@ -31,11 +30,8 @@
3130
public class ItSessionMigration extends BaseTest {
3231
private static final String testAppName = "httpsessionreptestapp";
3332
private static final String scriptName = "buildDeployAppInPod.sh";
34-
3533
private static Map<String, String> httpAttrMap;
36-
3734
private static String httpHeaderFile;
38-
3935
private static Operator operator;
4036
private static Domain domain;
4137

@@ -71,7 +67,6 @@ public static void staticPrepare() throws Exception {
7167
}
7268

7369
httpHeaderFile = BaseTest.getResultDir() + "/headers";
74-
7570
httpAttrMap = new HashMap<String, String>();
7671
httpAttrMap.put("sessioncreatetime", "(.*)sessioncreatetime>(.*)</sessioncreatetime(.*)");
7772
httpAttrMap.put("sessionid", "(.*)sessionid>(.*)</sessionid(.*)");
@@ -134,7 +129,7 @@ public void testRepickPrimary() throws Exception {
134129
String sessCreateTime1 = getHttpResponseAttribute(result.stdout(), sessCreateTime);
135130

136131
// Stop primary server
137-
stopPrimaryServer(primaryServName1);
132+
domain.shutdownManagedServerUsingServerStartPolicy(primaryServName1);
138133

139134
// Send the second HTTP request using HTTP header/sessionID info save before
140135
result = getHttpResponse(testAppPath, " -b ");
@@ -152,6 +147,7 @@ public void testRepickPrimary() throws Exception {
152147
primaryServName1.trim().equals(primaryServName2.trim()));
153148

154149
// Restore test env
150+
domain.restartManagedServerUsingServerStartPolicy(primaryServName1);
155151
TestUtils.checkPodReady(domainUid + "-" + primaryServName1, domainNS);
156152

157153
logger.info(
@@ -190,7 +186,7 @@ public void testHttpSessionMigr() throws Exception {
190186
final String countattribute1 = getHttpResponseAttribute(result.stdout(), count);
191187

192188
// Stop primary server
193-
stopPrimaryServer(primaryServName1);
189+
domain.shutdownManagedServerUsingServerStartPolicy(primaryServName1);
194190

195191
// Send the second HTTP request using HTTP header/sessionID info save before
196192
result = getHttpResponse(webServiceGetUrl, " -b ");
@@ -210,6 +206,7 @@ public void testHttpSessionMigr() throws Exception {
210206
"HTTP session state is NOT migrated!", countattribute1.equals(countattribute2));
211207

212208
// Restore test env
209+
domain.restartManagedServerUsingServerStartPolicy(primaryServName1);
213210
TestUtils.checkPodReady(domainUid + "-" + primaryServName1, domainNS);
214211

215212
logger.info("SUCCESS - " + testMethodName + ". HTTP session state is migrated!");
@@ -227,59 +224,22 @@ private ExecResult getHttpResponse(String webServiceUrl, String headerOption) th
227224
String curlCmd = buildWebServiceUrl(webServiceUrl, headerOption + httpHeaderFile);
228225
logger.info("Send a HTTP request: " + curlCmd);
229226

230-
ExecResult result = ExecCommand.exec(curlCmd);
231-
232-
if (result.exitValue() != 0) {
233-
throw new Exception(
234-
"FAILURE: command "
235-
+ curlCmd
236-
+ " failed, returned "
237-
+ result.stderr()
238-
+ "\n "
239-
+ result.stdout());
240-
}
227+
ExecResult result = TestUtils.exec(curlCmd);
241228

242229
return result;
243230
}
244231

245-
/**
246-
* Stop the primary server.
247-
*
248-
* @param primaryServerName - weblogic primary server name
249-
* @throws Exception exception
250-
*/
251-
private void stopPrimaryServer(String primaryServerName) throws Exception {
252-
Map<String, Object> domainMap = domain.getDomainMap();
253-
String domainNS = domainMap.get("namespace").toString();
254-
String domainUid = domain.getDomainUid();
255-
256-
// stop primary server
257-
String msPodName = domainUid + "-" + primaryServerName;
258-
String cmd = "kubectl delete po/" + msPodName + " -n " + domainNS;
259-
logger.info("Stop managed server <" + msPodName + "> using command:\n" + cmd);
260-
261-
ExecResult result = ExecCommand.exec(cmd);
262-
if (result.exitValue() != 0) {
263-
throw new Exception("FAILURE: command " + cmd + " failed, returned " + result.stderr());
264-
}
265-
266-
logger.info(result.stdout());
267-
}
268-
269232
/**
270233
* Get the value of a HTTP attribute.
271234
*
272235
* @param httpResponseString - HTTP response
273-
* @param attribute - attrubute name to find in the HTTP response
236+
* @param attribute - attribute name to find in the HTTP response
274237
* @throws Exception exception
275238
*/
276239
private String getHttpResponseAttribute(String httpResponseString, String attribute)
277240
throws Exception {
278-
279241
String attrPatn = httpAttrMap.get(attribute);
280-
281242
Assume.assumeNotNull(attrPatn);
282-
283243
String httpAttribute = null;
284244

285245
Pattern pattern = Pattern.compile(attrPatn);
@@ -317,28 +277,4 @@ private String buildWebServiceUrl(String curlUrlPath, String paramToAppend) thro
317277

318278
return webServiceUrl.toString();
319279
}
320-
321-
/**
322-
* Execute a given curl command and verify the results.
323-
*
324-
* @param curlCmd - a curl command to execute
325-
* @throws Exception exception
326-
*/
327-
private ExecResult execCurlCmd(String curlCmd) throws Exception {
328-
logger.info("curl command to exec is:\n" + curlCmd);
329-
330-
ExecResult result = ExecCommand.exec(curlCmd);
331-
332-
if (result.exitValue() != 0) {
333-
throw new Exception(
334-
"FAILURE: command "
335-
+ curlCmd
336-
+ " failed, returned "
337-
+ result.stderr()
338-
+ "\n "
339-
+ result.stdout());
340-
}
341-
342-
return result;
343-
}
344280
}

0 commit comments

Comments
 (0)