help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

action sequence ;)


From: Patryk Dawidziuk
Subject: action sequence ;)
Date: Fri, 16 Jan 2004 01:39:30 +0100
User-agent: Mutt/1.3.28i

Hi there. 
I have a strange problem with update.conf (in cf 2.1.0b5) . 

I did define actionsequence as follows:

actionsequence = ( resolve editfiles shellcommands copy tidy )

Correct me if I'm wrong, but it is not supposed to execute things in given 
order?
I mean at the beginning of all in my case, cfengine should ride over 
resolv.conf and fix it if there is a
problem, then edit files that I want him to, execute a command,  _then_ copy 
what I want and
at the end clean defined dirs? I'm asking, because it does not work in
my case. If I delete my resolv.conf or put enything in it f.e. DNS that
does not work, it says:

Looking for an input file ./update.conf
cf:cfengine::./update.conf:56: DNS lookup failure. Unknown host 

I know it could not find a host, as I said before, I put garbage in
resolv.conf. 
I removed 'resolve' from actionsequence and put simple statement that
edited my resolv.conf in editfiles, but it did not work either. 

Here's my update.conf I surely miss something obvious.


---

#
# update.conf, strike 2
#


control:

        # action 

        actionsequence  = ( resolve editfiles shellcommands copy tidy )

        # control, control [;

        domain          = ( domain.cf )
        policyhost      = ( my.fqdn.policy.host.cf )
        inputsdir       = ( /etc/cfengine/inputs )
        sysadm          = ( address@hidden )
        smtpservera     = ( my.smtp.server )
        SplayTime       = ( 5 )
        EmptyResolvConf = ( true ) 

resolve:

        (ip 1) 
        (ip 2)
        (ip 3)


editfiles:
                
        { /etc/default/ntp-servers

                BeginGroupIfNoSuchLine 'NTPSERVERS="ntp.task.gda.pl"'
                        EmptyEntireFilePlease
                        InsertLine 'NTPSERVERS="ntp.task.gda.pl"'
                EndGroup
                DefineClasses "DateSync"
        }

shellcommands:

        DateSync|Hr00::
                "/etc/init.d/ntpdate start" useshell="false"

copy:

        # local copy of passwd and shadow

        /etc/passwd dest=/var/backups/passwd mode=600
        /etc/shadow dest=/var/backups/shadow mode=600

        # and remote

        /etc/cfengine/cfagent.conf
                dest=/etc/cfengine/cfagent.conf
                mode=644
                server=$(policyhost)
                type=checksum
                backup=false
                encrypt=true
tidy:
        ( just like in docs)


There is some more files in copy:, I only mentioned one.

Now, I trash /etc/resolv.conf, removing all nameserver (ip) entries, and
leaving only 'domain mydomain.cf', to make sure resolve: would fix
things if there is anything wrong.

niobe:/etc/cfengine# cfagent --no-splay --info -v -f ./update.conf 

Reference time set to Fri Jan 16 00:29:46 2004

Job start time set to Fri Jan 16 00:29:46 2004

GNU Configuration Engine - 
2.1.0b5
Free Software Foundation 1994-
Donated by Mark Burgess, Faculty of Engineering,
Oslo University College, 0254 Oslo, Norway

------------------------------------------------------------------------

Host name is: niobe
Operating System Type is linux
Operating System Release is 2.4.23-1um
Architecture = i686


Using internal soft-class linux for host linux

The time is now Fri Jan 16 00:29:46 2004


------------------------------------------------------------------------

Additional hard class defined as: 32_bit
Additional hard class defined as: linux_2_4_23_1um
Additional hard class defined as: linux_i686
Additional hard class defined as: linux_i686_2_4_23_1um
Additional hard class defined as:
linux_i686_2_4_23_1um__1_Tue_Dec_30_11_28_41_PST_2003

GNU autoconf class from compile time: compiled_on_linux-gnu

Interface 1: lo
Interface 2: eth0
Sorry - there is no current standard way to find out my IPv6 address
(!!)

Unable to detect environment from cfenvd

cfengine:: No preconfiguration file

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
* (Changing context state to: main) *
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

---------------------------------------------------------------------
Loading persistent classes
---------------------------------------------------------------------

---------------------------------------------------------------------
Loaded persistent memory
---------------------------------------------------------------------


Unable to detect environment from cfenvd

Looking for an input file ./update.conf
cf:cfengine::./update.conf:56: DNS lookup failure. Unknown host 
Culprit: myhost.mydomain.cf
Make sure that fully qualified names can be looked up at your site!
i.e. www.gnu.org, not just www. If you use NIS or /etc/hosts
make sure that the full form is registered too as an alias!
gethostbyname: : Resource temporarily unavailable
niobe:/etc/cfengine# 

If I remove copy: statements, everything works just fine, resolv.conf
gets fixed, files get edited and so on.

56th line is where tidy: section begins.

myhosts in config files are FQDN, mydomain is set up ok.

System is UML woody, (tested also on Sarge and Woody - the same problem)


My point in such a configuration was to make sure that even with
resolv.conf trashed, my hosts may fix them and get back to life ;)
Of course after such a terrible loss ;) I still may log in and fix it by hand, 
but it should be done automagicaly.

Thanks for your help.

-- 

[ Patryk Dawidziuk | glut lanet.wroc.net                .......... ]
[ http://no.suid.pl                                     .......... ]
[ ..........                                            .......... ]

Attachment: pgpFB3pDuUYYd.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]