The docs explain that includes are postfixed for various reasons (not very good ones). In cfengine 3 which I am busy working on now, this problem will go away for good.
M Cammarata, James wrote: > Thanks, testing in our lab does show that this fixes the issue. We'll > update our configs and run with it. > > My primary question is, why? How are cfengine configs processed? We > assumed that they're processed in place, so that when cf.copy is > processed, it hits the import statements and processes those in place. > Obviously, this is not the case otherwise things would have continued to > work as they are currently setup. > > > James Cammarata > Savvis Hosting SysAdmin > AMEX Dedicated Help Desk > Office: (314) 628-7914 > Toll Free: (888) 606-6776 > > > -----Original Message----- > From: Mark Burgess [mailto:[EMAIL PROTECTED] > Sent: Friday, May 02, 2008 3:07 PM > To: Cammarata, James > Cc: [email protected] > Subject: Re: Shellcommands not executing when copy files are imported > > > I hope so! > > Good luck > M > > Cammarata, James wrote: >> Ok, so for every class in our cf.shellcommands file we need to append >> that to the "AddInstallable = ()" list in cf.control and we should be >> good to go? >> >> >> James Cammarata >> >> >> -----Original Message----- >> From: Mark Burgess [mailto:[EMAIL PROTECTED] >> Sent: Friday, May 02, 2008 3:02 PM >> To: Cammarata, James >> Cc: [email protected] >> Subject: Re: Shellcommands not executing when copy files are imported >> >> >> Make sure that you have registered all of these classes in the main >> cfagent.conf with AddIstallables. >> >> Splitting into 2 files should not make a difference, but the >> definition of ordering might change when you split files. >> >> M >> >> Cammarata, James wrote: >>> Hi, we've been experiencing a bug lately whereby shell commands are >> not >>> executing correctly. We have tracked the problem down to the fact >> that >>> we split out our copies into many different files, which are imported >> by >>> cf.copy. >>> >>> We are running CFEngine 2.2.3 on RHEL 4.2. >>> >>> Example: >>> >>> ################################################### >>> # >>> # BEGIN cf.copy >>> # >>> ### >>> import: >>> any:: >>> /data01/cfengine/inputs/copy.d/copy.hosts >>> /data01/cfengine/inputs/copy.d/copy.ntp.conf >>> ... >>> >>> copy: >>> ... >>> >>> ################################################### >>> >>> $ cat copy.d/copy.hosts >>> # /etc/hosts >>> copy: >>> >>> (group_c.group_a).group_b:: >>> $(filestore)/hosts dest=/etc/hosts >>> mode=444 o=root g=root type=checksum >>> server=$(policyhost) >>> >>> ################################################### >>> >>> $ cat copy.d/copy.ntp.conf >>> # /etc/ntp.conf >>> copy: >>> >>> linux:: >>> $(filestore)/ntp.conf dest=/etc/ntp.conf >>> mode=444 o=root g=root type=checksum >>> server=$(policyhost) >>> define=ntp_restart >>> >>> ################################################### >>> >>> For certain files (like the ntp.conf above) we would like to restart >>> ntpd afterwards. Now, this was working fine before we started >> splitting >>> files out into separate imports, but it's not working now. If we > move >>> the class definition for the ntp.conf back into the main cf.copy, >> things >>> work perfectly. >>> >>> We have a very large environment, with dozens of managed files, so we >>> would really like to stick with this method of splitting out files > and >>> importing them, but these issues are really starting to cause >> problems. >>> Has anyone seen this before? Has anyone reported this bug before? >>> >>> Thanks, >>> >>> >>> James Cammarata >>> >>> > ______________________________________________________________________ >>> This message contains information which may be confidential and/or >> privileged. Unless you are the intended recipient (or authorized to >> receive for the intended recipient), you may not read, use, copy or >> disclose to anyone the message or any information contained in the >> message. If you have received the message in error, please advise the >> sender by reply e-mail and delete the message and any attachment(s) >> thereto without retaining any copies. > ______________________________________________________________________ >>> _______________________________________________ >>> Bug-cfengine mailing list >>> [email protected] >>> https://cfengine.org/mailman/listinfo/bug-cfengine > -- Mark Burgess Web: http://www.iu.hio.no/~mark Tlf: +47 22453272 _______________________________________________ Bug-cfengine mailing list [email protected] https://cfengine.org/mailman/listinfo/bug-cfengine
