biemond / biemond-orawls

Puppet 3/4 module for WebLogic provisioning module ( Linux & Solaris )
Apache License 2.0
63 stars 104 forks source link

wls_deployment, for shared library redeployment with change in versionidentifier fails with message deployed application reference it. #548

Closed vijayalp closed 5 months ago

vijayalp commented 5 years ago

wls_deployment, for shared library redeployment with change in versionidentifier fails with message deployed application reference it. Below are the details: Weblogic: weblogic1221

in puppet log, in debug, we get to see error message " Unexpected error: main.WLSTException"

2019-02-26 09:35:57 +0200 /Stage[main]/abc_wls_deployment::Wls_deploy/Wls_deployment[Test-FULLZon1/al_3rdParty]/versionidentifier (notice): versionidentifier changed '1609' to '1625' 2019-02-26 09:35:57 +0200 Puppet (info): modify Test-FULLZon1/al_3rdParty 2019-02-26 09:35:57 +0200 Puppet (debug): Executing: wlstScript with action 2019-02-26 09:35:57 +0200 Puppet (info): Got the right domain Test-FULLZon1 script, now execute WLST 2019-02-26 09:35:57 +0200 Puppet (info): Executing wls-script /users/tstwrk1/tmp/wlstScript20190226-9630-1ll4jz.py with timeout = 90 2019-02-26 09:35:57 +0200 Puppet (debug): Passing domain Test-FULLZon1 2019-02-26 09:35:57 +0200 Puppet (debug): Passing tmp script location 2019-02-26 09:35:57 +0200 Puppet (debug): Passing use_default_val_ue_when_empty True 2019-02-26 09:35:57 +0200 Puppet (debug): Passing credential_s to WLST 2019-02-26 09:35:57 +0200 Puppet (info): Connecting to wls on url t3://eaasrt:21111 2019-02-26 09:35:57 +0200 Puppet (debug): wls:/Test-FULLZon1/edit/> domain = 'Test-FULLZon1' 2019-02-26 09:35:57 +0200 Puppet (debug): wls:/Test-FULLZon1/edit/> tmp_script = '/tmp/wlstScriptTest-FULLZon1.out' 2019-02-26 09:35:57 +0200 Puppet (debug): wls:/Test-FULLZon1/edit/> use_default_val_ue_when_empty = True 2019-02-26 09:35:57 +0200 Puppet (debug): wls:/Test-FULLZon1/edit/> weblogicUser = 'weblogic' 2019-02-26 09:35:57 +0200 Puppet (debug): wls:/Test-FULLZon1/edit/> weblogicPassword = 'weblogic1' 2019-02-26 09:35:57 +0200 Puppet (debug): wls:/Test-FULLZon1/edit/> connect('weblogic','weblogic1','t3://eaasrt:21111') 2019-02-26 09:35:57 +0200 Puppet (debug): Connecting to t3://eaasrt:21111 with userid weblogic ... 2019-02-26 09:35:57 +0200 Puppet (debug): Successfully connected to Admin Server "TestServer" that belongs to domain "Test-FULLZon1". 2019-02-26 09:35:57 +0200 Puppet (debug): 2019-02-26 09:35:57 +0200 Puppet (debug): Warning: An insecure protocol was used to connect to the server. 2019-02-26 09:35:57 +0200 Puppet (debug): To ensure on-the-wire security, the SSL port or Admin port should be used instead. 2019-02-26 09:35:57 +0200 Puppet (debug): 2019-02-26 09:35:57 +0200 Puppet (debug): wls:/Test-FULLZon1/serverConfig/> execfile('/users/tstwrk1/tmp/wlstScript20190226-9630-1ll4jz.py') 2019-02-26 09:35:57 +0200 Puppet (debug): 2019-02-26 09:35:57 +0200 Puppet (debug): Starting an edit session ... 2019-02-26 09:35:57 +0200 Puppet (debug): Started edit session, be sure to save and activate your changes once you are done. 2019-02-26 09:35:57 +0200 Puppet (debug): start.... 2019-02-26 09:35:58 +0200 Puppet (debug): step 1.... 2019-02-26 09:35:58 +0200 Puppet (debug): current version: 1609 2019-02-26 09:35:58 +0200 Puppet (debug): undeploy.... 2019-02-26 09:35:58 +0200 Puppet (debug): Undeploying application al_3rdParty ... 2019-02-26 09:35:58 +0200 Puppet (debug): <Feb 26, 2019 9:35:58 AM IST> <Initiating undeploy operation for application, al_3rdParty [archive: null], to TestServer .> 2019-02-26 09:35:58 +0200 Puppet (debug): You have an edit session in progress, hence WLST will not block for your undeployment to complete. 2019-02-26 09:35:58 +0200 Puppet (debug): Started the undeployment of Application. Please refer to the returned WLSTProgress object or variable LAST to track the status. 2019-02-26 09:35:58 +0200 Puppet (debug): deploying.... 2019-02-26 09:35:58 +0200 Puppet (debug): deploying with version without deploymentplan.... 2019-02-26 09:35:58 +0200 Puppet (debug): Deploying application from /opt/test/Test/core/applications/wls/ears/al_3rdParty.ear to targets TestServer (upload=fal_se) ... 2019-02-26 09:35:58 +0200 Puppet (debug): <Feb 26, 2019 9:35:58 AM IST> <Initiating deploy operation for application, al_3rdParty [archive: /opt/test/Test/core/applications/wls/ears/al_3rdParty.ear], to TestServer .> 2019-02-26 09:35:58 +0200 Puppet (debug): You have an edit session in progress, hence WLST will not block for your deployment to complete. 2019-02-26 09:35:58 +0200 Puppet (debug): Started the Deployment of Application. Please refer to the returned WLSTProgress object or variable LAST to track the status. 2019-02-26 09:35:58 +0200 Puppet (debug): Saving al_l your changes ... 2019-02-26 09:35:58 +0200 Puppet (debug): Saved al_l your changes successfully. 2019-02-26 09:35:58 +0200 Puppet (debug): Activating al_l your changes, this may take a while ... 2019-02-26 09:35:58 +0200 Puppet (debug): The edit lock associated with this edit session is released once the activation is completed. 2019-02-26 09:35:58 +0200 Puppet (debug): Unexpected error: main.WLSTException 2019-02-26 09:35:58 +0200 Puppet (debug): Discarded al_l your changes successfully. 2019-02-26 09:35:58 +0200 Puppet (debug): Edit session has been stopped successfully. 2019-02-26 09:35:58 +0200 Puppet (debug): ~~COMMAND FAILED~~ 2019-02-26 09:35:58 +0200 /Stage[main]/abc_wls_deployment::Wls_deploy/Wls_deployment[Test-FULLZon1/al_3rdParty] (err): Could not eval_uate: command in deamon failed. 2019-02-26 09:35:58 +0200 /Stage[main]/abc_wls_deployment::Wls_deploy/Wls_deployment[Test-FULLZon1/al_foundation_client_kit_ear]/versionidentifier (notice): versionidentifier changed '1609' to '1625'

### Our hiera file entries for wls_Deployments is like: wls_deployments: '%{hiera(''domain_name'')}/%{hiera(''server_name'')}_al_gjf_ear': ensure: present deploymenttype: AppDeployment stagingmode: nostage remote: '0' upload: '0' target: '%{hiera(''targets'')}' targettype: '%{hiera(''targettypes'')}' local_path: /opt/test/Test/core/applications/gjf/jee/ears/al_gjf_ear-al_gjf_mod_sec.ear timeout: '90' require:

### In weblogic, logic log we get error weblogic.management.DeploymentException: Cannot undeploy library Extension-Name: al_3rdParty, Specification-Version: 1609 from server TestServer, because the following deployed applications reference it: TestServer_al_gjf_ear [Version=foundation_java_main_1609], TestServer_al_grpl_ear [Version=rpl_main_894], TestServer_al_jfd_ear [Version=foundation_java_main_1609], TestServer_al_gmmo_ear [Version=GMMO_main_610], TestServer_al_gcl_ear [Version=cl_ccs_main_872], TestServer_al_gcm_ear [Version=cm_main_972], TestServer_al_gurmcust_web_mod_ear [Version=sal_main_947], TestServer_al_gtrb_ear [Version=foundation_java_main_1609], TestServer_al_gajtuq_ear [Version=tc_java_processes_main_2154], TestServer_al_gvm_ear [Version=vm_main_801], TestServer_al_gual_ear [Version=sal_main_947], TestServer_al_gajtuh_ear [Version=tc_java_processes_main_2154], TestServer_al_gcrossTest_ear [Version=cTest_main_843], TestServer_al_gutl_ear [Version=foundation_java_main_1609], TestServer_al_gvmfe_web_ear [Version=vm_main_801], TestServer_al_gatt_web_mod_ear [Version=mi_main_814], TestServer_al_gccs_ear [Version=cl_ccs_main_872], TestServer_al_gblm_ear [Version=BLM_main_1577], TestServer_al_gcc_web_ear [Version=gcc_main_710]

WA: However, same shared library with new version got deployed keeping old version. That is Steps performed: • Command: java -cp .:$CLASSPATH weblogic.Deployer -adminurl t3://192.168.2.100:21111 -user weblogic -password weblogic1 -deploy -library -name al_3rdParty -appversion 1625 -source /opt/test/Test/core/applications/wls/ears/al_3rdParty.ear • Restart server • al_l the dependent ears now referred to new shared lib. • Update successful. • Delete older al_3rdParty ear.

Does wls_deployment/modify.py.erb, deploy function uses wlst weblogic.Deployer tool to deploy new version of shared library when old version of same shared libary is been used?

vijayalp commented 5 years ago

Does the "production redeployment feature" for shared library/application is applicable in puppet 4 orawls ?

biemond commented 5 years ago

Hi,

there can be only 1 version of a shared lib exist, that is the puppet way like rpm etc. so that is why there is an undeploy which fails of dependencies which you need to resolve first. with multiple wls and domains I needed to do a lot of tricks to make it happen.

So puppet is probably not the right tool for this.

vijayalp commented 5 months ago

now no more exists. . its very old issue.