Skip to content

Instantly share code, notes, and snippets.

@jessereynolds
Last active February 21, 2017 08:22
Show Gist options
  • Save jessereynolds/5ef292b7c72bc7c9ddcd0b3e81c6a9ce to your computer and use it in GitHub Desktop.
Save jessereynolds/5ef292b7c72bc7c9ddcd0b3e81c6a9ce to your computer and use it in GitHub Desktop.
mco r10k no worky on 2016.1.1 installed by zack/r10k

Symptom:

peadmin@pe-201611-master:~$ mco r10k deploy environment production

No request sent, we did not discover any nodes.


Finished processing 0 / 0 hosts in 0.00 ms

mco ping works:

peadmin@pe-201611-master:~$ mco ping
pe-201611-agent.puppetdebug.vlan         time=127.23 ms
pe-201611-master.puppetdebug.vlan        time=164.55 ms


---- ping statistics ----
2 replies max: 164.55 min: 127.23 avg: 145.89

Puppetfile includes:

mod 'zack/r10k', '3.2.0'

puppet code applied to master:

class profiles::r10k {

  class {'r10k::webhook::config':
    enable_ssl => false,
    protected  => false,
  }

  class {'r10k::webhook':
    require    => Class['r10k::webhook::config'],
  }

  include r10k::mcollective
}

Evidence of agent and application having been installed:

[root@pe-201611-master ~]# ls -l /opt/puppetlabs/mcollective/plugins/mcollective/agent/
total 64
-rw-r--r-- 1 root root  5863 May  1 23:36 package.ddl
-rw-r--r-- 1 root root  4512 May  1 23:36 package.rb
-rw-r--r-- 1 root root  8967 May  1 23:36 puppet.ddl
-rw-r--r-- 1 root root  2175 May  1 23:36 puppetral.ddl
-rw-r--r-- 1 root root  2293 May  1 23:36 puppetral.rb
-rw-r--r-- 1 root root 10467 May  1 23:36 puppet.rb
-rw-r--r-- 1 root root  3638 May 10 06:00 r10k.ddl
-rw-r--r-- 1 root root  3360 May 10 06:00 r10k.rb
-rw-r--r-- 1 root root  1658 May  1 23:36 service.ddl
-rw-r--r-- 1 root root  2166 May  1 23:36 service.rb
[root@pe-201611-master ~]# ls -l /opt/puppetlabs/mcollective/plugins/mcollective/application/
total 24
-rw-r--r-- 1 root root  3658 May  1 23:36 package.rb
-rw-r--r-- 1 root root 11277 May  1 23:36 puppet.rb
-rw-r--r-- 1 root root  1355 May 10 06:00 r10k.rb
-rw-r--r-- 1 root root  3325 May  1 23:36 service.rb

libdir is set correctly:

# grep libdir /etc/puppetlabs/mcollective/server.cfg
libdir = /opt/puppet/libexec/mcollective:/opt/puppetlabs/mcollective/plugins

mcollective log says:

E, [2016-05-10T22:37:28.412524 #7719] ERROR -- : r10k.rb:11:in `block in <class:R10k>' r10k binary not found in PATH

r10k.rb agent source does this:

       activate_when do
         #This helper only activate this agent for discovery and execution
         #If r10k is found on $PATH.
         # http://docs.puppetlabs.com/mcollective/simplerpc/agents.html#agent-activation
         r10k_binary = `which r10k 2> /dev/null`
         if r10k_binary == ""
           #r10k not found on path.
           Log.error('r10k binary not found in PATH')
           false
         else
           true
         end
       end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment