Closed gerardkok closed 10 years ago
Hi @gerardkok,
You shouldn't have needed to make those changes, but I'm going to ask you to answer a couple of questions to help us troubleshoot:
puppet agent -t
on our Master first so that it puts all the providers and types in the right location for distribution.ruby --version
, and what does Facter report as the value for rubyversion, and rubysitedir?Hi @Ginja,
The answers to your questions:
I've put the stock 0.5.5 managedmac module back, and verified the errors are then also back. Adding the managedmac module to the production environment on the puppet master, solves the first error ('cannot load such file -- puppet/managedmac/common'), but the second one ('cannot load such file -- cfpropertylist') persists. However, this one is solved by adding 'pluginsync = true' to the client's puppet.conf (I was moving away from setting pluginsync explicitly, because I thought 'true' had become the default in the meantime, but seeing this I guess I'll better put it back in).
Looks like it's all solved, thanks for your help.
I am experiencing the same error as the user above. " Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not autoload puppet/type/macgroup: cannot load such file -- cfpropertylist on node"
puppet 3.8.1 facter 2.4.4
Have you installed the CFPropertyList gem on your client node?
gem install CFPropertyList
Yes.
{code} dschaaff@dschaaff-mac:~$ gem list
* LOCAL GEMS *
bigdecimal (1.2.0) CFPropertyList (2.3.1, 2.2.8) io-console (0.4.2) json (1.7.7) libxml-ruby (2.6.0) minitest (4.3.2) nokogiri (1.5.6) psych (2.0.0) puppet-lint (1.1.0) rake (0.9.6) rdoc (4.0.0) sqlite3 (1.3.10, 1.3.7) test-unit (2.0.0.0) {code}
schaaff@dschaaff-mac:~$ ruby --version ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin14] dschaaff@dschaaff-mac:~$ facter rubyversion 2.0.0 dschaaff@dschaaff-mac:~$ facter rubysitedir /Library/Ruby/Site/2.0.0 dschaaff@dschaaff-mac:~$
Nevermind, solved it. The CFPropertyList wasn't in the gem list on the master.
Since my company already run a puppet master for our servers, we have our OS X laptops run puppet agent against the same puppet master, although in a different environment. When trying out this module with this setup, I ran into two issues. Because they seem to be related, I've put them in the same ticket.
For my test I included this (unmodified) module to the classes deployed at my test laptop, and ran 'puppet agent -tv': configlaptop:etc root# puppet agent -tv Info: Retrieving pluginfacts Info: Retrieving plugin Info: Loading facts Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not autoload puppet/type/mobileconfig: cannot load such file -- puppet/managedmac/common on node configlaptop.sig.eu Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run
Apparently the "require 'puppet/managedmac/common'" in puppet/type/mobileconfig.rb throws an error. I'm not a Ruby expert (nor a Puppet one), but when I replaced this with: "require File.expand_path(File.join(File.dirname(FILE), '../..', 'puppet/managedmac/common'))", the puppet agent run would get passed this problem (I got the idea from the puppetlabs/mysql module). At this point I hit another problem:
configlaptop:~ root# gem install CFPropertyList Successfully installed CFPropertyList-2.2.8 Parsing documentation for CFPropertyList-2.2.8 1 gem installed configlaptop:~ root# puppet agent -tv Info: Retrieving pluginfacts Info: Retrieving plugin Info: Loading facts Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not autoload puppet/type/mobileconfig: cannot load such file -- cfpropertylist on node configlaptop.sig.eu Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run
So for some reason puppet can't find the CFPropertyList gem, although it has been installed. Because I didn't see references to this library from puppet/managedmac/common.rb, I tried if it would probably run without the "require 'cfpropertylist'", and it did. After this the module ran fine.
Although I think we have a reasonably standard puppet setup (both on the master and the OS X clients), I'm wondering if the issues are perhaps the result of a misconfiguration on my end.