Comments (2)
Thanks for reporting.
Strange it should work because patch 21555660 should be part of 21520444 or be inside the zip. So will it try to apply the patch for the 2nd time when you run puppet again. If so then sub patchid 21555660 is not correct.
and rollback should work for only that patch 21555660 and not for the others.
Yeah, rollback of a bundle is a problem because I use opatch lsinventory to check if the patch is applied else it will do it on every puppet run.
and bundle patches are not registered in the inventory only its sub patches. Maybe we need to use an array of all the included patches as subpatch id and use that for the rollback.
thanks Edwin
from biemond-oradb.
I guess the issue here is that patch_id is used when opatch rollback is done. However, bundle_sub_patch_id should be used when bundle_sub_patch_id exists.
def opatch(action)
user = resource[:os_user]
patchName = resource[:patch_id]
oracle_product_home_dir = resource[:oracle_product_home_dir]
extracted_patch_dir = resource[:extracted_patch_dir]
ocmrf_file = resource[:ocmrf_file]
opatch_auto = resource[:opatch_auto]
use_opatchauto_utility = resource[:use_opatchauto_utility]
Puppet.debug "opatch auto result: #{opatch_auto}"
unless ocmrf_file.nil?
ocmrf = ' -ocmrf ' + ocmrf_file
else
ocmrf = ''
end
if opatch_auto == false
if action == :present
command = "#{oracle_product_home_dir}/OPatch/opatch apply -silent #{ocmrf} -oh #{oracle_product_home_dir} #{extracted_patch_dir}"
else
command = "#{oracle_product_home_dir}/OPatch/opatch rollback -id #{patchName} -silent -oh #{oracle_product_home_dir}"
end
else
if use_opatchauto_utility == false
if action == :present
command = "#{oracle_product_home_dir}/OPatch/opatch auto #{extracted_patch_dir} #{ocmrf} -oh #{oracle_product_home_dir}"
else
command = "#{oracle_product_home_dir}/OPatch/opatch auto -rollback #{extracted_patch_dir} #{ocmrf} -oh #{oracle_product_home_dir}"
end
else
if action == :present
command = "#{oracle_product_home_dir}/OPatch/opatchauto apply #{extracted_patch_dir} #{ocmrf} -oh #{oracle_product_home_dir}"
else
command = "#{oracle_product_home_dir}/OPatch/opatchauto rollback #{extracted_patch_dir} #{ocmrf} -oh #{oracle_product_home_dir}"
end
end
It works fine for opatch_status query because bundle_sub_patch_id is used.
def opatch_status
user = resource[:os_user]
patchName = resource[:patch_id]
oracle_product_home_dir = resource[:oracle_product_home_dir]
orainst_dir = resource[:orainst_dir]
bundle_sub_patch_id = resource[:bundle_sub_patch_id]
# opatch_auto = resource[:opatch_auto]
unless bundle_sub_patch_id.nil?
* patchId = bundle_sub_patch_id*
else
patchId = patchName
end
Puppet.info "search for patchid #{patchId}"
command = oracle_product_home_dir + '/OPatch/opatch lsinventory -patch_id -oh ' + oracle_product_home_dir + ' -invPtrLoc ' + orainst_dir + '/oraInst.loc'
Puppet.info "opatch_status for patch #{patchName} command: #{command}"
output = `su - #{user} -c '#{command}'`
Puppet.debug "#{output}"
# output = execute command, :failonfail => true ,:uid => user
output.each_line do |li|
opatch = li[5, li.index(':') - 5].strip + ';' if (li['Patch'] and li[': applied on'])
unless opatch.nil?
Puppet.debug "line #{opatch}"
if opatch.include? patchId
Puppet.debug 'found patch'
return patchId
end
end
end
'NotFound'
end
from biemond-oradb.
Related Issues (20)
- Any plans to support 19c database ? HOT 4
- Master branch HOT 1
- Any option to support custom string in listener.ora file ? HOT 1
- Hung on lsinv check by 2 processes simultaneously
- Install OGG on one host twice (2 locations) HOT 2
- using oradb::autostartdatabase for multiple databases per server failing HOT 7
- database 19c creation fails due to Automatic Memory Management option HOT 2
- Update metadata.json dependencies of stdlib and concat HOT 2
- Any plans to support for OEM 13.4 ? HOT 1
- oradb.opatch - OPatchauto and NApply HOT 4
- Any plans to support for RHEL 8? HOT 1
- Legacy facts used for operating system family
- Cut a new release and publish to forge HOT 3
- Run the sql for pdb database HOT 3
- Forge to Deinstall GG - golden gate
- Donate project to Voxpupuli
- How does one create multiple entries in the tnsnames.ora file?
- tnsnames.ora file doesn't identify itself with "Puppet Managed. Do not edit!" or similar HOT 1
- Add tnsnames.ora options
- PROTOCOL = for tnsnames.ora doesn't have a default value HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from biemond-oradb.