I have been running cfengine3 (cf-execd and cf-serverd) under SMF for some
time now. My manifests are below.
One issue I have run into, is that SMF will put a service in maintenance
when either the service process dies, or one of it's child processes die.
As cf-agent run's as a child process to cf-execd, when it segfaults (which
it did under 3.0.2 occasionally), it would throw cf-execd into maintenance
state. This was annoying, and if anyone knows a way to make this not occur,
I would be very grateful!
# cf-serverd
<?xml version="1.0"?>
<!DOCTYPE service_bundle
SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<service_bundle type='manifest' name='ATWS:cf-serverd'>
<service
name='application/atws/cfengine/serverd'
type='service'
version='1'>
<create_default_instance enabled='false' />
<single_instance />
<exec_method
type='method'
name='start'
exec='/lib/svc/method/cf-serverd %m'
timeout_seconds='60'>
<method_context>
<method_credential user='root' />
</method_context>
</exec_method>
<exec_method
type='method'
name='restart'
exec='/lib/svc/method/cf-serverd %m'
timeout_seconds='60'>
<method_context>
<method_credential user='root' />
</method_context>
</exec_method>
<exec_method
type='method'
name='stop'
exec='/lib/svc/method/cf-serverd %m'
timeout_seconds='60'>
<method_context>
<method_credential user='root' />
</method_context>
</exec_method>
<property_group name='startd' type='framework'>
<propval name='duration' type='astring' value='contract' />
</property_group>
<template>
<common_name>
<loctext xml:lang='C'>
Cfengine server process
</loctext>
</common_name>
<documentation>
<doc_link name='Further information'
uri='http://www.cfengine.org/manuals/cf3-reference.html' />
</documentation>
</template>
</service>
</service_bundle>
# cf-execd.m
<?xml version="1.0"?>
<!DOCTYPE service_bundle
SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<service_bundle type='manifest' name='ATWS:cf-execd'>
<service
name='application/atws/cfengine/execd'
type='service'
version='1'>
<create_default_instance enabled='false' />
<single_instance />
<exec_method
type='method'
name='start'
exec='/lib/svc/method/cf-execd %m'
timeout_seconds='300'>
<method_context>
<method_credential user='root' />
</method_context>
</exec_method>
<exec_method
type='method'
name='restart'
exec='/lib/svc/method/cf-execd %m'
timeout_seconds='60'>
<method_context>
<method_credential user='root' />
</method_context>
</exec_method>
<exec_method
type='method'
name='stop'
exec='/lib/svc/method/cf-execd %m'
timeout_seconds='60'>
<method_context>
<method_credential user='root' />
</method_context>
</exec_method>
<property_group name='startd' type='framework'>
<propval name='duration' type='astring' value='contract' />
</property_group>
<template>
<common_name>
<loctext xml:lang='C'>
Cfengine agent scheduler
</loctext>
</common_name>
<documentation>
<doc_link name='Further information'
uri='http://www.cfengine.org/manuals/cf3-reference.html' />
</documentation>
</template>
</service>
</service_bundle>
On Apr 1, 2010 4:00am, Justin Lloyd <jll...@digitalglobe.com> wrote:
Since my pilot program is wrapping up and I'll start deploying to our
entire environment soon, I've finally gotten around to needing a Solaris
10 service since it doesn't ship with one, yet. I've adapted the files
Ryan provided long ago to Cfengine 3 and they seem to be working.
It's worth noting that the service only starts cf-execd since SMF only
monitors and manages the processes it starts. This makes Cfengine
something of a multi-layered service, since SMF ensures cf-execd is
running and, in turn, cf-execd ensures that cf-serverd (and cf-monitord
for those of us running Nova) is running. Kill any of those off and the
appropriate watcher (svc.startd or cf-execd) will restart them
accordingly.
I'd appreciate any critiques of the service files that would help make
them more robust. Feel free to use them at your own risk. :)
Justin
-----Original Message-----
From: Anderson, Ryan C (US SSA) [mailto:ryan.ander...@baesystems.com]
Sent: Wednesday, July 01, 2009 3:40 PM
To: Justin Lloyd; Robert Markula; help-cfengine@cfengine.org
Subject: RE: How do you start cfengine?
Attached is a manifest (cfservd.xml; svccfg import cfservd.xml) and
method (cfservd; copy to /lib/svc/method). Its cfengine 2 only, but it
is a good starting point for modifying it to work for cfengine 3.
RCA
--
UNIX Administrator, BAE Systems EIT
desk 763-572-6684 mobile 612-419-9362
-----Original Message-----
From: help-cfengine-bounces+ryan.anderson=baesystems....@cfengine.org
[mailto:help-cfengine-bounces+ryan.anderson=baesystems....@cfengine.org]
On Behalf Of Justin Lloyd
Sent: Wednesday, July 01, 2009 2:05 PM
To: Robert Markula; help-cfengine@cfengine.org
Subject: RE: How do you start cfengine?
Hi all,
I don't have an answer for Robert as we're not implementing cfengine
until starting sometime next month, most likely, but I wanted to ask a
similar question. Has anyone written a Solaris 10 service (ie manifest
and method files) for cfengine 2 and/or 3? It should be straightforward
but I'd hate to go about reinventing the wheel if there's anything good
already done.
Thanks,
Justin
-----Original Message-----
From: help-cfengine-bounces+jlloyd=digitalglobe....@cfengine.org
[mailto:help-cfengine-bounces+jlloyd=digitalglobe....@cfengine.org] On
Behalf Of Robert Markula
Sent: Wednesday, July 01, 2009 12:17 PM
To: help-cfengine@cfengine.org
Subject: How do you start cfengine?
Hey guys,
I'm quite new to cfengine (using cfengine3), and at the moment I'm
trying understand the principle on how to start cfengine on the server
and on the clients.
For the server, there are three daemons:
- cf-execd
- cf-monitord
- cf-serverd
And for the clients, there are two:
- cf-execd
- cf-monitord
Do you use some initscript to start these? Or do you just start cf-execd
which does the rest (what I imagine not to be a good idea, since the
daemons wouldn't gracefully terminate on shutdown)?
And can you give me an example of an initscript for cfengine3? I tried
to brew one myself, but I experience some oddities that I don't think to
be normal.
Cheers,
Robert
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine
This electronic communication and any attachments may contain
confidential and proprietary
information of DigitalGlobe, Inc. If you are not the intended recipient,
or an agent or employee
responsible for delivering this communication to the intended recipient,
or if you have received
this communication in error, please do not print, copy, retransmit,
disseminate or
otherwise use the information. Please indicate to the sender that you
have received this
communication in error, and delete the copy you received. DigitalGlobe
reserves the
right to monitor any electronic communication sent or received by its
employees, agents
or representatives.
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine