biemond / biemond-oradb

Puppet Oracle Database Module
Apache License 2.0
59 stars 113 forks source link

opatch fact errors #176

Closed johmicd closed 7 years ago

johmicd commented 7 years ago

getting the following errors:

Debug: Caching environment 'production' (ttl = 0 sec) Debug: oradb opatch Error; -bash: /u01/app/oracle/product/MiddelwareR4/jdk16/OPatch/opatch: No such file or directory Debug: oradb opatch Error; -bash: /u01/app/oracle/product/MiddelwareR4/Oracle_BI1/OPatch/opatch: No such file or directory Debug: oradb opatch 11.1.0.10.4 Debug: oradb opatch 11.1.0.9.9 Error: Could not retrieve local facts: private method chomp' called for nil:NilClass Error: Failed to apply catalog: Could not retrieve local facts: private methodchomp' called for nil:NilClass

my inventroy.xml file look like this.

<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 1999, 2013, Oracle and/or its affiliates.
     All rights reserved. -->
<!-- Do not modify the contents of this file by hand. -->
<INVENTORY>
<VERSION_INFO>
   <SAVED_WITH>11.1.0.12.0</SAVED_WITH>
   <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME="jdk3" LOC="/u01/app/oracle/product/MiddelwareR4/jdk16" TYPE="O" IDX="39">
   <DEPHOMELIST>
      <DEPHOME LOC="/u01/app/oracle/product/MiddelwareR4/oms"/>
   </DEPHOMELIST>
</HOME>
<HOME NAME="Oracle_BI11" LOC="/u01/app/oracle/product/MiddelwareR4/Oracle_BI1" TYPE="O" IDX="40">
   <DEPHOMELIST>
      <DEPHOME LOC="/u01/app/oracle/product/MiddelwareR4/oracle_common"/>
   </DEPHOMELIST>
</HOME>
...
</HOME_LIST>
<COMPOSITEHOME_LIST>
</COMPOSITEHOME_LIST>
</INVENTORY>
biemond commented 7 years ago

what a strange db home, what did you install, BI?

johmicd commented 7 years ago

it is OEM 12C

biemond commented 7 years ago

agent or full em , because I tested it with full 12.2 and 13

johmicd commented 7 years ago

full

biemond commented 7 years ago

what version?

biemond commented 7 years ago

I got these examples with oradb

CentOS 7.2 vagrant box with Oracle Database 12.1 and Enterprise Manager 13.2.0.0 Enterprise puppet 4 vagrant box CentOS 6.7 vagrant box with Oracle Database 12.1 and Enterprise Manager 12.1.0.5 Enterprise puppet 4 vagrant box

johmicd commented 7 years ago

this is coming from a box that already had it installed.

biemond commented 7 years ago

so we need to fix this https://github.com/biemond/biemond-oradb/blob/puppet4_3_data/lib/facter/oracle_database_homes.rb#L56

we need to find out where it fails, what is the output and what we can improve.

johmicd commented 7 years ago

What about test to see if opatch is working correctly and it not then a graceful error.

biemond commented 7 years ago

yeah, I will check if the command is there else skip.