fmw-chef-cookbook
fmw-chef-cookbook copied to clipboard
Provide method to uninstall/remove previous patches before installing new patch
According to the install instructions:
- Remove any previously applied WebLogic Server Patch Set Update and associated overlay patches
....and....
Uninstalling Oracle WebLogic Server Patch Set Update 10.3.6.0.170117
- Stop all WebLogic Servers
- Navigate to the {MW_HOME}/utils/bsu directory.
- Execute bsu.sh -remove -patchlist={PATCH_ID} -prod_dir={MW_HOME}/{WL_HOME}
So, the process may need some way to determine the previous patch(es) - ideally this should be discovered/determined at runtime. Otherwise, the value can/should be fed in 'manually' via 'previous patch id' attribute.
Hi,
this only applies to patch bundles, it can be that some small patch still is needed. mostly when you apply a more recent bsu patch you already know the current applied patchset and the one you want to apply.
uninstall ( action = remove ) of a old patch can always be executed when it is not there, nothing will happen on the env. to do so you can copy the existing bsu recipe and do an uninstall of the old one and an install of the new one.
thanks
Yes - thank you I should have noticed the 'remove' function before I posted this.
Speaking of the 'remove' function, you have a typo in provider/bsu.rb for UNIX where you are trying to run bsu.cmd - should be bsu.sh.
On a related note, to prevent having to run twice (because install and remove share the same 'patch id' attribute), I added an 'unpatch' attribute and some code to weblogic.rb to 'unpatch' first then add the new patch. A 'remove' doesn't break anything if the patch list is empty or includes patch id's that are not found by remove. If you are interested I can share it
I will fix bsu.cmd today or tomorrow. indeed nice
fixed it, thanks
there is by the way an reason why you didn't created your own recipe and just invokes the bsu resources twice. These example recipes are meant to give you a quickstart and they are not holy plus have a lot of overhead like support for solaris, windows and chef 11.