Re: [Puppet Users] Bind9 Ubuntu Lucid

2011-09-01 Thread Martijn Grendelman
Hi,

I have this:

service { bind9:
ensure = running,
hasrestart = true,
pattern = named,
require = Package[bind9],
}

because the process is called 'named'.

Best regards,
Martijn Grendelman




On 31-08-11 22:56, Russell Van Tassell wrote:
 Just a couple odd questions... does the status return 0 or 1 when bind is
 running? If the process table is used, would you need a name parameter
 to differentiate the name versus the process name? And, what version of
 puppet? You might need a hasstatus in there, as well?
 
 Ref: http://docs.puppetlabs.com/references/stable/type.html#service
 
 
 
 On Wed, Aug 31, 2011 at 1:43 PM, Craig White craig.wh...@ttiltd.com
 mailto:craig.wh...@ttiltd.com wrote:
 
 Seems that every cycle, puppet thinks that bind9 service is stopped
 and wants to restart...
 
 info: Applying configuration version '1314822598'
 notice: /Stage[main]/Bind::Service/Service[bind9]/ensure: ensure
 changed 'stopped' to 'running'
 notice: Finished catalog run in 3.70 seconds
 
 But it's running and from the logs, puppet doesn't appear to have any
 impact at all (bind9 was running, continues to run and is not
 restarted by the puppet cycle).
 
 # /etc/init.d/bind9 status
  * bind9 is running
 
 # update-rc.d -n bind9 defaults
  System start/stop links for /etc/init.d/bind9 already exist.
 
 # ps aux | grep `cat /var/run/named/named.pid`|grep -v grep
 bind 21856  0.0  0.2 326644 39664 ?Ssl  Aug26   0:17
 /usr/sbin/named -u bind
 
 Extremely simple class...
 class bind::service {
  service { bind9:
ensure = running,
require = Class[bind::install],
  }
 }
 
 ???
 
 --
 Craig White ~
 craig.wh...@ttiltd.com mailto:craig.wh...@ttiltd.com
 1.800.869.6908
 tel:1.800.869.6908 ~~
 www.ttiassessments.com http://www.ttiassessments.com
 
 Need help communicating between generations at work to achieve your
 desired success? Let us help!
 
 --
 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
 mailto:puppet-users@googlegroups.com.
 To unsubscribe from this group, send email to
 puppet-users+unsubscr...@googlegroups.com
 mailto:puppet-users%2bunsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/puppet-users?hl=en.
 
 
 -- 
 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+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/puppet-users?hl=en.

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Bind9 Ubuntu Lucid

2011-08-31 Thread Craig White
Seems that every cycle, puppet thinks that bind9 service is stopped and wants 
to restart...

info: Applying configuration version '1314822598'
notice: /Stage[main]/Bind::Service/Service[bind9]/ensure: ensure changed 
'stopped' to 'running'
notice: Finished catalog run in 3.70 seconds

But it's running and from the logs, puppet doesn't appear to have any impact at 
all (bind9 was running, continues to run and is not restarted by the puppet 
cycle).

# /etc/init.d/bind9 status
 * bind9 is running

# update-rc.d -n bind9 defaults
 System start/stop links for /etc/init.d/bind9 already exist.

# ps aux | grep `cat /var/run/named/named.pid`|grep -v grep
bind 21856  0.0  0.2 326644 39664 ?Ssl  Aug26   0:17 
/usr/sbin/named -u bind

Extremely simple class...
class bind::service {
  service { bind9:
ensure = running,
require = Class[bind::install],
  }
}

???

-- 
Craig White ~ craig.wh...@ttiltd.com
1.800.869.6908 ~~ www.ttiassessments.com 

Need help communicating between generations at work to achieve your desired 
success? Let us help!

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Bind9 Ubuntu Lucid

2011-08-31 Thread David Nalley
On Wed, Aug 31, 2011 at 4:43 PM, Craig White craig.wh...@ttiltd.com wrote:
 Seems that every cycle, puppet thinks that bind9 service is stopped and wants 
 to restart...

 info: Applying configuration version '1314822598'
 notice: /Stage[main]/Bind::Service/Service[bind9]/ensure: ensure changed 
 'stopped' to 'running'
 notice: Finished catalog run in 3.70 seconds

 But it's running and from the logs, puppet doesn't appear to have any impact 
 at all (bind9 was running, continues to run and is not restarted by the 
 puppet cycle).

 # /etc/init.d/bind9 status
  * bind9 is running

 # update-rc.d -n bind9 defaults
  System start/stop links for /etc/init.d/bind9 already exist.

 # ps aux | grep `cat /var/run/named/named.pid`|grep -v grep
 bind     21856  0.0  0.2 326644 39664 ?        Ssl  Aug26   0:17 
 /usr/sbin/named -u bind

 Extremely simple class...
 class bind::service {
  service { bind9:
    ensure = running,
    require = Class[bind::install],
  }
 }

 ???



I think the issue is that you need to have hasstatus in your service
definition. Otherwise puppet will think that it can't check to see if
it's running.

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Bind9 Ubuntu Lucid

2011-08-31 Thread Steven VanDevender
Craig White writes:
  Seems that every cycle, puppet thinks that bind9 service is stopped and 
  wants to restart...
  
  info: Applying configuration version '1314822598'
  notice: /Stage[main]/Bind::Service/Service[bind9]/ensure: ensure changed 
  'stopped' to 'running'
  notice: Finished catalog run in 3.70 seconds
  
  But it's running and from the logs, puppet doesn't appear to have any impact 
  at all (bind9 was running, continues to run and is not restarted by the 
  puppet cycle).
  
  # /etc/init.d/bind9 status
   * bind9 is running

What's the exit status of /etc/init.d/bind9 status?  That's what
Puppet is checking if hasstatus = true is set for the service
(usually the default).  Give the command echo $? immediately after
running that; if the value is not 0, then the init script is kind of
broken and you should set hasstatus = false for the service.

  # update-rc.d -n bind9 defaults
   System start/stop links for /etc/init.d/bind9 already exist.
  
  # ps aux | grep `cat /var/run/named/named.pid`|grep -v grep
  bind 21856  0.0  0.2 326644 39664 ?Ssl  Aug26   0:17 
  /usr/sbin/named -u bind
  
  Extremely simple class...
  class bind::service {
service { bind9:
  ensure = running,
  require = Class[bind::install],
}
  }
  
  ???
  
  -- 
  Craig White ~ craig.wh...@ttiltd.com
  1.800.869.6908 ~~ www.ttiassessments.com 

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Bind9 Ubuntu Lucid

2011-08-31 Thread Craig White

On Aug 31, 2011, at 1:55 PM, Steven VanDevender wrote:

 Craig White writes:
 Seems that every cycle, puppet thinks that bind9 service is stopped and 
 wants to restart...
 
 info: Applying configuration version '1314822598'
 notice: /Stage[main]/Bind::Service/Service[bind9]/ensure: ensure changed 
 'stopped' to 'running'
 notice: Finished catalog run in 3.70 seconds
 
 But it's running and from the logs, puppet doesn't appear to have any impact 
 at all (bind9 was running, continues to run and is not restarted by the 
 puppet cycle).
 
 # /etc/init.d/bind9 status
 * bind9 is running
 
 What's the exit status of /etc/init.d/bind9 status?  That's what
 Puppet is checking if hasstatus = true is set for the service
 (usually the default).  Give the command echo $? immediately after
 running that; if the value is not 0, then the init script is kind of
 broken and you should set hasstatus = false for the service.

# echo $?
0

Craig

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Bind9 Ubuntu Lucid

2011-08-31 Thread Craig White

On Aug 31, 2011, at 1:47 PM, David Nalley wrote:

 On Wed, Aug 31, 2011 at 4:43 PM, Craig White craig.wh...@ttiltd.com wrote:
 Seems that every cycle, puppet thinks that bind9 service is stopped and 
 wants to restart...
 
 info: Applying configuration version '1314822598'
 notice: /Stage[main]/Bind::Service/Service[bind9]/ensure: ensure changed 
 'stopped' to 'running'
 notice: Finished catalog run in 3.70 seconds
 
 But it's running and from the logs, puppet doesn't appear to have any impact 
 at all (bind9 was running, continues to run and is not restarted by the 
 puppet cycle).
 
 # /etc/init.d/bind9 status
  * bind9 is running
 
 # update-rc.d -n bind9 defaults
  System start/stop links for /etc/init.d/bind9 already exist.
 
 # ps aux | grep `cat /var/run/named/named.pid`|grep -v grep
 bind 21856  0.0  0.2 326644 39664 ?Ssl  Aug26   0:17 
 /usr/sbin/named -u bind
 
 Extremely simple class...
 class bind::service {
  service { bind9:
ensure = running,
require = Class[bind::install],
  }
 }
 
 ???
 
 
 
 I think the issue is that you need to have hasstatus in your service
 definition. Otherwise puppet will think that it can't check to see if
 it's running.

yes, that's what I get for not checking out other 'service.pp' files I have 
done in the past.

hasrestart = true,

is also useful  ;-)

Thanks

Craig

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Bind9 Ubuntu Lucid

2011-08-31 Thread Russell Van Tassell
Just a couple odd questions... does the status return 0 or 1 when bind is
running? If the process table is used, would you need a name parameter to
differentiate the name versus the process name? And, what version of puppet?
You might need a hasstatus in there, as well?

Ref: http://docs.puppetlabs.com/references/stable/type.html#service



On Wed, Aug 31, 2011 at 1:43 PM, Craig White craig.wh...@ttiltd.com wrote:

 Seems that every cycle, puppet thinks that bind9 service is stopped and
 wants to restart...

 info: Applying configuration version '1314822598'
 notice: /Stage[main]/Bind::Service/Service[bind9]/ensure: ensure changed
 'stopped' to 'running'
 notice: Finished catalog run in 3.70 seconds

 But it's running and from the logs, puppet doesn't appear to have any
 impact at all (bind9 was running, continues to run and is not restarted by
 the puppet cycle).

 # /etc/init.d/bind9 status
  * bind9 is running

 # update-rc.d -n bind9 defaults
  System start/stop links for /etc/init.d/bind9 already exist.

 # ps aux | grep `cat /var/run/named/named.pid`|grep -v grep
 bind 21856  0.0  0.2 326644 39664 ?Ssl  Aug26   0:17
 /usr/sbin/named -u bind

 Extremely simple class...
 class bind::service {
  service { bind9:
ensure = running,
require = Class[bind::install],
  }
 }

 ???

 --
 Craig White ~
 craig.wh...@ttiltd.com
 1.800.869.6908 ~~
 www.ttiassessments.com

 Need help communicating between generations at work to achieve your desired
 success? Let us help!

 --
 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+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/puppet-users?hl=en.



-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.