Skip to content

Conversation

@hzhao-github
Copy link
Contributor

@hzhao-github hzhao-github commented Apr 30, 2021

usecase:

Scale the configured/dynamic cluster using the sample script scaleCluster.sh script
Verify that server(s) in the configured/dynamic cluster are scaled up and in RUNNING state.
Verify that server(s) in the dynamic/configured cluster are not affected.
Restore the env

Jenkins job:

https://build.weblogick8s.org:8443/job/weblogic-kubernetes-operator-kind-new/4934 (parallel)

Passed Jenkins job with latest changes
https://build.weblogick8s.org:8443/job/weblogic-kubernetes-operator-kind-new/4954 (parallel)

@hzhao-github hzhao-github requested review from ankedia and anpanigr May 3, 2021 10:26
@hzhao-github hzhao-github marked this pull request as ready for review May 3, 2021 10:26

// restore test env
result = assertDoesNotThrow(() ->
executeLifecycleScript(STOP_SERVER_SCRIPT, SERVER_LIFECYCLE, configServerName),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use the same script scaleCluster.sh to scale down the cluster instead of stopServer.sh script

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea. Wii change

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed


// restore test env
logger.info("Stop managed server using the script");
executeLifecycleScript(STOP_SERVER_SCRIPT, SERVER_LIFECYCLE, dynamicServerName);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use the same script scaleCluster.sh to scale down the cluster instead of stopServer.sh script

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will do

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed

executeLifecycleScript(STATUS_CLUSTER_SCRIPT, CLUSTER_LIFECYCLE, CLUSTER_2),
String.format("Failed to run %s", STATUS_CLUSTER_SCRIPT));

String regex = ".*" + CLUSTER_2 + "(\\s+)0(\\s+)2(\\s+)2(\\s+)2(\\s+)2";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would help me to have a comment describing what this regex is intended to match.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to clarify... I'm looking for a description of the regex expression specifically. What is it intended to match? If someday this test failed and we needed to fix the regex expression I would want to know what it's supposed to match so I could figure out if it is correct.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added more clearer descriptions

Copy link
Member

@rjeberhard rjeberhard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking for more information on the regex expressions as described in the comment.

Copy link
Member

@anpanigr anpanigr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

// String regex matches below
// cluster min max goal current ready
// clusterName 1 5 1 1 1
String regex = ".*" + CLUSTER_1 + "(\\s+)1(\\s+)5(\\s+)1(\\s+)1(\\s+)1";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What call returns the formatted data given above? I can see how the regex matches this, but this seems really brittle.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see it's from clusterStatus.sh... Okay, I guess that's what we have to test.

@rjeberhard rjeberhard merged commit 527d923 into main May 7, 2021
@robertpatrick robertpatrick deleted the scale-cluster branch January 31, 2022 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants