-------- Original Message  --------
Subject: [smf-discuss] Multi-instance manifest and service
From: Nicolas Dorfsman <n...@unikservice.com>
To: smf-discuss at opensolaris.org
Date: Mon Dec 03 2007 09:08:04 GMT+0100 (CET)

>       Hi,
> 
>       I'm working on manifest and start/stop method for websphere and other  
> applications.
> 
>       I started with Albert Leigh Manifest 
> (http://blogs.sun.com/sunabl/entry/a_service_manifest_for_websphere 
> ), but I'd prefer to have a multi-instance manifest.
>       Does anybody know a running example of multi-instance manifest ?  

Eg. /var/svc/manifest/application/database/postgresql.xml

> 
>       Concerning methods, many manifests declares method for start, method  
> for stop and method for resfresh with the same script and start, stop  
> or restart as argument. I hate this. Is there any way to declare multi- 
> usage script, something like :
> 

No - the svc.startd(1M) man page is clear :

   SERVICE DEFINITION
      When  developing  or  configuring  a  service   managed   by
      svc.startd,  a  common  set of properties are used to affect
      the interaction between the service instance and the restar-
      ter.

      Methods

      The general form of methods for the fork/exec model provided
      by  svc.startd are presented in smf_method(5). The following
      methods are supported as required or  optional  by  services
      managed by svc.startd.

      refresh    Reload any appropriate  configuration  parameters
                 from  the  repository  or  config  file,  without
                 interrupting service. This is  often  implemented
                 using  SIGHUP  for system daemons. If the service
                 is  unable  to  recognize  configuration  changes
                 without a restart, no refresh method is provided.

                 This method is optional.

      start      Start the service. Return success only after  the
                 application  is available to consumers. Fail if a
                 conflicting instance is already  running,  or  if
                 the service is unable to start.

                 This method is required.

      stop       Stop the service. In some cases, the stop  method
                 can  be  invoked  when some or all of the service
                 has already been stopped. Only return an error if
                 the  service  is  not  entirely stopped on method
                 return.

                 This method is required.

      If the service does  not  need  to  take  any  action  in  a
      required  method,  it  must specify the :true token for that
      method.

      svc.startd honors any method context specified for the  ser-
      vice  or  any  specific  method. The method expansion tokens
      described in smf_method(5) are  available  for  use  in  all
      methods invoked by svc.startd.

-- Renaud

Reply via email to