Forum: Cfengine Help
Subject: Linux (Redhat, etc.) bonded network interfaces
Author: davidlee
Link to topic: https://cfengine.com/forum/read.php?3,22369,22369#msg-22369

(Currently running 3.1.4 but could easily migrate to 3.1.5)

We intend to set up Linux bonded network interfaces on a range of different 
machines.  (For these purposes, assume recent Redhat releases, although when I 
come to writing the cfengine stuff I'll be trying to structure it, if 
reasonably possible, to allow for other OSes in future.)

For a simple Redhat network interface, I think I know the sort of thing I need 
to do for adjusting typical, and independent, 
"/etc/sysconfig/network-scripts/ifcg-eth*" files (although it's nearly two 
years ago since I was last doing this, and then it was under version 2 of 
cengine.)

But how might this extend to layering bonded, dependent interfaces?  Across our 
range of machines, different machines might have different numbers, and names, 
of "ifcfg-eth*" components in a bond; there might also be different numbers of 
bonded interfaces in different machines.  For example:

machine1: bond0={eth0,eth1}
machine2: bond0={eth2,eth3}; bond1={eth4,eth5,eth6,eth7}

How might one translate this generality of configuration into cfengine-speak?  
Almost certainly it will need some associative arrays (of which I have 
absolutely no experience), and then use these arrays (which will look quite 
different in the example machines (or classes) given above).

My top-level starting point might be something like:
   
vars:
      class1::
         "bonds" slist => { "bond0" };
         # but then what?
      class2::
         "bonds" slist => {"bond0", "bond1" };
         # but then what?



and I'll then need various lower-levels (my "but then what?" comment possibly 
being the next one down, etc.).

An outline sketch of bundles would be useful.  Is there an example somewhere?

(And if it is currently (3.1.4; 3.1.5) awkward, but there are plans to address 
it in a future release, then an indication of this would be useful.)

Thanks in advance.

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to