FAQ
We have been successfully using Puppet v2 for a few years now managing Mac
OSX machines, with a LaunchDaemon file (com.reductivelabs.puppet
http://1drv.ms/1kqcNW0)
This needed to be changed when Puppet v3 came along and so we merely
changed the 'Label' - which worked fine with v3.3 on OSX 10.8.5...

For Mavericks (OSX 10.9) we need to use Puppet 3.4.3 (with Facter 1.7.5)
and this LaunchDaemon file does not work - so following information gained
from this forum, and the launchd manpage<https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man5/launchd.plist.5.html>,
I changed the RubyLib Path to where it now gets installed and modified a
few other keys: (com.puppetlabs.puppet http://1drv.ms/1kqdzSU)

Unfortunately this still does not work.

I can manually run puppet on Mavericks from the commandline using 'sudo
puppet agent --test' and it functions perfectly. But the LaunchDaemon just
refuses to work; it gives the following error:

Error: Could not create resources for managing Puppet's files and
directories in sections [:main, :agent, :ssl]: undefined method `each' for
nil:NilClass
Error: Could not prepare for execution: Could not create resources for
managing Puppet's files and directories in sections [:main, :agent, :ssl]:
undefined method `each' for nil:NilClass
undefined method `each' for nil:NilClass

The only reference I can find to this kind of error was apparently fixed in
3.0.2 (password hashing problem?)...

Has anyone got a LaunchDaemon working on Mavericks? Any pointers for what I
might need to do to make it work?

Many thanks!

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/c927a550-f16b-4896-b243-c1188f1790fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Merlin Hartley at Mar 14, 2014 at 1:34 pm
    Sorry, those links are rubbish:
    com.reductivelabs.puppet.plist: http://pastebin.com/hBrwkGv0
    com.puppetlabs.puppet.plist: http://pastebin.com/X6ZBE7L5

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/83f34703-b8a2-45eb-8e8e-d15845b90a23%40googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Joe Garfoot at Mar 14, 2014 at 3:18 pm
    Hi Merlin,

    It¹s working here. This is what we're using with Mavericks and Puppet
    3.4.3.

    http://pastebin.com/i9A82gYr

    I installed puppet using the installer packages from Puppet Labs rather
    than via a gem if that makes a difference.

    Thanks

    Joe





    On 14/03/2014 13:21, "Merlin Hartley" wrote:

    We have been successfully using Puppet v2 for a few years now managing
    Mac OSX machines, with a LaunchDaemon file (com.reductivelabs.puppet
    http://1drv.ms/1kqcNW0)
    This needed to be changed when Puppet v3 came along and so we merely
    changed the 'Label' - which worked fine with v3.3 on OSX 10.8.5...

    For Mavericks (OSX 10.9) we need to use Puppet 3.4.3 (with Facter 1.7.5)
    and this LaunchDaemon file does not work - so following information
    gained from this forum, and the

    launchd manpage
    <https://developer.apple.com/library/mac/documentation/Darwin/Reference/Ma
    nPages/man5/launchd.plist.5.html>, I changed the RubyLib Path to where it
    now gets installed and modified a few other keys: (com.puppetlabs.puppet
    http://1drv.ms/1kqdzSU)

    Unfortunately this still does not work.

    I can manually run puppet on Mavericks from the commandline using 'sudo
    puppet agent --test' and it functions perfectly. But the LaunchDaemon
    just refuses to work; it gives the following error:

    Error: Could not create resources for managing Puppet's files and
    directories in sections [:main, :agent, :ssl]: undefined method `each'
    for nil:NilClass
    Error: Could not prepare for execution: Could not create resources for
    managing Puppet's files and directories in sections [:main, :agent,
    :ssl]: undefined method `each' for nil:NilClass
    undefined method `each' for nil:NilClass

    The only reference I can find to this kind of error was apparently fixed
    in 3.0.2 (password hashing problem?)...

    Has anyone got a LaunchDaemon working on Mavericks? Any pointers for what
    I might need to do to make it work?

    Many thanks!

    --
    You received this message because you are subscribed to the Google Groups
    "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to
    puppet-users+unsubscribe@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/puppet-users/c927a550-f16b-4896-b243-c11
    88f1790fb%40googlegroups.com
    <https://groups.google.com/d/msgid/puppet-users/c927a550-f16b-4896-b243-c1
    188f1790fb%40googlegroups.com?utm_medium=email&utm_source=footer>.
    For more options, visit https://groups.google.com/d/optout.

    --
    Joe Garfoot.
    Infrastructure Management Team.
    Wellcome Trust Sanger Institute,
    Hinxton, Cambridge, CB10 1SA
    Telephone: 01223 492315






    --
      The Wellcome Trust Sanger Institute is operated by Genome Research
      Limited, a charity registered in England with number 1021457 and a
      company registered in England with number 2742969, whose registered
      office is 215 Euston Road, London, NW1 2BE.

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CF48BB34.3984A%25jg9%40sanger.ac.uk.
    For more options, visit https://groups.google.com/d/optout.
  • Merlin Hartley at Mar 14, 2014 at 3:43 pm
    Thanks Joe, but your plist gives me exactly the same error...

    I am testing this on a brand new from the box iMac with Mavericks with the
    latest Puppet/Hiera/Facter packages downloaded from
    https://downloads.puppetlabs.com/mac/

    Incidentally /usr/lib/ruby/site_ruby is actually a symbolic link to
    /Library/Ruby/Site anyway (though I hadn't previously tried with 2.0.0) :
    $ ls -al /usr/lib/ruby/site_ruby
    lrwxr-xr-x 1 root wheel 44 31 Oct 21:26 /usr/lib/ruby/site_ruby ->
    ../../../../../../../../../Library/Ruby/Site

    This feels like we just eliminated the LaunchDaemon as the culprit... do
    you make any other changes to file permissions or anything other that just
    installing those packages?

    Thanks again!

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/0b68c635-f57d-4728-b743-a7b0b637fa20%40googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Khoury at Mar 19, 2014 at 1:37 am
    I'm seeing the same behavior with the plist on 10.9.2: Puppet runs fine
    using the CLI but doesn't work as a LaunchDaemon. Did you manage to work
    out why this happens?

    On a fresh OS X 10.9 install I didn't have any issues but 10.9.2 may have
    broken something. I get the same behavior with Puppet 3.4.2 and 3.4.3 and
    facter 1.7.4 and facter 1.7.5.
    On Friday, March 14, 2014 8:34:57 AM UTC-7, Merlin Hartley wrote:

    Thanks Joe, but your plist gives me exactly the same error...

    I am testing this on a brand new from the box iMac with Mavericks with the
    latest Puppet/Hiera/Facter packages downloaded from
    https://downloads.puppetlabs.com/mac/

    Incidentally /usr/lib/ruby/site_ruby is actually a symbolic link to
    /Library/Ruby/Site anyway (though I hadn't previously tried with 2.0.0) :
    $ ls -al /usr/lib/ruby/site_ruby
    lrwxr-xr-x 1 root wheel 44 31 Oct 21:26 /usr/lib/ruby/site_ruby ->
    ../../../../../../../../../Library/Ruby/Site

    This feels like we just eliminated the LaunchDaemon as the culprit... do
    you make any other changes to file permissions or anything other that just
    installing those packages?

    Thanks again!
    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/e59d8f53-162d-4a18-aeaa-2d5d172aed4e%40googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Khoury at Mar 19, 2014 at 7:35 am
    I found a workaround. When I ran puppet in root's shell it had the same
    error. Since it worked in my shell but not root's I figured it was an
    environment issue at that point and added all of the environment variables
    from my user shell to the root shell and started removing them individually
    until I narrowed it down to the environment variable LANG. When I set the
    environment variable LANG to en_US.UTF-8 in my plist and it started working
    again. It goes in the EnvironmentVariables dict and looks like this:

    <key>LANG</key>
    <string>en_US.UTF-8</string>

    I'm not entirely sure why that works yet though (bug?).
    On Tuesday, March 18, 2014 6:36:56 PM UTC-7, Khoury wrote:

    I'm seeing the same behavior with the plist on 10.9.2: Puppet runs fine
    using the CLI but doesn't work as a LaunchDaemon. Did you manage to work
    out why this happens?
    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/320e92b0-b0c8-4d4e-888e-57e43c90d742%40googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Merlin Hartley at Mar 19, 2014 at 11:43 am
    perfect!
    Thanks Khoury!

    Here is my functional version:
    http://pastebin.com/Vdb9vFvB

    Out of interest, I tried "en_GB.UTF-8" (which is what my Environment contains) but that didn't work...

    The above file works fine though


    Merlin

    On 19 Mar 2014, at 07:35, Khoury wrote:

    I found a workaround. When I ran puppet in root's shell it had the same error. Since it worked in my shell but not root's I figured it was an environment issue at that point and added all of the environment variables from my user shell to the root shell and started removing them individually until I narrowed it down to the environment variable LANG. When I set the environment variable LANG to en_US.UTF-8 in my plist and it started working again. It goes in the EnvironmentVariables dict and looks like this:

    <key>LANG</key>
    <string>en_US.UTF-8</string>

    I'm not entirely sure why that works yet though (bug?).

    On Tuesday, March 18, 2014 6:36:56 PM UTC-7, Khoury wrote:
    I'm seeing the same behavior with the plist on 10.9.2: Puppet runs fine using the CLI but doesn't work as a LaunchDaemon. Did you manage to work out why this happens?

    --
    You received this message because you are subscribed to a topic in the Google Groups "Puppet Users" group.
    To unsubscribe from this topic, visit https://groups.google.com/d/topic/puppet-users/-IxlwRy-LRE/unsubscribe.
    To unsubscribe from this group and all its topics, send an email to puppet-users+unsubscribe@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/320e92b0-b0c8-4d4e-888e-57e43c90d742%40googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/BLU0-SMTP248DE2D87C46D8DC189FC51A17F0%40phx.gbl.
    For more options, visit https://groups.google.com/d/optout.
  • Khoury Brazil at Mar 19, 2014 at 6:41 pm
    For what it's worth, I was able to get it to work with "en_GB.UTF-8" in
    root's shell. I was also able to get it to work by setting it to
    "de_DE.UTF-8". I think puppet requires a language/locale/encoding and the
    default us_ascii (on my copy of OS X) doesn't cut it.

    I tried it with puppet 3.4.3 on OS X 10.7 to see if it was specifically an
    issue with 10.9. While it doesn't fail in the same way, it does fail with
    this error in a LANG-less environment:
    Error: Could not request certificate: Could not write
    /etc/puppet/ssl/private_keys/10-7mac.home.pem to privatekeydir: Permission
    denied - /etc/puppet/ssl/private_keys/10-7mac.home.pem

    Setting the LANG environment variable fixes that issue as well and puppet
    writes the key as expected.

    On Wed, Mar 19, 2014 at 4:43 AM, Merlin Hartley
    wrote:
    perfect!
    Thanks Khoury!

    Here is my functional version:
    http://pastebin.com/Vdb9vFvB

    Out of interest, I tried "en_GB.UTF-8" (which is what my Environment
    contains) but that didn't work...

    The above file works fine though


    Merlin


    On 19 Mar 2014, at 07:35, Khoury wrote:

    I found a workaround. When I ran puppet in root's shell it had the same
    error. Since it worked in my shell but not root's I figured it was an
    environment issue at that point and added all of the environment variables
    from my user shell to the root shell and started removing them individually
    until I narrowed it down to the environment variable LANG. When I set the
    environment variable LANG to en_US.UTF-8 in my plist and it started working
    again. It goes in the EnvironmentVariables dict and looks like this:

    <key>LANG</key>
    <string>en_US.UTF-8</string>

    I'm not entirely sure why that works yet though (bug?).
    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAAqoMCaM2%3DVv%3D56CKkNq57Ngf3mi0uFnCUff%3Dr%3D0pQSsNRK3xA%40mail.gmail.com.
    For more options, visit https://groups.google.com/d/optout.
  • Khoury Brazil at Mar 20, 2014 at 12:44 am
    I opened a bug ticket concerning this:
    PUP-2011
    https://tickets.puppetlabs.com/browse/PUP-2011

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAAqoMCa3SDAtaT5QfNctRPvm%3DPdr_F%2BzyFQuP%2Bh1HQcTVe2WQg%40mail.gmail.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedMar 14, '14 at 1:21p
activeMar 20, '14 at 12:44a
posts9
users3
websitepuppetlabs.com

People

Translate

site design / logo © 2022 Grokbase