Revision 57fb6fcb
b/doc/install.rst | ||
---|---|---|
421 | 421 |
|
422 | 422 |
**Mandatory** on all nodes. |
423 | 423 |
|
424 |
You can run Ganeti either in "bridged mode" or in "routed mode". In
|
|
425 |
bridged mode, the default, the instances network interfaces will be
|
|
426 |
attached to a software bridge running in dom0. Xen by default creates
|
|
427 |
such a bridge at startup, but your distribution might have a different
|
|
428 |
way to do things, and you'll definitely need to manually set it up under
|
|
429 |
KVM. |
|
424 |
You can run Ganeti either in "bridged mode", "routed mode" or
|
|
425 |
"openvswitch mode". In bridged mode, the default, the instances network
|
|
426 |
interfaces will be attached to a software bridge running in dom0. Xen by
|
|
427 |
default creates such a bridge at startup, but your distribution might
|
|
428 |
have a different way to do things, and you'll definitely need to
|
|
429 |
manually set it up under KVM.
|
|
430 | 430 |
|
431 | 431 |
Beware that the default name Ganeti uses is ``xen-br0`` (which was used |
432 | 432 |
in Xen 2.0) while Xen 3.0 uses ``xenbr0`` by default. See the |
... | ... | |
449 | 449 |
instances, through their interface, in the table you specified (under |
450 | 450 |
KVM, and in the main table under Xen). |
451 | 451 |
|
452 |
Also for "openvswitch mode" under Xen a custom network script is needed. |
|
453 |
Under KVM everything should work, but you'll need to configure your |
|
454 |
switches outside of Ganeti (as for bridges). |
|
455 |
|
|
452 | 456 |
.. admonition:: Bridging issues with certain kernels |
453 | 457 |
|
454 | 458 |
Some kernel versions (e.g. 2.6.32) have an issue where the bridge |
b/htools/Ganeti/Types.hs | ||
---|---|---|
366 | 366 |
$(THH.declareSADT "NICMode" |
367 | 367 |
[ ("NMBridged", 'C.nicModeBridged) |
368 | 368 |
, ("NMRouted", 'C.nicModeRouted) |
369 |
, ("NMOvs", 'C.nicModeOvs) |
|
369 | 370 |
]) |
370 | 371 |
$(THH.makeJSONInstance ''NICMode) |
371 | 372 |
|
b/lib/cmdlib.py | ||
---|---|---|
13053 | 13053 |
raise errors.OpPrereqError("Cannot set the NIC IP address to None" |
13054 | 13054 |
" on a routed NIC", errors.ECODE_INVAL) |
13055 | 13055 |
|
13056 |
elif new_mode == constants.NIC_MODE_OVS: |
|
13057 |
# TODO: check OVS link |
|
13058 |
self.LogInfo("OVS links are currently not checked for correctness") |
|
13059 |
|
|
13056 | 13060 |
if constants.INIC_MAC in params: |
13057 | 13061 |
mac = params[constants.INIC_MAC] |
13058 | 13062 |
if mac is None: |
b/lib/constants.py | ||
---|---|---|
1068 | 1068 |
|
1069 | 1069 |
NIC_MODE_BRIDGED = "bridged" |
1070 | 1070 |
NIC_MODE_ROUTED = "routed" |
1071 |
NIC_MODE_OVS = "openvswitch" |
|
1071 | 1072 |
NIC_IP_POOL = "pool" |
1072 | 1073 |
|
1073 |
NIC_VALID_MODES = frozenset([NIC_MODE_BRIDGED, NIC_MODE_ROUTED]) |
|
1074 |
NIC_VALID_MODES = frozenset([NIC_MODE_BRIDGED, NIC_MODE_ROUTED, NIC_MODE_OVS])
|
|
1074 | 1075 |
|
1075 | 1076 |
RESERVE_ACTION = "reserve" |
1076 | 1077 |
RELEASE_ACTION = "release" |
b/man/ganeti-os-interface.rst | ||
---|---|---|
101 | 101 |
instance. |
102 | 102 |
|
103 | 103 |
NIC_%N_MODE |
104 |
The NIC mode, either routed or bridged
|
|
104 |
The NIC mode, routed, bridged or openvswitch
|
|
105 | 105 |
|
106 | 106 |
NIC_%N_BRIDGE |
107 | 107 |
The bridge to which this NIC will be attached. This variable is |
108 | 108 |
defined only when the NIC is in bridged mode. |
109 | 109 |
|
110 | 110 |
NIC_%N_LINK |
111 |
If the NIC is in bridged mode, this is the same as
|
|
112 |
``NIC_%N_BRIDGE``. If it is in routed mode, the routing table
|
|
113 |
which will be used by the hypervisor to insert the appropriate
|
|
114 |
routes. |
|
111 |
In bridged or openvswitch mode, this is the interface to which the
|
|
112 |
NIC will be attached (same as ``NIC_%N_BRIDGE`` for bridged). In
|
|
113 |
routed mode it is the routing table which will be used by the
|
|
114 |
hypervisor to insert the appropriate routes.
|
|
115 | 115 |
|
116 | 116 |
NIC_%N_FRONTEND_TYPE |
117 | 117 |
(Optional) If applicable, the type of the exported NIC to the |
b/man/gnt-backup.rst | ||
---|---|---|
121 | 121 |
the node expects the instance to use) |
122 | 122 |
|
123 | 123 |
mode |
124 |
specifies the connection mode for this nic: ``routed`` or
|
|
125 |
``bridged``.
|
|
124 |
specifies the connection mode for this nic: ``routed``,
|
|
125 |
``bridged`` or ``openvswitch``
|
|
126 | 126 |
|
127 | 127 |
link |
128 |
in bridged mode specifies the bridge to attach this NIC to, in
|
|
129 |
routed mode it's intended to differentiate between different
|
|
130 |
routing tables/instance groups (but the meaning is dependent on
|
|
131 |
the network script in use, see **gnt-cluster**(8) for more
|
|
132 |
details) |
|
128 |
in bridged and openvswitch mode specifies the interface to attach
|
|
129 |
this NIC to, in routed mode it's intended to differentiate between
|
|
130 |
different routing tables/instance groups (but the meaning is
|
|
131 |
dependent on the network script in use, see **gnt-cluster**(8) for
|
|
132 |
more details)
|
|
133 | 133 |
|
134 | 134 |
Of these ``mode`` and ``link`` are nic parameters, and inherit their |
135 | 135 |
default at cluster level. |
b/man/gnt-cluster.rst | ||
---|---|---|
363 | 363 |
list of key=value pairs with the following supported keys: |
364 | 364 |
|
365 | 365 |
mode |
366 |
The default nic mode, 'routed' or 'bridged'.
|
|
366 |
The default nic mode, 'routed', 'bridged' or 'openvswitch'.
|
|
367 | 367 |
|
368 | 368 |
link |
369 |
In bridged mode the default NIC bridge. In routed mode it |
|
370 |
represents an hypervisor-vif-script dependent value to allow |
|
371 |
different instance groups. For example under the KVM default |
|
372 |
network script it is interpreted as a routing table number or |
|
373 |
name. |
|
369 |
In bridged or openvswitch mode the default interface where to attach |
|
370 |
NICs. In routed mode it represents an hypervisor-vif-script |
|
371 |
dependent value to allow different instance groups. For example |
|
372 |
under the KVM default network script it is interpreted as a routing |
|
373 |
table number or name. Openvswitch support is also hypervisor |
|
374 |
dependent and currently works for the default KVM network script. |
|
375 |
Under Xen a custom network script must be provided. |
|
374 | 376 |
|
375 | 377 |
The ``-D (--disk-parameters)`` option allows you to set the default disk |
376 | 378 |
template parameters at cluster level. The format used for this option is |
b/man/gnt-instance.rst | ||
---|---|---|
103 | 103 |
the node expects the instance to use) |
104 | 104 |
|
105 | 105 |
mode |
106 |
specifies the connection mode for this nic: routed or bridged. |
|
106 |
specifies the connection mode for this nic: routed, bridged or |
|
107 |
openvswitch. |
|
107 | 108 |
|
108 | 109 |
link |
109 |
in bridged mode specifies the bridge to attach this NIC to, in |
|
110 |
routed mode it's intended to differentiate between different |
|
111 |
routing tables/instance groups (but the meaning is dependent on |
|
112 |
the network script, see gnt-cluster(8) for more details) |
|
110 |
in bridged or openvswitch mode specifies the interface to attach |
|
111 |
this NIC to, in routed mode it's intended to differentiate between |
|
112 |
different routing tables/instance groups (but the meaning is |
|
113 |
dependent on the network script, see gnt-cluster(8) for more |
|
114 |
details). Note that openvswitch support is also hypervisor |
|
115 |
dependent. |
|
113 | 116 |
|
114 | 117 |
|
115 | 118 |
Of these "mode" and "link" are nic parameters, and inherit their |
b/tools/kvm-ifup.in | ||
---|---|---|
47 | 47 |
|
48 | 48 |
# Connect the interface to the bridge |
49 | 49 |
brctl addif $BRIDGE $INTERFACE |
50 |
|
|
51 |
elif [ "$MODE" = "openvswitch" ]; then |
|
52 |
ovs-vsctl add-port ${LINK} $INTERFACE |
|
53 |
|
|
50 | 54 |
else |
51 | 55 |
ip link set $INTERFACE up |
52 | 56 |
|
... | ... | |
65 | 69 |
ip route replace $IP proto static dev $INTERFACE |
66 | 70 |
fi |
67 | 71 |
|
72 |
# Allow routing and arp proxying, or ndp proxying (IPv6) |
|
68 | 73 |
if [ -d "/proc/sys/net/ipv4/conf/$INTERFACE" ]; then |
69 | 74 |
echo 1 > /proc/sys/net/ipv4/conf/$INTERFACE/proxy_arp |
70 | 75 |
echo 1 > /proc/sys/net/ipv4/conf/$INTERFACE/forwarding |
Also available in: Unified diff