root / doc / design-openvswitch.rst @ 9110fb4a
History | View | Annotate | Download (5.1 kB)
1 | 3771161c | Sebastian Gebhard | ======================== |
---|---|---|---|
2 | 3771161c | Sebastian Gebhard | Support for Open vSwitch |
3 | 3771161c | Sebastian Gebhard | ======================== |
4 | 3771161c | Sebastian Gebhard | |
5 | 3771161c | Sebastian Gebhard | .. contents:: :depth: 3 |
6 | 3771161c | Sebastian Gebhard | |
7 | 3771161c | Sebastian Gebhard | This is a design document detailing the implementation of support for |
8 | 3771161c | Sebastian Gebhard | Open vSwitch in the Ganeti tool chain. |
9 | 3771161c | Sebastian Gebhard | |
10 | 3771161c | Sebastian Gebhard | Current state and shortcomings |
11 | 3771161c | Sebastian Gebhard | ============================== |
12 | 3771161c | Sebastian Gebhard | |
13 | 20029b6e | Sebastian Gebhard | At the moment Ganeti's support for Open vSwitch is very basic and |
14 | 3771161c | Sebastian Gebhard | limited to connecting instances to an existing vSwitch. |
15 | 3771161c | Sebastian Gebhard | |
16 | 3771161c | Sebastian Gebhard | The shortcomings of this approach are: |
17 | 3771161c | Sebastian Gebhard | |
18 | 3771161c | Sebastian Gebhard | 1. The full functionality (VLANs, QoS and trunking) of Open vSwitch is not used. |
19 | 3771161c | Sebastian Gebhard | |
20 | 3771161c | Sebastian Gebhard | 2. Open vSwitch cannot be managed centrally. |
21 | 3771161c | Sebastian Gebhard | |
22 | 3771161c | Sebastian Gebhard | Proposed changes |
23 | 3771161c | Sebastian Gebhard | ---------------- |
24 | 4ab6784a | Sebastian Gebhard | 1. Implement functions into gnt-cluster and gnt-node to manage Open vSwitch through Ganeti. |
25 | 4ab6784a | Sebastian Gebhard | It should be possible to create, modify and delete vSwitches. The resulting configuration |
26 | 4ab6784a | Sebastian Gebhard | shall automatically be done on all members of the node group, if possible. Connecting Ethernet |
27 | 4ab6784a | Sebastian Gebhard | devices to vSwitches should be managed through this interface as well. |
28 | 3771161c | Sebastian Gebhard | |
29 | 3771161c | Sebastian Gebhard | 2. Implement VLAN-capabilities: Instances shall have additional information for every NIC: VLAN-ID |
30 | 3771161c | Sebastian Gebhard | and port type. These are used to determine their type of connection to Open vSwitch. This will |
31 | 3771161c | Sebastian Gebhard | require modifying the methods for instance creation and modification |
32 | 3771161c | Sebastian Gebhard | |
33 | 20029b6e | Sebastian Gebhard | 3. Implement NIC bonding: Functions to bond NICs for performance improvement, load-balancing and |
34 | 20029b6e | Sebastian Gebhard | failover should be added. It is preferable to have a configuration option to determine the |
35 | 20029b6e | Sebastian Gebhard | type of the trunk, as there are different types of trunks (LACP dynamic and static, different |
36 | 3771161c | Sebastian Gebhard | failover and load-balancing mechanisms) |
37 | 3771161c | Sebastian Gebhard | |
38 | 20029b6e | Sebastian Gebhard | 4. Set QoS level on per instance basis: Instances shall have an additional information: maximum |
39 | 20029b6e | Sebastian Gebhard | bandwidth and maximum burst. This helps to balance the bandwidth needs between the VMs and to |
40 | 3771161c | Sebastian Gebhard | ensure fair sharing of the bandwidth. |
41 | 3771161c | Sebastian Gebhard | |
42 | 4ab6784a | Sebastian Gebhard | Automatic configuration of OpenvSwitches |
43 | 4ab6784a | Sebastian Gebhard | ++++++++++++++++++++++++++++++++++++++++ |
44 | 4ab6784a | Sebastian Gebhard | Ideally, the OpenvSwitch configuration should be done automatically. |
45 | 4ab6784a | Sebastian Gebhard | |
46 | 4ab6784a | Sebastian Gebhard | This needs to be done on node level, since each node can be individual and a setting on cluster / node group |
47 | 4ab6784a | Sebastian Gebhard | level would be too global is thus not wanted. |
48 | 4ab6784a | Sebastian Gebhard | |
49 | 4ab6784a | Sebastian Gebhard | The task that each node needs to do is: |
50 | 4ab6784a | Sebastian Gebhard | ``ovs-vsctl addbr <switchname>`` with <switchname> defaulting to constants.DEFAULT_OVS |
51 | 4ab6784a | Sebastian Gebhard | ``ovs-vsctl add-port <switchname> <ethernet device>`` optional: connection to the outside |
52 | 4ab6784a | Sebastian Gebhard | |
53 | 4ab6784a | Sebastian Gebhard | This will give us 2 parameters, that are needed for the OpenvSwitch Setup: |
54 | 4ab6784a | Sebastian Gebhard | switchname: Which will default to constants.DEFAULT_OVS when not given |
55 | 4ab6784a | Sebastian Gebhard | ethernet device: Which will default to None when not given, might be more than one (NIC bonding) |
56 | 4ab6784a | Sebastian Gebhard | |
57 | 4ab6784a | Sebastian Gebhard | These parameters should be set at node level for individuality, _but_ can have defined defaults on cluster |
58 | 4ab6784a | Sebastian Gebhard | and node group level, which can be inherited and thus allow a cluster or node group wide configuration. |
59 | 4ab6784a | Sebastian Gebhard | If a node is setup without parameters, it should use the settings from the parent node group or cluster. If none |
60 | 4ab6784a | Sebastian Gebhard | are given there, defaults should be used. |
61 | 4ab6784a | Sebastian Gebhard | |
62 | 4ab6784a | Sebastian Gebhard | As a first step, this will be implemented for using 1 ethernet device only. Functions for nic bonding will be added |
63 | 4ab6784a | Sebastian Gebhard | later on. |
64 | 4ab6784a | Sebastian Gebhard | |
65 | 20029b6e | Sebastian Gebhard | Configuration changes for VLANs |
66 | 20029b6e | Sebastian Gebhard | +++++++++++++++++++++++++++++++ |
67 | 20029b6e | Sebastian Gebhard | nicparams shall be extended by a value "vlan" that will store the VLAN information for each NIC. |
68 | 20029b6e | Sebastian Gebhard | This parameter will only be used if nicparams[constants.NIC_MODE] == constants.NIC_MODE_OVS, |
69 | 20029b6e | Sebastian Gebhard | since it doesn't make sense in other modes. |
70 | 20029b6e | Sebastian Gebhard | |
71 | 20029b6e | Sebastian Gebhard | Each VLAN the NIC belongs to shall be stored in this single value. The format of storing this information |
72 | 20029b6e | Sebastian Gebhard | is the same as the one which is used in Xen 4.3, since Xen 4.3 comes with functionality to support |
73 | 20029b6e | Sebastian Gebhard | OpenvSwitch. |
74 | 20029b6e | Sebastian Gebhard | |
75 | 20029b6e | Sebastian Gebhard | This parameter will, at first, only be implemented for Xen and will have no effects on other hypervisors. |
76 | 20029b6e | Sebastian Gebhard | Support for KVM will be added in the future. |
77 | 20029b6e | Sebastian Gebhard | |
78 | 20029b6e | Sebastian Gebhard | Example: |
79 | 20029b6e | Sebastian Gebhard | switch1 will connect the VM to the default VLAN of the switch1. |
80 | 20029b6e | Sebastian Gebhard | switch1.3 means that the VM is connected to an access port of VLAN 3. |
81 | 347db542 | Sebastian Gebhard | switch1.2:10:20 means that the VM is connected to a hybrid port on switch1, carrying VLANs 2 untagged and |
82 | 347db542 | Sebastian Gebhard | VLANs 10 and 20 tagged. |
83 | 347db542 | Sebastian Gebhard | switch1:44:55 means that the VM is connected to a trunk port on switch1, carrying VLANS 44 and 55 |
84 | 20029b6e | Sebastian Gebhard | |
85 | 347db542 | Sebastian Gebhard | This configuration string is split at the dot or colon respectively and stored in nicparams[constants.NIC_LINK] |
86 | 347db542 | Sebastian Gebhard | and nicparams[constants.NIC_VLAN] respectively. Dot or colon are stored as well in nicparams[constants.NIC_VLAN]. |
87 | 20029b6e | Sebastian Gebhard | |
88 | 20029b6e | Sebastian Gebhard | For Xen hypervisors, this information can be concatenated again and stored in the vif config as |
89 | 20029b6e | Sebastian Gebhard | the bridge parameter and will be fully compatible with vif-openvswitch as of Xen 4.3. |
90 | 20029b6e | Sebastian Gebhard | |
91 | 20029b6e | Sebastian Gebhard | Users of older Xen versions should be able to grab vif-openvswitch from the Xen repo and use it |
92 | 20029b6e | Sebastian Gebhard | (tested in 4.2). |
93 | 20029b6e | Sebastian Gebhard | |
94 | 20029b6e | Sebastian Gebhard | gnt-instance modify shall be able to add or remove single VLANs from the vlan string without users needing |
95 | 20029b6e | Sebastian Gebhard | to specify the complete new string. |
96 | 20029b6e | Sebastian Gebhard | |
97 | 4ab6784a | Sebastian Gebhard | NIC bonding |
98 | 4ab6784a | Sebastian Gebhard | +++++++++++ |
99 | 4ab6784a | Sebastian Gebhard | To be done |
100 | 4ab6784a | Sebastian Gebhard | |
101 | 20029b6e | Sebastian Gebhard | Configuration changes for QoS |
102 | 20029b6e | Sebastian Gebhard | +++++++++++++++++++++++++++++ |
103 | 3771161c | Sebastian Gebhard | Instances shall be extended with configuration options for |
104 | 3771161c | Sebastian Gebhard | |
105 | 3771161c | Sebastian Gebhard | - maximum bandwidth |
106 | 3771161c | Sebastian Gebhard | - maximum burst rate |
107 | 3771161c | Sebastian Gebhard | |
108 | 3771161c | Sebastian Gebhard | New configuration objects need to be created for the Open vSwitch configuration. |
109 | 3771161c | Sebastian Gebhard | |
110 | 3771161c | Sebastian Gebhard | All these configuration changes need to be made available on the whole node group. |
111 | 3771161c | Sebastian Gebhard | |
112 | 3771161c | Sebastian Gebhard | .. vim: set textwidth=72 : |
113 | 3771161c | Sebastian Gebhard | .. Local Variables: |
114 | 3771161c | Sebastian Gebhard | .. mode: rst |
115 | 3771161c | Sebastian Gebhard | .. fill-column: 72 |
116 | 3771161c | Sebastian Gebhard | .. End: |