help-cfengine
[Top][All Lists]
Advanced

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

Re: copy w/failover clarification


From: christian pearce
Subject: Re: copy w/failover clarification
Date: Fri, 23 Dec 2005 14:29:46 -0500

Jason,

The following is an example of the failover in action.  Yes you can
have multiple failovers.

I would like to see the ability to define mutiple servers.  Alas I
think will have to wait for Cfengine 3.

pearcec@wideload:/var/tmp$ cat copy-test.cf
control:

    actionsequence = ( copy )

    AddInstallable = ( failed1 failed2 broken )

copy:

    any::
        /var/tmp/test
            dest=/var/tmp/test
            server=192.168.1.2
            failover=failed1

    failed1::
        /var/tmp/test
            dest=/var/tmp/test
            server=192.168.1.3
            failover=failed2

    failed2::
        /var/tmp/test
            dest=/var/tmp/test
            server=192.168.1.4
            failover=broken

alerts:

    broken::
        "Failed to copy configs"
pearcec@wideload:/var/tmp$ cfagent -f ./copy-test.cf  -I
cfengine:: Couldn't open a socket
cfengine:: Unable to establish connection with 192.168.1.2 (failover)
cfengine:: Couldn't open a socket
cfengine:: Unable to establish connection with 192.168.1.3 (failover)
cfengine:: Couldn't open a socket
cfengine:: Unable to establish connection with 192.168.1.4 (failover)
cfengine:: Failed to copy configs
pearcec@wideload:/var/tmp$


On 12/23/05, Jason Edgecombe <jedgecombe@carolina.rr.com> wrote:
> Hi,
>
> I have a question about the failover behavior of the copy command.
>
> In the docs, it says that failover= defines a class that is defined if
> the copy fails, not a backup server, is this correct?
>
> For example, would the following pseudocode work:
>
> any::
> copy file1 from server1 failover=failoverclass1
>
> failoverclass1::
>   copy file1 from server2 failover=failoverclass2
>
> failoverclass2::
>   copy from server3
>
> Would the above pseudocode would walk through a list of servers
> (server1, server2, server3)?
>
> I keep seeing people saying that failover only allows one backup server,
> which conflicts with my understanding of the failover functionailty.
> Which is the correct interpretation?
>
> Sincerely,
> Jason
>
>
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-cfengine
>


--
Christian Pearce




reply via email to

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