Executive Summary: Each host grabs its own information from a database at 
random a couple times a day. However, we can force any host to update at any 
time, if needed.

A Bit More Detail: I want every system to run a specific command (with a class 
defined as a result) that retrieves information about the system from a remote 
database. I want this to run 2-3 times per day, but I don't care when during 
the day as long as it's likely to be reasonably spread out. This is to prevent 
lots of simultaneous connections to the database (not a problem for the 
database, just a philosophical approach of mine). Thus, the dist class 
"operator" seems the best fit.

http://www.cfengine.org/manuals/cf3-reference.html#dist-in-classes

Additionally, I want to be able to force any system to evaluate the promise at 
any time if an admin makes a change about a system in the database and wants 
that information immediately available to the system. That's done through the 
use of an external file. If the file exists, a promise of the same name is 
created, the file is deleted, and the promise is evaluated.

Hopefully that clarifies it. :)

Justin

P.S. Our "asset" command is a script that hits our Asset Tracker web interface 
with a crafted AJAX URL. That's the remote database front end.

-----Original Message-----
From: nwat...@symcor.com [mailto:nwat...@symcor.com] 
Sent: Wednesday, March 10, 2010 6:01 AM
To: Justin Lloyd
Cc: help-cfengine@cfengine.org; help-cfengine-boun...@cfengine.org
Subject: Re: Evaluating a promise occasionally

I found that difficult to understand.  Perhaps you can simplify it? 
Assuming I've understood some of it then a module might be good way to go. 
 Have the module script run at interval, 12 hours, and return a class 
based on results.  Another option is to use Cfengine's file server ability 
to have the client download files from a peer server. 

If you want the option to run the promise outside of the 12 hour lock then 
you can run the agent using -Kb to run the bundle without locking. Another 
way would be to define hard times but or with a custom class: Hr12|runme:: 
then define the runme class at run time.

Sincerely,
--
Neil Watson
416-673-3465

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

Reply via email to