[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: copy failover
From: |
Wipf, Stefan |
Subject: |
Re: copy failover |
Date: |
Tue, 11 Feb 2003 10:46:55 -0600 |
Sorry, my response is to a slightly different problem. Looks like
your config should work just fine. Did you run cfengine in verbose
or debug mode to see if the 'myretry' class gets turned on?
Stefan Wipf wrote:
>
> You will need a second copy statement in your actionsequence, because
> by the time your failover class gets turned on cfengine has already
> moved to the next action.
>
> This has worked for us:
>
> strategies:
> { load_balance
> _update_attempt1: "5"
> _update_attempt2: "5"
> }
>
> control:
> server1 = ( host1 )
> server2 = ( host2 )
> server3 = ( host3 )
> addinstallable = ( _update_attempt1 _update_attempt2
> _update_failed1 _update_failed2 _update_failed )
> actionsequence = ( copy copy )
>
> copy:
>
> _update_attempt1::
> /FILE dest=/FILE server=$(server1)
> failover=_update_attempt2:_update_failed1
>
> _update_attempt2::
> /FILE dest=FILE server=$(server2)
> failover=_update_attempt1:_update_failed2
>
> ### final attempt
> _update_failed1._update_failed2::
> /FILE dest=FILE server=$(server3)
> failover=_update_failed
>
> Jeffrey Koetsier wrote:
> >
> > Hi All,
> >
> > The last few hours i've been poking around with a simple filecopy and
> > some sort of redundancy.
> >
> > I want to copy FILEA to /etc/FILENAME, if this FILEA doesn't exists it
> > should go run another class to copy FILEB to /etc/FILENAME.
> >
> > ie:
> >
> > copy:
> > myfile::
> > /cfengine/files/FILEA dest=/etc/FILENAME mode=755 owner=root
> > group=root server=$(fileserver) failover=myretry
> >
> > myretry::
> > /cfengine/files/FILEB dest=/etc/FILENAME mode=755 owner=root
> > group=root server=$(fileserver)
> >
> > instead of failover=myretry I tried define=myretry or
> > elsedefine=myretry. But none of them work.
> >
> > This is what I see on my fileserver side:
> >
> > box: Couldn't stat filename /cfengine/files/FILEA from host box2
> > box: lstatbox: Host authorization/authentication failed or access denied
> >
> > Which is ok, but it doesn't continue with the myretry class.
> >
> > Any ideas how to solve this within CFEngine instead of using shellscript
> > thingies?
> >
> > Thanks
> >
> > _______________________________________________
> > Help-cfengine mailing list
> > Help-cfengine@gnu.org
> > http://mail.gnu.org/mailman/listinfo/help-cfengine
>
> --
> Stefan Wipf
> swipf@htc.com
--
Stefan Wipf
swipf@htc.com