The 48 seconds is the complete time the agent needs for the catalog. Within the catalog you are running two commands:
spacewalk-channel -l and rhnreg. Please add both execution times when comparing. On 18 Jan 2015, at 08:29, Royee Tager <royee...@gmail.com> wrote: > Hi, > > If I run the following command manually (time /usr/sbin/rhnreg_ks -v > --serverUrl=http://spacewalk.example.com/XMLRPC > --activationkey=1-aab07306b6f673c367ebecae2aa55f22 --force --nohardware > --nopackages --novirtinfo --norhnsd -v), the runtime is 15 seconds. However, > if the command is performed via the exe resource the runtime is ~48 seconds. > > Why is the runtime via the exe resource longer? > > Is it possible shorten the runtime? > > class spacewalk::config inherits spacewalk { > > file { '/etc/yum/pluginconf.d/rhnplugin.conf': > > ensure => present, > > source => 'puppet:///modules/spacewalk/rhnplugin.conf', > > owner => root, > > group => root, > > mode => '0644', > > before => Exec['register-client'], > > } > > exec { 'register-client': > > command => "/usr/sbin/rhnreg_ks -v > --serverUrl=http://${::spacewalk::spacewalk_server_fqdn}/XMLRPC > --activationkey=${::spacewalk::activation_key} --force --nohardware > --nopackages --novirtinfo --norhnsd -v", > > require => Class['spacewalk::install'], > > unless => '/usr/sbin/spacewalk-channel -l', > > } > > } > > > > Info: /Stage[main]/Spacewalk/Spacewalk::Config/Exec[register-client]: > Starting to evaluate the resource > > Debug: Exec[register-client](provider=posix): Executing check > '/usr/sbin/spacewalk-channel -l' > > Debug: Executing '/usr/sbin/spacewalk-channel -l' > > Debug: /Stage[main]/Spacewalk/Spacewalk::Config/Exec[register-client]/unless: > Unable to locate SystemId file. Is this system registered? > > Debug: Exec[register-client](provider=posix): Executing '/usr/sbin/rhnreg_ks > --serverUrl=http://spacewalk.example.com/XMLRPC > --activationkey=1-aab07306b6f673c367ebecae2aa55f22 --force --nohardware > --nopackages --novirtinfo --norhnsd' > > Debug: Executing '/usr/sbin/rhnreg_ks > --serverUrl=http://spacewalk.example.com/XMLRPC > --activationkey=1-aab07306b6f673c367ebecae2aa55f22 --force --nohardware > --nopackages --novirtinfo --norhnsd' > > Notice: > /Stage[main]/Spacewalk/Spacewalk::Config/Exec[register-client]/returns: > executed successfully > > Debug: /Stage[main]/Spacewalk/Spacewalk::Config/Exec[register-client]: The > container Class[Spacewalk::Config] will propagate my refresh event > > Info: /Stage[main]/Spacewalk/Spacewalk::Config/Exec[register-client]: > Evaluated in 47.20 seconds > > > > Thank you in advance, > > > -- > 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+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/e7aa4d1b-3086-4705-ab83-65f2acf85714%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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/F54FF072-9664-4EAF-B356-1E6582333CEF%40gmail.com. For more options, visit https://groups.google.com/d/optout.