Skip to content

Conversation

@jshum2479
Copy link
Member

This restore the return code of restart required if wlst isRestartRequired returns true during update operation.

ARG_VALIDATION_ERROR_EXIT_CODE = 98
PROG_RESTART_REQUIRED = 103
PROG_ROLLBACK_IF_RESTART_EXIT_CODE = 3
PROG_ROLLBACK_IF_RESTART_EXIT_CODE = 104
Copy link
Member

Choose a reason for hiding this comment

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

Needs a message in shared.sh, shared.cmd in checkExitCode for this exit code

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

ARG_VALIDATION_ERROR_EXIT_CODE = 98
PROG_RESTART_REQUIRED = 103
PROG_ROLLBACK_IF_RESTART_EXIT_CODE = 3
PROG_ROLLBACK_IF_RESTART_EXIT_CODE = 104
Copy link
Contributor

Choose a reason for hiding this comment

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

Just read the update document trying to find the command line argument to rollback. That argument isn't documented and also there are bad RCs in the documentation that need to be removed. 104 needs to be added.

 101 - The domain needs to be restarted and the Update Domain Tool needs to be re-invoked with the same arguments. 102 - The servers impacted by the update operation need to be restarted, in a rolling fashion, starting with the Administration Server, if applicable. 103 - The entire domain needs to be restarted. 
Copy link
Member Author

Choose a reason for hiding this comment

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

Added

Copy link
Contributor

@CarolynRountree CarolynRountree left a comment

Choose a reason for hiding this comment

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

I created a simple JRF domain. Then ran update with a value that requires restart. I got a failure with the update that edit was in progress, even though I just created the domain in the previous step.

SEVERE Messages: 1. WLSDPLY-09015: updateDomain deployment failed: Domain has outstanding edit session weblogic, deploy cannot proceed and will exit Total: WARNING : 0 SEVERE : 1 updateDomain.cmd failed (exit code = 2) 

I tried it again with a brand new domain as I had been using the same name for several tests the last few days. This time I got

Problem invoking WLST - Traceback (innermost last): File "C:\Users\crountre\temp\weblogic-deploy\lib\python\update.py", line 328, in ? File "C:\Users\crountre\temp\weblogic-deploy\lib\python\update.py", line 313, in main File "C:\Users\crountre\temp\weblogic-deploy\lib\python\update.py", line 106, in __update File "C:\Users\crountre\temp\weblogic-deploy\lib\python\update.py", line 149, in __update_online File "C:\Users\crountre\temp\weblogic-deploy\lib\python\update.py", line 180, in __check_update_require_domain_restart File "C:\Users\crountre\temp\weblogic-deploy\lib\python\wlsdeploy\tool\util\wlst_helper.py", line 231, in cancel_edit File "<iostream>", line 591, in cancelEdit File "<iostream>", line 553, in raiseWLSTException WLSTException: Error occurred while performing cancelEdit : Cannot call Edit functions when you are not in the Edit tree. updateDomain.cmd completed but with some issues (exit code = 1) 
@jshum2479
Copy link
Member Author

Hmm, what's your test case looks like? and any logs?

@CarolynRountree
Copy link
Contributor

CarolynRountree commented Apr 27, 2020

updateDomain.log.txt
clusterslimits.yml.txt

  1. created a domain with clusterslimit.yml and clusters.properties with following command line:
weblogic-deploy\bin\createDomain.cmd -oracle_home c:\oracle\fmw12213 -domain_home c:\oracle\fmw12213\user_projects\domains\rollback_domain -model_file .\clusterslimits.yml -variable_file .\clusters.properties -domain_type JRF -run_rcu -rcu_prefix CERJRF -rcu_db localhost:32769/ORCLPDB1.localdomain 
  1. Started admin server
  2. Ran update domain with clustersupdate.yml and this command line
weblogic-deploy\bin\updateDomain.cmd -oracle_home c:\oracle\fmw12213 -domain_home c:\oracle\fmw12213\user_projects\domains\rollback_domain -model_file .\clustersupdate.yml -domain_type JRF -rollback_if_require_restart -admin_url t3://localhost:7001 -admin_user weblogic 

clustersupdate.yml.txt

createDomain.log.txt

site/update.md Outdated
When running the tool in WLST online mode, the update operation may require server restarts or a domain restart to pick up the changes. The update operation can also encounter situations where it cannot complete its operation until the domain is restarted. To communicate these conditions to scripts that may be calling the Update Domain Tool, the shell scripts have three special, non-zero exit codes to communicate these states:

- `101` - The domain needs to be restarted and the Update Domain Tool needs to be re-invoked with the same arguments.
- `102` - The servers impacted by the update operation need to be restarted, in a rolling fashion, starting with the Administration Server, if applicable.
Copy link
Contributor

Choose a reason for hiding this comment

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

the rollback command arg is not documented. And the 101, 102 are not valid are they?

Copy link
Member Author

Choose a reason for hiding this comment

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

The rollback command arg is for future operator use only originally, let me add the doc in it. I didn't change 101 and 102, no idea where they come from

site/deploy.md Outdated

When running the tool in WLST online mode, the deploy operation may require server restarts or a domain restart to pick up the changes. The deploy operation can also encounter situations where it cannot complete its operation until the domain is restarted. To communicate these conditions to scripts that may be calling the Deploy Applications Tool, the shell scripts have three special, non-zero exit codes to communicate these states:

- `101` - The domain needs to be restarted and the Deploy Applications Tool needs to be re-invoked with the same arguments.
Copy link
Contributor

Choose a reason for hiding this comment

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

101 and 102 are not valid are they? the rollback command line arg is not documented.

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't see anywhere returning 101, 102 from the source. I am removing them now.

@jshum2479
Copy link
Member Author

Added online system test also

@ddsharpe ddsharpe merged commit 97d8ff1 into master Apr 30, 2020
@ddsharpe ddsharpe deleted the WDT-412 branch April 30, 2020 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants