Jeremy Rosengren
2012-Mar-08 04:30 UTC
[Puppet Users] Different behavior for pluginsync between "puppet agent --test" and "service puppet start"
I''ve got 3 custom facts configured within a couple of modules and am
using
pluginsync to sync them to the clients. My clients are CentOS 5.7.
If I run "puppet agent --test -v", I get the following output and the
custom facts get loaded and I can use those facts in my module classes:
info: Loading downloaded plugin /var/lib/puppet/lib/facter/oraclehome.rb
info: Loading downloaded plugin /var/lib/puppet/lib/facter/qhostname.rb
info: Loading downloaded plugin /var/lib/puppet/lib/facter/oracleversion.rb
info: Loading facts in /var/lib/puppet/lib/facter/oraclehome.rb
info: Loading facts in /var/lib/puppet/lib/facter/qhostname.rb
info: Loading facts in /var/lib/puppet/lib/facter/oracleversion.rb
<I then see the class that uses those custom facts run as expected -
I''m
basically starting the Oracle listener if it''s not running after
adjusting
some config files>
If I start the puppet agent as a service "service puppet start", I see
the
following in my log file:
Mar 7 22:24:29 ip-10-224-26-239 puppet-agent[4676]: Starting Puppet client
version 2.7.11
Mar 7 22:24:36 ip-10-224-26-239 puppet-agent[4676]:
(/Stage[main]/Oracle_listener::Start/Exec[listener_start]/returns) change
from notrun to 0 failed: Could not find command ''/bin/lsnrctl''
The class that I''m running is as follows:
class oracle_listener::start {
$oraclehome = $::oraclehome
exec { "listener_start":
path => "/sbin:/bin:/usr/sbin:/usr/bin",
command => "${oraclehome}/bin/lsnrctl start
&>/dev/null",
user => "oracle",
onlyif => "pgrep tnslsnr | wc -l",
}
}
Stop the puppet agent service and running "puppet agent --test -v"
executes
the classes using the custom facts as expected.
I did a ton of searching on this and found what looked like a couple of
similar issues, but the resolutions didn''t seem to match my exact
scenario.
Can anybody see what I might be doing wrong or have I hit a bug?
Thanks!
-- jeremy
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.
