WebSphere Application Server & Liberty

WebSphere Application Server & Liberty

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  plugin-cfg.xml generation problem during scripted uninstall/install

    Posted Wed December 12, 2012 09:55 AM
    In our WAS7 ND environments, we use scripts to manage our installed applications.
    From time to time, we've got a problem with plugin-cfg.xml generation: After "redeploying" (uninstall & install in one script), one of our two IHS/plugin-cfg.xml does not contain the "redeployed" application.

    Script workflow:
    1.) uninstallation of the application (old version)
    2.) save
    3.) sync
    4.) install of the application (new version)
    5.) save
    6.) sync
    7.) start of the application

    From what I understand, plugin-cfg.xml generation is started everytime I save the changes made during script workflow. Therefore I assume that there is kind of a race condition going on: the first plugin-cfg.xml generation made after uninstalling the application takes too long / the plugin-cfg.xml generation taks overtake each other, i.e. due to dmgr system load. Is that plausible?

    I thought of removing steps 2&3, therefore performing uninstallation&installation without save&sync in between. As then there is only one save left, plugin-cfg.xml generation should only take place once, after installing the new version of the application, thus removing the assumed race condition. 
    What is your opinion of this alternative script workflow?
    We implemented this workflow to make 100% sure that all artifacts of the old version of the application are removed before installing a new version. By removing step 2&3, is there a danger of getting "mixed version" applications (applications with out-of-date artifacts)?


  • 2.  plugin-cfg.xml generation problem during scripted uninstall/install

    Posted Wed December 12, 2012 11:25 AM
    you can disable automatic plug-in config generation and propagation.

    go to web server -> server_name -> plug-in properties
    there are two check boxes .. one for generation and other for propagation, uncheck and save changes.

    please remember, when disable this functionality ... whenever you remove an app completely or install a new app, you need to do those two steps manually


  • 3.  plugin-cfg.xml generation problem during scripted uninstall/install

    Posted Fri December 14, 2012 12:39 PM
    Hi Christoph,

      You always can disable automatic generation and propagation (As Joseph says) and do it inside the script using wsadmin until not finish the first generation and propagation you don't continue (or do it in the last step).  This way you have a semaphore and always knows if the plugin is generated and propagated properly.
     
      I have see in this way in multiple clients.
     
      Hope this helps.
     
    regards,


  • 4.  plugin-cfg.xml generation problem during scripted uninstall/install

    Posted Thu December 20, 2012 01:26 PM
    Unfortunatly we do not have a fully scripted environment - some applications need to be installed manually via IBM Console. As people tend to make mistakes every once in a while, deactivating automatic plugin generation/propagation is not an option for us. 

    I was thinking about uninstalling and then installing an application without a save in between. Therefore - with only one save in our script - plugin-generation should only take place once and run without problems.

    ==> Is it possible/common to uninstall and then install an application without a save in between? 


  • 5.  plugin-cfg.xml generation problem during scripted uninstall/install

    Posted Thu December 20, 2012 05:02 PM
    Hi Christoph,

    Is there a particular reason why you uninstall/reinstall the application with each deployment?  You could use the AdminApp.update command and WebSphere takes care of the cleanup for you i.e.

    if application exists:
        AdminApp.update(application_name, content_type, ['-operation', 'update', '-contents', 'file_being_deployed', '-update.ignore.new'])
        AdminConfig.save()
        AdminNodeManagement.syncActiveNodes()
    else:
        AdminApp.install('file_being_deployed', options)
        AdminConfig.save()
        AdminNodeManagement.syncActiveNodes()

    If the app already exists the update command uninstalls/reinstalls it and regens the plugin.xml file automatically once it has unpacked the application binaries.  If the app doesn't already exist, then use the install command to perform an install and it will still regen the plugin.xml file after unpacking the application binaries.  Either way, you only have to save and sync once....

    **Note: the commands posted are compatible with WAS v7 and higher.  If you have WAS v6 or a previous version installed, let me know and I'll dig up the commands you'll need.

    Cheers!

    Danielle


  • 6.  plugin-cfg.xml generation problem during scripted uninstall/install

    Posted Fri December 21, 2012 07:46 AM
    Hi Danielle,

    thanks for your suggestion, I will try this after my (well-earned) vacation - wish you all happy holidays 

    Christoph