Using cfengine-3.1.4 community.

"processes" seems unnecessarily asymmetrical, and I don't understand why.

If I simply want to ensure a process is running, I can say something 
simple such as:

----------snip---------
bundle agent set_run_status(s){
...
   processes:
     any::
       "$(s)"
         restart_class => "svc_$(s)_restart";

   commands:
     linux::
      "/sbin/service $(s) restart"
        ifvarclass => "svc_$(s)_restart";
     solaris::
      "some-sort-of-service-start $(s)"
        ifvarclass => "svc_$(s)_restart";
     (...etc...)
...
}
----------snip---------

which has the effect: "if already running, do nothing, else restart it".

Fine.

Now suppose I want to ensure it is stopped, that is, the effect: "if 
already stopped do nothing, else stop it".  Shouldn't there be a roughly 
similar mechanism.  (I see a "process_stop", but this is aysmmetrical to 
the starting procedure in that it is defining a string, not a class, and 
that the call to stop it is done by some other (undefined) means, not 
through  "commands".

This lack of symmetry seems strange.  Why no "stop_class" (in parallel 
to "restart_class")?  Is there a rationale behind it?  Is that rationale 
documented?  How does the end-user achieve parallel-looking (and 
associated clarity) start and stop procedures?


-- 
: David Lee
: ECMWF (Data Handling System)
: Shinfield Park
: Reading  RG2 9AX
: Berkshire
:
: tel:    +44-118-9499 362
: email:  david....@ecmwf.int
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to