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
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$
> _______________________________________________
> Help-cfengine mailing list
> Help-c...@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-cfengine
>
--
Christian Pearce
> 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.
Is that planned? That would be great!
With Cfengine 2 you can copy from server=server1:server2. The problem
with it is if the copy from server1 is successful then it moves ahead
and does another copy from server2. And if server1 isn't responsive
then it seems to hang rather than timing out. Works great if server1
refuses connection though. :)
> --
> Christian Pearce
--
Tod Oace <t...@quay.com>
--
Christian Pearce
> Ah so that does work, sort of. Yea I would like to have it continue
> past the second server if the first one suceeds. Do you see this
> behavior documented anywhere?
The reference manual does say that Cfengine iterates over the server
field ("Iterative expansion is currently restricted to:").T This
isn't how I first interpreted it though. When I saw you could put a
list of servers there I assumed it was for fail over. I still can't
think of an application for pulling something from multiple servers.
Anyone doing this? -Tod
> On 12/23/05, Tod Oace <t...@quay.com> wrote:
>> On Dec 23, 2005, at 11:29, christian pearce wrote:
>>
>>> 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.
>>
>> Is that planned? That would be great!
>>
>> With Cfengine 2 you can copy from server=server1:server2. The problem
>> with it is if the copy from server1 is successful then it moves ahead
>> and does another copy from server2. And if server1 isn't responsive
>> then it seems to hang rather than timing out. Works great if server1
>> refuses connection though. :)
>>
>>> --
>>> Christian Pearce
>>
>> --
>> Tod Oace <t...@quay.com>
>>
>>
>
>
> --
> Christian Pearce
--
Tod Oace <t...@quay.com>
Yes, I'm using this feature in order to collect some information from
all of my hosts. They all locally put a few files named after the local
host name, into /var/cfengine/collect/, and I then copy this directory
from several machines to a single one, recursively so as to finally
collect everything on the master server. Works quite nicely, actually.
Alex
--
Alexander Jolk * BUF Compagnie * al...@buf.com
Tel +33-1 42 68 18 28 * Fax +33-1 42 68 18 29