nodejs - Running make returns 2 instead of 0

120 views
Skip to first unread message

Björn

unread,
Jan 15, 2014, 8:35:52 AM1/15/14
to puppet...@googlegroups.com
Hello,

I try to build nodejs, unfortunately by running of make via puppet it returns 2 somehow.
When I run make manually it returns 0 as expected.

puppet agent -t
info: Retrieving plugin
info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb
info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb
info: Loading facts in /var/lib/puppet/lib/facter/vmwaretools_version.rb
info: Loading facts in /var/lib/puppet/lib/facter/pper_installed.rb
info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb
info: Loading facts in /var/lib/puppet/lib/facter/os_maj_version.rb
info: Loading facts in /var/lib/puppet/lib/facter/environment.rb
info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb
info: Caching catalog for pc
info: Applying configuration version '1389785537'
notice: /Stage[main]/Development-pc::Nodejs/Exec[git checkout]/returns: executed successfully
err: /Stage[main]/Development-pc::Nodejs/Exec[make nodejs]/returns: change from notrun to 0 failed: /usr/bin/make returned 2 instead of one of [0] at /etc/puppet/modules/development-pc/manifests/nodejs.pp:39
notice: /Stage[main]/Development-pc::Nodejs/Exec[make install nodejs]: Dependency Exec[make nodejs] has failures: true
warning: /Stage[main]/Development-pc::Nodejs/Exec[make install nodejs]: Skipping because of failed dependencies
notice: /Stage[main]/Development-pc::Nodejs/Exec[npm install grunt-cli]: Dependency Exec[make nodejs] has failures: true
warning: /Stage[main]/Development-pc::Nodejs/Exec[npm install grunt-cli]: Skipping because of failed dependencies
notice: Finished catalog run in 4.76 seconds

This is my exec:

  exec {'make nodejs':
    command => "/usr/bin/make",
    creates => "/usr/local/src/node/out/Release/node",
    cwd     => "/usr/local/src/node",
    path    => ["/usr/bin", "/usr/sbin"],
    require => Exec['configure nodejs'],
  }

Do you got any idea?

Thanks!

Björn

Ken Barber

unread,
Jan 15, 2014, 8:39:54 AM1/15/14
to Puppet Users
> This is my exec:
>
> exec {'make nodejs':
> command => "/usr/bin/make",
> creates => "/usr/local/src/node/out/Release/node",
> cwd => "/usr/local/src/node",
> path => ["/usr/bin", "/usr/sbin"],
> require => Exec['configure nodejs'],
> }
>
> Do you got any idea?

Try adding the parameter logoutput => on_failure to the 'exec' and
re-run puppet. It should drop the output of the make command to the
log so you can see any errors that might have been occurring.

http://docs.puppetlabs.com/references/latest/type.html#exec-attribute-logoutput

ken.

Björn Becker

unread,
Jan 15, 2014, 9:27:47 AM1/15/14
to puppet...@googlegroups.com
Ohhh, you made my day. That shows the problem.
We need /bin in PATH for uname.

Thanks a lot!

Björn

eche...@thoughtworks.com

unread,
Mar 24, 2014, 10:41:29 AM3/24/14
to puppet...@googlegroups.com
Life saver! For us it pointed out we needed -y flags on the commands being executed. 

Thank you :)
Reply all
Reply to author
Forward
0 new messages