]> git.proxmox.com Git - mirror_ovs.git/blame - Documentation/topics/ovn-news-2.8.rst
Clean up some minor spelling and typos.
[mirror_ovs.git] / Documentation / topics / ovn-news-2.8.rst
CommitLineData
9e848936
BP
1..
2 Licensed under the Apache License, Version 2.0 (the "License"); you may
3 not use this file except in compliance with the License. You may obtain
4 a copy of the License at
5
6 http://www.apache.org/licenses/LICENSE-2.0
7
8 Unless required by applicable law or agreed to in writing, software
9 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
10 WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
11 License for the specific language governing permissions and limitations
12 under the License.
13
14 Convention for heading levels in Open vSwitch documentation:
15
16 ======= Heading 0 (reserved for the title in a document)
17 ------- Heading 1
18 ~~~~~~~ Heading 2
19 +++++++ Heading 3
20 ''''''' Heading 4
21
22 Avoid deeper levels because they do not render well.
23
24===============================
25What's New with OVS and OVN 2.8
26===============================
27
28This document is about what was added in Open vSwitch 2.8, which was released
29at the end of August 2017, concentrating on the new features in OVN. It also
30covers some of what is coming up in Open vSwitch and OVN 2.9, which is due to
31be released in February 2018. OVN has many features, and this document does
32not cover every new or enhanced feature (but contributions are welcome).
33
34This document assumes a basic familiarity with Open vSwitch, OVN, and their
35associated tools. For more information, please refer to the Open vSwitch and
36OVN documentation, such as the ``ovn-architecture``\(7) manpage.
37
38Debugging and Troubleshooting
39-----------------------------
40
41Before version 2.8, Open vSwitch command-line tools were far more painful to
42use than they needed to be. This section covers the improvements made to the
43CLI in the 2.8 release.
44
45User-Hostile UUIDs
46~~~~~~~~~~~~~~~~~~
47
48The OVN CLI, through ``ovn-nbctl``, ``ovn-nbctl``, and ``ovn-trace``, used
49full-length UUIDs almost everywhere. It didn't even provide any assistance
50with completion, etc., which in practice meant always cutting and pasting UUIDs
51from one command or window to another. This problem wasn't limited to the
52places where one would expect to have to see or use a UUID, either. In many
53places where one would expect to be able to use a network, router, or port
54name, a UUID was required instead. In many places where one would want to see
55a name, the UUID was displayed instead. More than anything else, these
56shortcomings made the CLI user-hostile.
57
58There was an underlying problem that the southbound database didn't actually
59contain all the information needed to provide a decent user interface. In some
60cases, for example, the human-friendly names that one would want to use for
61entities simply weren't part of the database. These names weren't necessary
62for correctness, only for usability.
63
64OVN 2.8 eased many of these problems. Most parts of the CLI now allow the user
65to abbreviate UUIDs, as long as the abbreviations are unique within the
66database. Some parts of the CLI where full-length UUIDs make output hard to
67read now abbreviate them themselves. Perhaps more importantly, in many places
68the OVN CLI now displays and accepts human-friendly names for networks,
69routers, ports, and other entities. In the places where the names were not
70previously available, OVN (through ``ovn-northd``) now copies the names into
71the southbound database.
72
73The CLIs for layers below OVN, at the OpenFlow and datapath layers with
74``ovs-ofctl`` and ``ovs-dpctl``, respectively, had some similar problems in
75which numbers were used for entities that had human-friendly names. Open
76vSwitch 2.8 also solves some of those problems. Other than that, the most
77notable enhancement in this area was the ``--no-stats`` option to ``ovs-ofctl
78dump-flows``, which made that command's output more readable for the cases
79where per-flow statistics were not interesting to the reader.
80
81Connections Between Levels
82~~~~~~~~~~~~~~~~~~~~~~~~~~
83
84OVN and Open vSwitch work almost like a stack of compilers: the OVN Neutron
85plugin translates Neutron configuration into OVN northbound configuration,
86which ``ovn-northd`` translates into logical flows, which ``ovn-controller``
87translates into OpenFlow flows, which ``ovs-vswitchd`` translates into datapath
88flows. For debugging and troubleshooting it is often necessary to understand
89exactly how these translations work. The relationship from a logical flow to
90its OpenFlow flows, or in the other direction, from an OpenFlow flow back to
91the logical flow that produced it, was often of particular interest, but OVN
92didn't provide good tools for the job.
93
94OVN 2.8 added some new features that ease these jobs. ``ovn-sbctl lflow-list``
95has a new option ``--ovs`` that lists the OpenFlow flows on a particular
96chassis that were generated from the logical flows that it lists.
97``ovn-trace`` also added a similar ``--ovs`` option that applies to the logical
98flows it traces.
99
100In the other direction, OVN 2.8 added a new utility ``ovn-detrace`` that, given
101an Open vSwitch trace of OpenFlow flows, annotates it with the logical flows
102that yielded those OpenFlow flows.
103
104Distributed Firewall
105~~~~~~~~~~~~~~~~~~~~
106
107OVN supports a distributed firewall with stateful connection tracking to ensure
108that only packets for established connections, or those that the configuration
109explicitly allows, can ingress a given VM or container. Neutron uses this
110feature by default. Most packets in an OpenStack environment pass through it
111twice, once after egress from the packet's source VM and once before ingress
112into its destination VM. Before OVN 2.8, the ``ovn-trace`` program, which
113shows the path of a packet through an OVN logical network, did not support the
114logical firewall, which in practice made it almost useless for Neutron.
115
116In OVN 2.8, ``ovn-trace`` adds support for the logical firewall. By default it
117assumes that packets are part of an established connection, which is usually
118what the user wants as part of the trace. It also accepts command-line options
119to override that assumption, which allows the user to discover the treatment of
120packets that the firewall should drop.
121
122At the next level deeper, prior to Open vSwitch 2.8, the OpenFlow tracing
123command ``ofproto/trace`` also supported neither the connection tracking
124feature underlying the OVN distributed firewall nor the "recirculation" feature
125that accompanied it. This meant that, even if the user tried to look deeper
126into the distributed firewall mechanism, he or she would encounter a further
127roadblock. Open vSwitch 2.8 added support for both of these features as well.
128
129Summary Display
130~~~~~~~~~~~~~~~
131
132``ovn-nbctl show`` and ``ovn-sbctl show``, for showing an overview of the OVN
133configuration, didn't show a lot of important information. OVN adds some more
134useful information here.
135
136DNS, and IPAM
137-------------
138
139OVN 2.8 adds a built-in DNS server designed for assigning names to VMs and
140containers within an OVN logical network. DNS names are assigned using records
141in the OVN northbound database and, like other OVN features, translated into
142logical flows at the OVN southbound layer. DNS requests directed to the OVN
143DNS server never leave the hypervisor from which the request is sent; instead,
144OVN processes and replies to the request from its ``ovn-controller`` local
145agent. The OVN DNS server is not a general-purpose DNS server and cannot be
146used for that purpose.
147
148OVN includes simple built-in support for IP address management (IPAM), in which
149OVN assigns IP addresses to VMs or containers from a pool or pools of IP
150addresses delegated to it by the administrator. Before OVN 2.8, OVN IPAM only
151supported IPv4 addresses; OVN 2.8 adds support for IPv6. OVN 2.8 also enhances
152the address pool support to allow specific addresses to be excluded. Neutron
153assigns IP addresses itself and does not use OVN IPAM.
154
155High Availability
156-----------------
157
158As a distributed system, in OVN a lot can go wrong. As OVN advances, it adds
159redundancy in places where currently a single failure could disrupt the
160functioning of the system as a whole. OVN 2.8 adds two new kinds of high
161availability.
162
163ovn-northd HA
164~~~~~~~~~~~~~
165
166The ``ovn-northd`` program sits between the OVN northbound and southbound
167databases and translates from a logical network configuration into logical
168flows. If ``ovn-northd`` itself or the host on which it runs fails, then
169updates to the OVN northbound configuration will not propagate to the
170hypervisors and the OVN configuration freezes in place until ``ovn-northd``
171restarts.
172
173OVN 2.8 adds support for active-backup HA to ``ovn-northd``. When more than
174one ``ovn-northd`` instance runs, it uses an OVSDB locking feature to
175automatically choose a single active instance. When that instance dies or
176becomes nonresponsive, the OVSDB server automatically choose one of the
177remaining instance(s) to take over.
178
179L3 Gateway HA
180~~~~~~~~~~~~~
181
182In OVN 2.8, multiple chassis may now be specified for L3 gateways. When more
183than one chassis is specified, OVN manages high availability for that gateway.
184Each hypervisor uses the BFD protocol to keep track of the gateway nodes that
185are currently up. At any given time, a hypervisor uses the highest-priority
186gateway node that is currently up.
187
188OVSDB
189-----
190
191The OVN architecture relies heavily on OVSDB, the Open vSwitch database, for
192hosting the northbound and southbound databases. OVSDB was originally selected
193for this purpose because it was already used in Open vSwitch for configuring
194OVS itself and, thus, it was well integrated with OVS and well supported in C
195and Python, the two languages that are used in Open vSwitch.
196
197OVSDB was well designed for its original purpose of configuring Open vSwitch.
198It supports ACID transactions, has a small, efficient server, a flexible schema
199system, and good support for troubleshooting and debugging. However, it lacked
200several features that are important for OVN but not for Open vSwitch. As OVN
201advances, these missing features have become more and more of a problem. One
202option would be to switch to a different database that already has many of
203these features, but despite a careful search, no ideal existing database was
204identified, so the project chose instead to improve OVSDB where necessary to
205bring it up to speed. The following sections talk more about recent and future
206improvements.
207
208High Availability
209~~~~~~~~~~~~~~~~~
210
211When ``ovsdb-server`` was only used for OVS configuration, high availability
212was not important. ``ovsdb-server`` was capable of restarting itself
213automatically if it crashed, and if the whole system went down then Open
214vSwitch itself was dead too, so the database server's failure was not
215important.
216
217In contrast, the northbound and southbound databases are centralized components
218of a distributed system, so it is important that they not be a single point of
219failure for the system as a whole. In released versions of OVN,
220``ovsdb-server`` supports only "active-backup replication" across a pair of
221servers. This means that if one server goes down, the other can pick it back
222up approximately where the other one left off. The servers do not have
223built-in support for deciding at any given time which is the active and which
224the backup, so the administrator must configure an external agent to do this
225management.
226
227Active-backup replication is not entirely satisfactory, for multiple reasons.
228Replication is only approximate. Configuring the external agent requires extra
229work. There is no benefit from the backup server except when the active server
230fails. At most two servers can be used.
231
232A new form of high availability for OVSDB is under development for the OVN 2.9
233release, based on the Raft algorithm for distributed consensus. Whereas
234replication uses two servers, clustering using Raft requires three or more
235(typically an odd number) and continues functioning as long as more than half
236of the servers are up. The clustering implementation is built into
237``ovsdb-server`` and does not require an external agent. Clustering preserves
238the ACID properties of the database, so that a transaction that commits is
239guaranteed to persist. Finally, reads (which are the bulk of the OVN workload)
240scale with the size of the cluster, so that adding more servers should improve
241performance as the number of hypervisors in an OVN deployment increases. As of
242this writing, OVSDB support for clustering is undergoing development and early
243deployment testing.
244
245RBAC security
246~~~~~~~~~~~~~
247
248Until Open vSwitch 2.8, ``ovsdb-server`` had little support for access control
249within a database. If an OVSDB client could modify the database at all, it
250could make arbitrary changes. This was sufficient for most uses case to that
251point.
252
253Hypervisors in an OVN deployment need access to the OVN southbound database.
254Most of their access is reads, to find out about the OVN configuration.
255Hypervisors do need some write access to the southbound database, primarily to
256let the other hypervisors know what VMs and containers they are running and how
257to reach them. Thus, OVN gives all of the hypervisors in the OVN deployment
258write access to the OVN southbound database. This is fine when all is well,
259but if any of the hypervisors were compromised then they could disrupt the
260entire OVN deployment by corrupting the database.
261
262The OVN developers considered a few ways to solve this problem. One way would
263be to introduce a new central service (perhaps in ``ovn-northd``) that provided
264only the kinds of writes that the hypervisors legitimately need, and then grant
265hypervisors direct access to the southbound database only for reads. But
266ultimately the developers decided to introduce a new form of more access
267control for OVSDB, called the OVSDB RBAC (role-based access control) feature.
268OVSDB RBAC allows for granular enough control over access that hypervisors can
269be granted only the ability to add, modify, and delete the records that relate
270to themselves, preventing them from corrupting the database as a whole.
271
272Further Directions
273------------------
274
275For more information about new features in OVN and Open vSwitch, please refer
276to the NEWS file distributed with the source tree. If you have questions about
277Open vSwitch or OVN features, please feel free to write to the Open vSwitch
278discussion mailing list at ovs-discuss@openvswitch.org.