Managing 'services' (daemons) in AIX Client

422 views
Skip to first unread message

M F Haris

unread,
Nov 12, 2009, 8:32:27 AM11/12/09
to puppet...@googlegroups.com
Dear all,
I want to manage services in my AIX node. I mean i can start/stop
service using
exec { command => "/etc/rc/blah-service start",} but i like this to be
done by puppet itself with its type reference 'service'.

has anyone manage the services on AIX machine ??? if yes, please share it!

PS: All services in my AIX nodes are located to different runlevels
(rc.something) .


Thanks

jcbollinger

unread,
Nov 12, 2009, 3:07:27 PM11/12/09
to Puppet Users
Puppet's Service resource is the right place to look among the built-
in resource types. Have you tried it? I haven't any AIX-specific
experience, but Puppet should be able to provide some level of
management. You could start with something like this:

service { "blah-service":
enable => true,
ensure => "running",
path => "/etc/rc", # might not be necessary
}

Some or all of these additional properties might be useful: hasstatus,
hasrestart, status, pattern. There are other knobs you could tweak,
too, but I recommend starting simple.

M F Haris

unread,
Nov 13, 2009, 4:04:08 AM11/13/09
to puppet...@googlegroups.com
jcbollinger schrieb:
Yes i tried to tweak with puppet resources, when i set
*ensure => running* and run puppet in debug mode
then puppet executes following command as;

/service/Manageservice[ssh]/Exec[sshd]: Executing '/etc/rc.d/init.d/sshd
/*running*/'

similarly, with* ensure => true*
it executes
/service/Manageservice[ssh]/Exec[sshd]: Executing '/etc/rc.d/init.d/sshd
/*true*/'

and therefore, failed to start the service because the my init script
takes either 'start' or 'stop' as argument.

unusual behavior! anyway i am looking in to it but if you guys got any
solution please share it.
regards

jcbollinger

unread,
Nov 13, 2009, 12:28:16 PM11/13/09
to Puppet Users


On Nov 13, 3:04 am, M F Haris <mfha...@fleetboard.com> wrote:
> Yes i tried to tweak with puppet resources, when i set
>  *ensure => running* and run puppet in debug mode
> then puppet executes following command as;
>
> /service/Manageservice[ssh]/Exec[sshd]: Executing '/etc/rc.d/init.d/sshd
> /*running*/'
>
> similarly, with* ensure => true*
>  it executes
> /service/Manageservice[ssh]/Exec[sshd]: Executing '/etc/rc.d/init.d/sshd
> /*true*/'
>
> and therefore, failed to start the service because the my init script
> takes either 'start' or 'stop' as argument.

It looks like puppet is falling back to its most basic level of
service support. There are two directions you can go from here:

1) Try to find a more featureful Service provider that your system
will support. See http://reductivelabs.com/trac/puppet/wiki/TypeReference#id287
for details of the available providers. To make your service use a
different provider, set its provider parameter; e.g.,
provider => "init"

2) Whether you find a better provider or stick with the one Puppet
chose for you, you can control the command Puppet uses to start /
stop / restart / check status via the "start", "stop", "restart", and
"status" parameters; e.g.,
start => "/etc/rc.d/ssh start"

Good luck,

John
Reply all
Reply to author
Forward
0 new messages