help-cfengine
[Top][All Lists]
Advanced

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

Réf. : Conditional variable declaration problem


From: paguerlais
Subject: Réf. : Conditional variable declaration problem
Date: Mon, 22 Nov 2004 08:30:39 +0100





Hi,

I don't see your actionsequence declaration in the excerpt you sent to the
list. Isn't your code something like :

<cut>
groups:

 masters = ( wotan zeus )
 slaves = ( loge prometheus )

control:

 masters:: domain = ( admin.example.org )
 slaves:: domain = ( example.org )

 actionsequence = ( ... )
</cut>


If it's the case, then you just forgot that a conditional part is valid
until the next condition or the next section. You should write :
<cut>
groups:

 masters = ( wotan zeus )
 slaves = ( loge prometheus )

control:

 masters:: domain = ( admin.example.org )
 slaves:: domain = ( example.org )
 any::
      actionsequence = ( ... )
 </cut>

 or (the one I prefer) :

 <cut>
 groups:

 masters = ( wotan zeus )
 slaves = ( loge prometheus )

control:

 masters:: domain = ( admin.example.org )
 slaves:: domain = ( example.org )

control:
   actionsequence = ( ... )
</cut>

I prefer the second form because (in my mind) it groups in different
section different actions : in the first control section you define
variables based on conditions, in the second one you define actions
unconditionnaly (does this word exist ?).

HIH
Patrice





Bruce Richardson <itsbruce@uklinux.net>@gnu.org le 21/11/2004 03:27:38

Veuillez répondre à itsbruce@uklinux.net

Envoyé par :      help-cfengine-bounces+paguerlais=airfrance.fr@gnu.org


Pour : help-cfengine@gnu.org
cc :

Objet :     Conditional variable declaration problem


According to the documentation, I should be able to define different
domains for different groups of machines like so:


groups:

 masters = ( wotan zeus )
 slaves = ( loge prometheus )

control:

 masters:: domain = ( admin.example.org )
 slaves:: domain = ( example.org )


In practice, however, this works for the slaves but fails (with an
"actionsequence empty" error) for the masters.  If I reverse the order
of the variable declarations then it works for the masters and fails for
the slaves.

What seems to be happening is this:  both variable declaration lines are
being acted on, with the declaration where the class is not valid
setting the variable to some kind of null value.  If the class for the
final declaration is valid, this doesn't matter, because a valid values
is set for domain.  If it is not valid, everything breaks.

Either I have misunderstood the documentation or this feature is
seriously broken.

--
Bruce

Remember you're a Womble.
_______________________________________________
Help-cfengine mailing list
Help-cfengine@gnu.org
http://lists.gnu.org/mailman/listinfo/help-cfengine






reply via email to

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