Afroz Hussain
2012-Mar-13 19:03 UTC
[Puppet Users] restarting the smf services on solaris 10
Hi, Is there any way to restart a service based on the status of the service using Puppet service resource? I want to check the status of the service first then disable it , and make sure that the service has disable successfully then start the service. Any help will be appreciated. Thanks in advance Afroz Hussain -- 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.
Mohamed Lrhazi
2012-Mar-13 20:59 UTC
Re: [Puppet Users] restarting the smf services on solaris 10
Maybe you could test setting the start command of that service explicitly to be: /usr/sbin/svcadm disable myservice && /usr/sbin/svcadm enable myservice http://docs.puppetlabs.com/references/stable/type.html#service Mohamed. On Tue, Mar 13, 2012 at 3:03 PM, Afroz Hussain <hussainaphroj@gmail.com> wrote:> Hi, > > Is there any way to restart a service based on the status of the > service using Puppet service resource? I want to check the status of > the service first then disable it , and make sure that the service has > disable successfully then start the service. > > Any help will be appreciated. > > Thanks in advance > Afroz Hussain > > -- > 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. >-- 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.
Afroz Hussain
2012-Mar-14 06:20 UTC
[Puppet Users] Re: restarting the smf services on solaris 10
Thanks a lot Mohamed but there is changes that after enabling/disabling the service, it may go to maintenance state.. how do we check the status of the service and take appropriate action accordingly. Thanks Afroz On Mar 14, 1:59 am, Mohamed Lrhazi <lrh...@gmail.com> wrote:> Maybe you could test setting the start command of that service > explicitly to be: > > /usr/sbin/svcadm disable myservice && /usr/sbin/svcadm enable myservice > > http://docs.puppetlabs.com/references/stable/type.html#service > > Mohamed. > > > > > > > > On Tue, Mar 13, 2012 at 3:03 PM, Afroz Hussain <hussainaph...@gmail.com> wrote: > > Hi, > > > Is there any way to restart a service based on the status of the > > service using Puppet service resource? I want to check the status of > > the service first then disable it , and make sure that the service has > > disable successfully then start the service. > > > Any help will be appreciated. > > > Thanks in advance > > Afroz Hussain > > > -- > > 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 athttp://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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
qutic development
2012-Mar-14 07:04 UTC
Re: [Puppet Users] restarting the smf services on solaris 10
Why would you like to do this? With the following service provider (as a sample)
openvpn would be restarted if the service is in a maintenance state (if
possible) or disabled. Or do I miss your point?
service { ''openvpn'':
ensure => running,
provider => smf,
enable => true,
require =>
File[''/var/svc/manifest/application/network/openvpn.xml''],
subscribe => File[''/etc/openvpn/server.conf''],
manifest =>
''/var/svc/manifest/application/network/openvpn.xml'',
}
HTH.
Am 13.03.2012 um 20:03 schrieb Afroz Hussain:
> Hi,
>
> Is there any way to restart a service based on the status of the
> service using Puppet service resource? I want to check the status of
> the service first then disable it , and make sure that the service has
> disable successfully then start the service.
>
> Any help will be appreciated.
>
> Thanks in advance
> Afroz Hussain
--
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.
Afroz Hussain
2012-Mar-14 19:21 UTC
[Puppet Users] Re: restarting the smf services on solaris 10
Thanks, It helps me a lot to solve my issue. On Mar 14, 12:04 pm, qutic development <mailingli...@qutic.com> wrote:> Why would you like to do this? With the following service provider (as a sample) openvpn would be restarted if the service is in a maintenance state (if possible) or disabled. Or do I miss your point? > > service { ''openvpn'': > ensure => running, > provider => smf, > enable => true, > require => File[''/var/svc/manifest/application/network/openvpn.xml''], > subscribe => File[''/etc/openvpn/server.conf''], > manifest => ''/var/svc/manifest/application/network/openvpn.xml'', > > } > > HTH. > > Am 13.03.2012 um 20:03 schrieb Afroz Hussain: > > > > > > > > > Hi, > > > Is there any way to restart a service based on the status of the > > service using Puppet service resource? I want to check the status of > > the service first then disable it , and make sure that the service has > > disable successfully then start the service. > > > Any help will be appreciated. > > > Thanks in advance > > Afroz Hussain-- 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.
smalderma
2012-Nov-01 19:15 UTC
Re: [Puppet Users] restarting the smf services on solaris 10
Sorry, I know this is an old posting, that I''m trying to resurrect. So I have a module for solaris similar to what''s described below for the system-log service. Basically when we load a server, system-log is already enabled with a stock /etc/syslog.conf file. Using the openvpn example below, I''ve noticed that when my module pushes a new syslog.conf file - say for remote logging - the puppet agent does not restart the smf service. Can that be forced? I thought the subscribe would make that happen. I have have hasrestart => true as well, but updating the file does not force the service to restart. Thanks. On Wednesday, March 14, 2012 3:04:48 AM UTC-4, jerry wrote:> > Why would you like to do this? With the following service provider (as a > sample) openvpn would be restarted if the service is in a maintenance state > (if possible) or disabled. Or do I miss your point? > > service { ''openvpn'': > ensure => running, > provider => smf, > enable => true, > require => File[''/var/svc/manifest/application/network/openvpn.xml''], > subscribe => File[''/etc/openvpn/server.conf''], > manifest => ''/var/svc/manifest/application/network/openvpn.xml'', > } > > HTH. > > Am 13.03.2012 um 20:03 schrieb Afroz Hussain: > > > Hi, > > > > Is there any way to restart a service based on the status of the > > service using Puppet service resource? I want to check the status of > > the service first then disable it , and make sure that the service has > > disable successfully then start the service. > > > > Any help will be appreciated. > > > > Thanks in advance > > Afroz Hussain > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/cuNEMiyo7n8J. 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.