puppet-r10k icon indicating copy to clipboard operation
puppet-r10k copied to clipboard

mco does not find any hosts

Open dan-wittenberg opened this issue 9 years ago • 6 comments

Any of the mco r10k commands yield the following error:

"No request sent, we did not discover any nodes."

dan-wittenberg avatar Dec 07 '15 14:12 dan-wittenberg

I had the same issue... I created a symlink /usr/bin/r10k -> /usr/local/bin/r10k and bounced mcollective, and the mco r10k commands were able to find the masters.

It has to do with https://github.com/acidprime/r10k/blob/3b6af3049eb3d4fad8affc4801fea5ad21972570/templates/agent/r10k.rb.erb#L8 and the r10k command not being found with a 'which r10k'

puppetalan avatar Dec 09 '15 17:12 puppetalan

Unfortunately I already have /usr/local/bin/r10k, symlink to the PE version in /opt, and pathing looks ok. I put /usr/local/bin in the path first as a test, bounced mcollective, and still no-go.

Dan

On Wed, Dec 9, 2015 at 11:16 AM, Alan Petersen [email protected] wrote:

I had the same issue... I created a symlink /usr/bin/r10k -> /usr/local/bin/r10k and bounced mcollective, and the mco r10k commands were able to find the masters.

— Reply to this email directly or view it on GitHub https://github.com/acidprime/r10k/issues/260#issuecomment-163329011.

Daniel Wittenberg | Senior Technical Architect | AHEAD

Work: 312.508.4996 | Mobile: 319.329.9776 | Fax: 312.924.5076

[email protected] | ThinkAhead.com http://www.thinkahead.com/

dan-wittenberg avatar Dec 09 '15 17:12 dan-wittenberg

PE installed the symlink in /usr/local/bin, but the mco r10k plugin wasn't finding it (even though it seems to be in the path). Try creating the symlink in /usr/bin to see if that helps. That's the only thing that worked for me (other than hacking around with the r10k mco plugin -- i'm avoiding that!)

puppetalan avatar Dec 09 '15 17:12 puppetalan

OH...I read that backwards, I thought you created the link from /usr/bin -> /usr/local/bin. lrwxrwxrwx. 1 root root 24 Dec 9 12:52 /usr/bin/r10k -> /opt/puppetlabs/bin/r10k

still no dice...yes, I've been avoiding hacking through the mco plugin as well...just odd that it works on two other systems, but not the third, and I can't find any differences. I am guessing that it was looking for r10k_environment fact, since it adds that, and that appears to be there: $ mco find --wf "r10k_environment=production"

This finds all the hosts, so not sure what's up...

Dan

On Wed, Dec 9, 2015 at 11:28 AM, Alan Petersen [email protected] wrote:

PE installed the symlink in /usr/local/bin, but the mco r10k plugin wasn't finding it (even though it seems to be in the path). Try creating the symlink in /usr/bin to see if that helps. That's the only thing that worked for me (other than hacking around with the r10k mco plugin -- i'm avoiding that!)

— Reply to this email directly or view it on GitHub https://github.com/acidprime/r10k/issues/260#issuecomment-163332602.

Daniel Wittenberg | Senior Technical Architect | AHEAD

Work: 312.508.4996 | Mobile: 319.329.9776 | Fax: 312.924.5076

[email protected] | ThinkAhead.com http://www.thinkahead.com/

dan-wittenberg avatar Dec 09 '15 17:12 dan-wittenberg

This started happening with the new activation code in the 3.x series, works for some people not for others as its basically running which r10k and so PATH and shell initialization are likely some of the factors. I would take a PR to concainate the PATH of PEs new PATH awfulness we are doing here

https://github.com/acidprime/r10k/blob/master/templates/agent/r10k.rb.erb#L72

acidprime avatar Jan 07 '16 18:01 acidprime

@dan-wittenberg Is this still an issue for you?

rnelson0 avatar Jan 08 '17 00:01 rnelson0