vmware-archive / vmware-vcsa

VMware vCSA module
Other
24 stars 16 forks source link

Getting undefined method `path' for nil:NilClass #8

Closed athak closed 11 years ago

athak commented 11 years ago

Hi, I'm trying to test the module but this is what I get:

Could not autoload puppet/type/vcsa_eula: Could not autoload puppet/provider/vcsa_eula/default: undefined method `path' for nil:NilClass

Depending on the run I get the same message for all the other vcsa providers, vcsa_db, vcsa_sso, vcsa_java, vcsa_service.

Puppet version is 3.1.0 on both the master and agent. Master us Ubuntu 12.04 and agent is SLES 11 (VMware Management Assistant).

Cheers, Atha

nanliu commented 11 years ago

Run the command with --trace. I'm guessing we need to change to how the shared lib is loaded to accomodate apply vs. agent as well as difference between 2.7 v.s. 3.0/3.1 similar to https://github.com/puppetlabs/puppetlabs-mount_providers/blob/master/lib/puppet/provider/mountpoint/linux.rb#L3-L10.

athak commented 11 years ago

Hi Nan, thanks for the prompt reply. This is the output with --trace:

vma:/var/lib/puppet/state # puppet agent --no-daemonize --onetime --verbose --trace Info: Retrieving plugin Info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb Info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb Info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not autoload puppet/type/vcsa_eula: Could not autoload puppet/provider/vcsa_eula/default: undefined method path' for nil:NilClass on node vma.athak.local /usr/lib64/ruby/vendor_ruby/1.8/puppet/indirector/rest.rb:65:indeserialize' /usr/lib64/ruby/vendor_ruby/1.8/puppet/indirector/rest.rb:121:in find' /usr/lib64/ruby/vendor_ruby/1.8/puppet/indirector/indirection.rb:191:infind' /usr/lib64/ruby/vendor_ruby/1.8/puppet/configurer.rb:243:in retrieve_new_catalog' /usr/lib64/ruby/vendor_ruby/1.8/puppet/util.rb:351:inthinmark' /usr/lib64/ruby/1.8/benchmark.rb:308:in realtime' /usr/lib64/ruby/vendor_ruby/1.8/puppet/util.rb:350:inthinmark' /usr/lib64/ruby/vendor_ruby/1.8/puppet/configurer.rb:242:in retrieve_new_catalog' /usr/lib64/ruby/vendor_ruby/1.8/puppet/configurer.rb:67:inretrieve_catalog' /usr/lib64/ruby/vendor_ruby/1.8/puppet/configurer.rb:107:in prepare_and_retrieve_catalog' /usr/lib64/ruby/vendor_ruby/1.8/puppet/configurer.rb:159:inrun' /usr/lib64/ruby/vendor_ruby/1.8/puppet/agent.rb:45:in run' /usr/lib64/ruby/vendor_ruby/1.8/puppet/agent/locker.rb:20:inlock' /usr/lib64/ruby/vendor_ruby/1.8/puppet/agent.rb:45:in run' /usr/lib64/ruby/1.8/sync.rb:230:insynchronize' /usr/lib64/ruby/vendor_ruby/1.8/puppet/agent.rb:45:in run' /usr/lib64/ruby/vendor_ruby/1.8/puppet/agent.rb:119:inwith_client' /usr/lib64/ruby/vendor_ruby/1.8/puppet/agent.rb:42:in run' /usr/lib64/ruby/vendor_ruby/1.8/puppet/agent.rb:84:inrun_in_fork' /usr/lib64/ruby/vendor_ruby/1.8/puppet/agent.rb:41:in run' /usr/lib64/ruby/vendor_ruby/1.8/puppet/application.rb:179:incall' /usr/lib64/ruby/vendor_ruby/1.8/puppet/application.rb:179:in controlled_run' /usr/lib64/ruby/vendor_ruby/1.8/puppet/agent.rb:39:inrun' /usr/lib64/ruby/vendor_ruby/1.8/puppet/application/agent.rb:338:in onetime' /usr/lib64/ruby/vendor_ruby/1.8/puppet/application/agent.rb:312:inrun_command' /usr/lib64/ruby/vendor_ruby/1.8/puppet/application.rb:364:in run' /usr/lib64/ruby/vendor_ruby/1.8/puppet/application.rb:456:inplugin_hook' /usr/lib64/ruby/vendor_ruby/1.8/puppet/application.rb:364:in run' /usr/lib64/ruby/vendor_ruby/1.8/puppet/util.rb:504:inexit_on_fail' /usr/lib64/ruby/vendor_ruby/1.8/puppet/application.rb:364:in run' /usr/lib64/ruby/vendor_ruby/1.8/puppet/util/command_line.rb:132:inrun' /usr/lib64/ruby/vendor_ruby/1.8/puppet/util/command_line.rb:86:in `execute' /usr/bin/puppet:4 Notice: Using cached catalog Info: Applying configuration version '1362455187' Notice: Finished catalog run in 0.03 seconds

Cheers, Atha

nanliu commented 11 years ago

Can you test this branch and see if it resolves the loading issue: https://github.com/nanliu/vmware-vcsa/tree/loadpath (I was able to test 2.7/3.1 with apply and I'm loading a 2.7 agent to test agent/master on 2.7.)

athak commented 11 years ago

Is your repo private? I am not able to access it.

nanliu commented 11 years ago

It was, it's public now.

athak commented 11 years ago

Hi Nan, it seems to be working now!

vma:/var/lib/puppet/state # puppet agent --no-daemonize --onetime --verbose --trace Info: Retrieving plugin Notice: /File[/var/lib/puppet/lib/puppet/provider/vcsa.rb]/content: content changed '{md5}50c777ac817b71e45003b553cbbfa219' to '{md5}ac30421d41c333fa5a49dd6270447162' Notice: /File[/var/lib/puppet/lib/puppet_x/vmware/util.rb]/content: content changed '{md5}3b7253e6ec8c6eba8cb69dbd56a5abef' to '{md5}b6bfda1bb9c1515dac0da90e3bf60b02' Info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb Info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb Info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb Info: Caching catalog for vma.athak.local Info: Applying configuration version '1362502129' Notice: Finished catalog run in 4.11 seconds

I did have to install the net-ssh gem. I'll try to submit a patch for that.

Best, Atha

nanliu commented 11 years ago

net-ssh gem is part of class { 'vcenter::package': }. In this case might make sense to make vcsa::package (maybe use ensure_package or ensure_resource from stdlib). I'll put the pull request in a short bit for all the modules (you'll run into the same issue with vcenter/vshield).