This sounds like a bug. Justin Lloyd wrote: > This is just an FYI post, so feel free to ignore my rambling if you're > not interested in some slightly deeper mechanics. :) > > So, I've learned something this morning. As I recall from reading, > Cfengine iterates its agent ordering (vars, classes, etc.) up to three > times. A close examination of verbose agent output shows this in lines > like "files in bundle dg (1)", etc. > > In further diagnosing an issue I'm having, I noticed that the > dist_percent class I created is evaluated during each such ordering > iteration, rather than once for each invocation of cf-agent as I had > originally thought. Thus, my promise that is conditional based upon the > existence of dist_percent_1 might be evaluated during the second > iteration, where dist_percent_1 might be true for any or none of the > three iterations of a given cf-agent invocation. So rather than my > original statement that cf-agent runs 288 times per day (12 times per > hour * 24 hours), the dist promise happens up to three times as often, > meaning the number of times dist_percent_1 being defined is not 1% of > 288 but 1% of 288*3, or 2.8*3 = 8-9 times per day. > > However, since the specific class promise I want evaluated only happens > during one of the three ordering iterations, the chances of > percent_dist_1 occurring during the iteration when the desired promise > would be evaluated would be 1/3rd of the total percent, bringing it back > down to the original 2-3 times per day. I only discuss this since it is > good to understand the actual mechanics of what is happening with dist > promises. > > On a related note, I had another question in my mind answered by verbose > output during my testing: > > nova> ========================================================= > nova> classes in bundle asset (3) > nova> ========================================================= > nova> > nova> > nova> + Private classes augmented: > nova> + dist_percent_99 > nova> + dist_percent > nova> + dist_percent_1 > nova> + fetched_asset_data > nova> + dg_runtime_gold > > As you can see, dist classes are NOT mutually exclusive, as the _1 and > _99 classes are both defined at the same time during this particular > iteration of the asset bundle. I wasn't sure from the documentation > whether this was the case, but this confirms it. The documentation does > state, however, that the base dist_percent class would always be > defined. > > Justin > > > -----Original Message----- > From: help-cfengine-boun...@cfengine.org > [mailto:help-cfengine-boun...@cfengine.org] On Behalf Of Justin Lloyd > Sent: Wednesday, March 10, 2010 10:02 AM > To: nwat...@symcor.com > Cc: help-cfengine@cfengine.org; help-cfengine-boun...@cfengine.org > Subject: RE: Evaluating a promise occasionally > > Now that I re-read the splayclass description in the morning when I'm > fresh and not in the evening when I'm worn out, I actually understand > it. For this specific case, however, it appears slightly too limited, > since I want the class defined 2-3 times per day. Splayclass can only > take "hourly" or "daily" as its second argument. > > At least now I know I can use it for other stuff in the future now that > I understand it. :) > > Thanks, > Justin > > -----Original Message----- > From: nwat...@symcor.com [mailto:nwat...@symcor.com] > Sent: Wednesday, March 10, 2010 9:58 AM > To: Justin Lloyd > Cc: help-cfengine@cfengine.org; help-cfengine-boun...@cfengine.org > Subject: RE: Evaluating a promise occasionally > > Splayclass? > > 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 > _______________________________________________ > Help-cfengine mailing list > Help-cfengine@cfengine.org > https://cfengine.org/mailman/listinfo/help-cfengine
-- Mark Burgess ------------------------------------------------- Professor of Network and System Administration Oslo University College, Norway Personal Web: http://www.iu.hio.no/~mark Office Telf : +47 22453272 ------------------------------------------------- _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine