Skip to content
This repository has been archived by the owner on Feb 28, 2020. It is now read-only.

Provide method to uninstall/remove previous patches before installing new patch #18

Open
AndrewSimon opened this issue Mar 1, 2017 · 4 comments

Comments

@AndrewSimon
Copy link

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.

@biemond
Copy link
Contributor

biemond commented Mar 1, 2017

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

@AndrewSimon
Copy link
Author

AndrewSimon commented Mar 6, 2017

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

@biemond
Copy link
Contributor

biemond commented Mar 6, 2017

I will fix bsu.cmd today or tomorrow.
indeed nice

@biemond
Copy link
Contributor

biemond commented Mar 8, 2017

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants