crayfishx / puppet-db2

Puppet module to automate DB2 Server installation
Apache License 2.0
6 stars 8 forks source link

Db2 isnt installing, getting an error #16

Closed jsmelser closed 7 years ago

jsmelser commented 7 years ago

Trying to set up db2 and getting an error. My Definition is:

db2::install { '10.5':
  source     => 'ftp://prvlopsrep01/DB2/v10/DB2_Svr_10.5.0.3_Linux_x86-64.tar.gz',
  components => [
    'ACS',
    'APPLICATION_DEVELOPMENT_TOOLS',
    'DB2_DATA_SOURCE_SUPPORT',
    'BASE_CLIENT',
    'BASE_DB2_ENGINE',
    'JAVA_SUPPORT',
    'SQL_PROCEDURES',
    'COMMUNICATION_SUPPORT_TCPIP'
  ],
  install_dest    => '/opt/imb/server/db2/V',
  license_content => template('db2/license/trial.lic'),
}

db2::instance { 'db2inst1':
  fence_user        => 'db2fenc1',
  installation_root => '/opt/ibm/server/db2/V10.5',
  require           => Db2::Install['10.5'],
}

Error below:

2016-11-28 11:11:55,061 WARN [qtp265994662-250318] [puppetserver] Puppet Unknown variable: '::db2::workspace'. at /etc/puppetlabs/code/environments/production/modules/db2/manifests/install.pp:11:24 2016-11-28 11:11:55,075 ERROR [qtp265994662-250318] [puppetserver] Puppet Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Function Call, nil is not an absolute path. at /etc/puppetlabs/code/environments/production/modules/db2/manifests/install.pp:69:3 at /etc/puppetlabs/code/environments/production/manifests/db2.pp:5 on node prvlopsdb2t01.trustamerica.com /etc/puppetlabs/code/environments/production/modules/stdlib/lib/puppet/parser/functions/validate_absolute_path.rb:49:in real_function_validate_absolute_path' org/jruby/RubyArray.java:1613:ineach' /etc/puppetlabs/code/environments/production/modules/stdlib/lib/puppet/parser/functions/validate_absolute_path.rb:47:in real_function_validate_absolute_path' org/jruby/RubyArray.java:1613:ineach' /etc/puppetlabs/code/environments/production/modules/stdlib/lib/puppet/parser/functions/validate_absolute_path.rb:38:in real_function_validate_absolute_path' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/functions.rb:174:infunction_validate_absolute_path' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler/around_profiler.rb:58:in profile' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler.rb:51:inprofile' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/functions.rb:167:in function_validate_absolute_path' /etc/puppetlabs/code/environments/production/modules/stdlib/lib/puppet/functions/validate_absolute_path.rb:13:indeprecation_gen' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/functions/dispatch.rb:45:in invoke' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/functions/dispatcher.rb:35:indispatch' /etc/puppetlabs/code/environments/production/modules/stdlib/lib/puppet/functions/validate_absolute_path.rb:9:in call' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/evaluator/runtime3_support.rb:272:incall_function' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler/around_profiler.rb:58:in profile' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler.rb:51:inprofile' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/evaluator/runtime3_support.rb:271:in call_function' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:912:incall_function_with_block' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:881:in eval_CallNamedFunctionExpression' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/visitor.rb:69:invisit_this_1' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:77:in evaluate' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:617:ineval_BlockExpression' org/jruby/RubyArray.java:1613:in each' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:617:ineval_BlockExpression' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/visitor.rb:69:in visit_this_1' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:77:inevaluate' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/parser/evaluating_parser.rb:63:in evaluate' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/ast/pops_bridge.rb:32:inevaluate' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/ast.rb:31:in safeevaluate' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/type.rb:182:inevaluate_code' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/resource.rb:84:in evaluate' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler/around_profiler.rb:58:inprofile' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler.rb:51:in profile' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/resource.rb:76:inevaluate' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/compiler.rb:591:in evaluate_definitions' org/jruby/RubyArray.java:1613:ineach' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/compiler.rb:589:in evaluate_definitions' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler/around_profiler.rb:58:inprofile' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler.rb:51:in profile' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/compiler.rb:588:inevaluate_definitions' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/errors.rb:64:in exceptwrap' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/compiler.rb:587:inevaluate_definitions' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/compiler.rb:615:in evaluate_generators' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler/around_profiler.rb:58:inprofile' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler.rb:51:in profile' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/compiler.rb:612:inevaluate_generators' org/jruby/RubyKernel.java:1511:in loop' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/compiler.rb:609:inevaluate_generators' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/compiler.rb:192:in compile' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler/around_profiler.rb:58:inprofile' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler.rb:51:in profile' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/compiler.rb:192:incompile' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in override' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:240:inoverride' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/compiler.rb:167:in compile' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/compiler.rb:35:incompile' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:266:in compile' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler/around_profiler.rb:58:inprofile' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler.rb:51:in profile' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:264:incompile' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:223:in benchmark' /opt/puppetlabs/server/apps/puppetserver/puppet-server-release.jar!/META-INF/jruby.home/lib/ruby/1.9/benchmark.rb:295:inrealtime' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:222:in benchmark' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:262:incompile' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:53:in find' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:194:infind' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/api/indirected_routes.rb:132:in do_find' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/api/indirected_routes.rb:48:incall' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in override' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:240:inoverride' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/api/indirected_routes.rb:47:in call' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/route.rb:82:inprocess' org/jruby/RubyArray.java:1613:in each' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/route.rb:81:inprocess' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/route.rb:87:in process' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/route.rb:87:inprocess' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/handler.rb:60:in process' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler/around_profiler.rb:58:inprofile' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler.rb:51:in profile' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/handler.rb:58:inprocess' file:/opt/puppetlabs/server/apps/puppetserver/puppet-server-release.jar!/puppetserver-lib/puppet/server/master.rb:42:in handleRequest' Puppet$$Server$$Master_156831259.gen:13:inhandleRequest' request_handler_core.clj:281:in invoke' jruby_request.clj:47:ininvoke' jruby_request.clj:29:in invoke' request_handler_service.clj:38:inhandle_request' request_handler.clj:3:in invoke' request_handler.clj:3:ininvoke' core.clj:2493:in invoke' ring_middleware.clj:281:ininvoke' core.clj:249:in invoke' core.clj:294:ininvoke' core.clj:128:in invoke' core.clj:134:ininvoke' ringutils.clj:86:in invoke' master_core.clj:427:ininvoke' ring.clj:21:in invoke' ring.clj:12:ininvoke' comidi.clj:249:in invoke' http.clj:152:ininvoke' http.clj:152:in invoke' http.clj:148:ininvoke' comidi.clj:336:in invoke' jetty9_core.clj:424:ininvoke' normalized_uri_helpers.clj:80:in `invoke'

crayfishx commented 7 years ago

Hi @jsmelser

The key here I think is....

[puppetserver] Puppet Unknown variable: '::db2::workspace'.

That sounds like you have not included the db2 class itself. Try adding include db2 to that manifest before declaring the db2::install type.....

jsmelser commented 7 years ago

Yup. :( I totally brain farted that one. Thanks

Getting this and assuming its because I need the universal install and not what I got.

Nov 30 09:49:11 prvlopsdb2t01 puppet-agent[45909]: (/Stage[main]/Main/Db2::Install[10.5]/Archive[/var/puppet_db2/DB2_Svr_10.5.0.3_Linux_x86-64.tar.gz]/ensure) download archive from ftp://prvlopsrep01/DB2/v10/DB2_Svr_10.5.0.3_Linux_x86-64.tar.gz to /var/puppet_db2/DB2_Svr_10.5.0.3_Linux_x86-64.tar.gz and extracted in /var/puppet_db2 with cleanup Nov 30 09:49:11 prvlopsdb2t01 systemd[1]: Got notification message for unit systemd-journald.service Nov 30 09:49:11 prvlopsdb2t01 systemd[1]: systemd-journald.service: Got notification message from PID 573 (WATCHDOG=1) Nov 30 09:49:11 prvlopsdb2t01 systemd[1]: systemd-journald.service: got WATCHDOG=1 Nov 30 09:49:11 prvlopsdb2t01 puppet-agent[45909]: (/Stage[main]/Main/Db2::Install[10.5]/File[/var/puppet_db2/10.5.rsp]/ensure) defined content as '{md5}3db9ae15cc7a9d7561c74769f785249f' Nov 30 09:49:11 prvlopsdb2t01 puppet-agent[45909]: Could not find command '/var/puppet_db2/universal/db2setup' Nov 30 09:49:11 prvlopsdb2t01 puppet-agent[45909]: (/Stage[main]/Main/Db2::Install[10.5]/Exec[db2::install::10.5]/returns) change from notrun to 0 failed: Could not find command '/var/puppet_db2/universal/db2setup' Nov 30 09:49:11 prvlopsdb2t01 puppet-agent[45909]: (/Stage[main]/Main/Db2::Install[10.5]/File[/opt/ibm/server/db2/V10.5/license/custom_10.5.lic]) Dependency Exec[db2::install::10.5] has failures: true Nov 30 09:49:11 prvlopsdb2t01 puppet-agent[45909]: (/Stage[main]/Main/Db2::Install[10.5]/File[/opt/ibm/server/db2/V10.5/license/custom_10.5.lic]) Skipping because of failed dependencies Nov 30 09:49:11 prvlopsdb2t01 puppet-agent[45909]: (/Stage[main]/Main/Db2::Install[10.5]/Exec[db2::install::license 10.5]) Dependency Exec[db2::install::10.5] has failures: true

But yeah, it looks like its working now just need to get the right tar ball.

jsmelser commented 7 years ago

YEah, I used installed_folder to point to what I needed and it all worked. Thanks for the help.

crayfishx commented 7 years ago

@jsmelser Glad its working - I added https://github.com/crayfishx/puppet-db2/commit/793ee5ce82fb24b61bfe89ec967afd6fdb650bd6 to helpfully make it clearer to anyone else coming across that.