Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Morning,

I have a very odd issue with CFEngine 2.1.22.

I have two groups in cf.groups as below

 # devservers that need default sudoers
    group_default_sudoers = ( dev4_company_local 
                          dev5_company_local
                          dev6_company_local
                          dev7_company_local
                          dev8_company_local )



 # devservers that need db modified sudoers
    group_dbmod_sudoers = ( dev16_company_local )

And this is the nessessary lines from cf.main

actionsequence          = ( copy packages editfiles processes shellcommands tidy )

copy::
     group_default_sudoers::
    ${include_dir}/default_sudoers
            dest=/etc/sudoers
            owner=root
            group=root
            mode=440
            type=checksum
            backup=false

    group_dbmod_sudoers::
    ${include_dir}/dbmod_sudoers
            dest=/etc/sudoers
            owner=root
            group=root
            mode=440
            type=checksum
            backup=false

Now, the problem is, dev4,5,6 and 7 gets the new file instantly when I run cfagent on the clients, but dev8 and dev16 does not.

And I've been able to narrow down the problem to the "Defined Classes" with this command

cfagent -pv|grep Classes

And on all servers but dev8 and dev16 does the groups/classes show up (group_default_sudoers and group_dbmod_sudoers).

Anyone have any thoughts about this? I can't figure out how to get the classes defined and the configuration is identical.

Any hints or tips would be greatly appriciated, thanks.

Regards

share|improve this question
    
Did you try to run cfagent with the -d4 (expression eval debug) switch to see if it gives you any hint about the problem? –  Janne Pikkarainen Dec 19 '11 at 10:04
    
The output is of course very hard to parse, but I tried grep'ing for "sudo" and no match at all. The clients should get the updated groups and main files while running cfagent, and from what I can see they ain't updated so I suspect that might be main problem since that's what happens first of all. –  Lars Dec 19 '11 at 10:15
    
I just copied cf.main and cf.groups manually to dev16 and ran cfagent -v and now it works, very peculiar, I'll try to find out why it doesn't get copied and add a proper Answer. –  Lars Dec 19 '11 at 10:32
    
I found the answer, but can't make it an answer just yet 'couse of my reputation, but I'll add it within a few hours. –  Lars Dec 19 '11 at 10:57
add comment

1 Answer

up vote 1 down vote accepted

After realising the error was in that cf.main and cf.groups didn't get copied, I quickly understood something was wrong with the transfer of files and after comparing update.conf I found the error instantly, I changed update.conf on dev8 and dev16 and everything worked instantly.

This is what I think was the error, this did not exist on the faulty clients.

copy:
    $(master_cfinput)/ dest=$(local_cfinput)
    r=inf mode=600
    trustkey=true
    type=checksum
    ignore=cfservd.conf
    ignore=cfrun.hosts
    server=$(policyhost)

And in that folder was the two files, voilá!

share|improve this answer
    
+1 for using cfenigne2 (as I´m still doing ) –  ThorstenS Dec 20 '11 at 7:38
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.