summaryrefslogtreecommitdiff
path: root/xenserver
Commit message (Collapse)AuthorAgeFilesLines
* ovsdb-server: Add support for a built-in _Server database.Ben Pfaff2018-03-241-0/+1
| | | | | | | | | | | | | | | | | | | | | The _Server database is valuable primarily because it provides database clients a way to find out the details of changes to databases, schemas, etc. in a granular, natural way. Until now, the only way that the server could notify clients about these kinds of changes was to close the session; when the client reconnects, it is expected to reassess the server's state. One way to provide this kind of granular information would be to add specific JSON-RPC requests to obtain notifications for different kinds of changes, but since ovsdb-server already provides granular and flexible notification support for databases, using a database for the purpose is convenient and avoids duplicating functionality. Initially this database only reports databases' names and schemas, but when clustering support is added in a later commit it will also report important aspects of clustering and cluster status. Thus, this database also reduces the need to add JSON-RPC calls to retrieve information about new features. Signed-off-by: Ben Pfaff <blp@ovn.org>
* Replace most uses of and references to "ifconfig" by "ip".Ben Pfaff2017-06-012-5/+5
| | | | | | | | | | | | | | | | | | | | | | It's becoming more common that OSes include "ip" but not "ifconfig", so it's best to avoid using the latter. This commit removes most references to "ifconfig" and replaces them by "ip". It also adds a build-time check to make it harder to introduce new uses of "ifconfig". There are important differences between "ifconfig" and "ip": - An "ifconfig" command that sets an IP address also brings the interface up, but a similar "ip addr add" command does not, so it is often necessary (or at least precautionary) to add an "ip link set <dev> up" command. - "ifconfig" can infer a netmask from an IP adddress, but "ip" always assumes /32 if none is given. - "ifconfig" with address 0.0.0.0 removes any configured IP address, but "ip addr add" does not, so "ifconfig <dev> 0.0.0.0" must be replaced by "ip addr del" or "ip addr flush". Signed-off-by: Ben Pfaff <blp@ovn.org>
* debian, xenserver: Update logrotate config to match RHEL.Ben Pfaff2017-04-241-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | Commit 618a5b45ae8b ("rhel: Avoid logrotate error if /var/run/openvswitch does not exist") updated the RHEL logrotate configuration. This commit makes similar changes for Debian, by synchronizing with the RHEL version. In particular: - Indent to match logrotate.conf(5) examples. - Use "sharedscripts" flag, because the postrotate script only needs to run once regardless of the number of rotations. - Drop "delaycompress", because the postrotate script does make daemons reopen their log files. - Ignore errors calling vlog/reopen. Also make similar changes to the xenserver logrotate script. I confirmed via Twitter that the xenserver packaging still has users. CC: Timothy Redaelli <tredaelli@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Gurucharan Shetty <guru@ovn.org>
* xenserver: Add install files to RPM file listGreg Rose2017-04-171-0/+4
| | | | | | | | Add missing intall files to RPM file list to prevent file check error so that RPM files will be built. Signed-off-by: Greg Rose <gvrose8192@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* Adapt to flake8-import-orderxurong000379972017-03-081-1/+2
| | | | | | | | | | https://review.openstack.org/#/c/432906/ flake8-import-order adds 3 new flake8 warnings: I100: Your import statements are in the wrong order. I101: The names in your from import are in the wrong order. I201: Missing newline between sections or imports. Signed-off-by: Ben Pfaff <blp@ovn.org>
* trivial: Don't mix tabs and spaces in ovs-simStephen Finucane2016-11-301-9/+9
| | | | | Signed-off-by: Stephen Finucane <stephen@that.guru> Signed-off-by: Russell Bryant <russell@ovn.org>
* doc: Convert xenserver/README to rSTStephen Finucane2016-11-033-187/+176
| | | | | Signed-off-by: Stephen Finucane <stephen@that.guru> Signed-off-by: Russell Bryant <russell@ovn.org>
* xenserver: Remove deprecated print statement.Joe Stringer2016-06-072-4/+6
| | | | | | | | | PEP 3105 removed the print statement in favour of a print function. Replace usage of the old statement with equivalent functionality that works in both python2.7 and python3. Signed-off-by: Joe Stringer <joe@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* xenserver: Use PEP 3110 exception syntax.Joe Stringer2016-06-073-9/+9
| | | | | | | | This syntax is usable with both python2.7 and python3, so use it instead of the outdated syntax. Signed-off-by: Joe Stringer <joe@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* xenserver: Remove tuple unpacking in lambdas.Joe Stringer2016-06-072-11/+11
| | | | | | | | | PEP 3113 removed the use of tuple parameter unpacking in conjunction with lambdas, replace this code with something that works in python2.7 and python3. Signed-off-by: Joe Stringer <joe@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* xenserver: Fix list/map access for python3.Joe Stringer2016-06-072-29/+28
| | | | | Signed-off-by: Joe Stringer <joe@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* xenserver: Fix string compatibility in python3.Joe Stringer2016-06-072-3/+10
| | | | | | | | | PEP 3120 made UTF-8 the default source encoding for python3 strings; ensure that the output for strings are consistent between python2.7 and python3. Signed-off-by: Joe Stringer <joe@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* xenserver: Sort vsctl port options.Joe Stringer2016-06-071-1/+1
| | | | | | | | | In python3, dictionaries are less likely to be sorted consistently from one run to the next, so sort port options when outputting to provide reliable test results. Signed-off-by: Joe Stringer <joe@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* tests: Add ability to automatically rerun failed tests.Ben Pfaff2016-02-241-2/+1
| | | | | | | | A lot of packaging was doing this already, so this simplifies their implementation. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Andy Zhou <azhou@ovn.org>
* ovs-benchmark: Remove.Ben Pfaff2016-02-051-3/+1
| | | | | | | | This utility was completely broken and no one noticed for the time of a full release, so I think that's a safe sign that we should remove it. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Jarno Rajahalme <jarno@ovn.org>
* python: Convert dict iterators.Russell Bryant2016-01-211-4/+5
| | | | | | | | | | | | | | | | In Python 2, dict.items(), dict.keys(), and dict.values() returned a list. dict.iteritems(), dict.iterkeys(), and dict.itervalues() returned an iterator. As of Python 3, dict.iteritems(), dict.itervalues(), and dict.iterkeys() are gone. items(), keys(), and values() now return an iterator. In the case where we want an iterator, we now use the six.iter*() helpers. If we want a list, we explicitly create a list from the iterator. Signed-off-by: Russell Bryant <russell@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* ovs-bugtool: Add conntrack output.William Tu2016-01-141-0/+5
| | | | | | | Add a script to show all the connection entries in the tracker. Signed-off-by: William Tu <u9012063@gmail.com> Acked-by: Gurucharan Shetty <guru@ovn.org>
* python: Fix exception handler compatibility.Russell Bryant2016-01-121-1/+1
| | | | | | | | | | | | | | | | | Python 3 dropped exception handlers of the deprecated form: except Exception, e: You must use the newer syntax of: except Exception as e: This patch also enables a flake8 warning for this. H231 Python 3.x incompatible 'except x,y:' construct Signed-off-by: Russell Bryant <russell@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* python: Restrict line length to 79 chars.Russell Bryant2016-01-051-1/+2
| | | | | | | | | Resolve pep8 error: E501 line too long (80 > 79 characters) Signed-off-by: Russell Bryant <russell@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* python: Remove unnecessary semicolons and slashes.Russell Bryant2016-01-051-1/+1
| | | | | | | | | | | | Resolve the following flake8 errors: E703 statement ends with a semicolon E502 the backslash is redundant between brackets Also document the reamining flake8 errors that are still ignored. Signed-off-by: Russell Bryant <russell@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* python: Resolve pep8 blank line errors.Russell Bryant2016-01-051-0/+2
| | | | | | | | | | Resolve pep8 errors E302 and E303: E302 expected 2 blank lines, found 1 E303 too many blank lines (3) Signed-off-by: Russell Bryant <russell@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* python: Remove unused imports and variables.Russell Bryant2016-01-051-2/+0
| | | | | | | | | | This resolves the following flake8 error types: F841 local variable 'e' is assigned to but never used F401 'exceptions' imported but unused Signed-off-by: Russell Bryant <russell@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* python: Run flake8 at build time.Russell Bryant2016-01-051-0/+3
| | | | | | | | | | | | If flake8 is installed, run it at build time. Similar to most Makefile targets, run it once and then only run again if the files change. flake8 is set to ignore all error and warning types that currently occur. Future patches will remove items from the ignore list as they are resolved. Signed-off-by: Russell Bryant <russell@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* use "/usr/bin/env python" for shebangs for python scriptsYAMAMOTO Takashi2015-11-261-1/+1
| | | | | | | On NetBSD, a typical path of python interpreter is /usr/pkg/bin/python. Signed-off-by: YAMAMOTO Takashi <yamamoto@midokura.com> Acked-by: Ben Pfaff <blp@ovn.org>
* xenserver: Add ovsdb_port variable to xapi configuration update plugin.Sten Spans2015-11-231-1/+2
| | | | | | | | | The hardcoded ovsdb port causes problems when hooking up xenserver to different SDN stacks. Changing this to a variable at the start of the script makes it easier to update this when needed (using chef/puppet/etc) Signed-off-by: Sten Spans <sten@blinkenlights.nl> Signed-off-by: Ben Pfaff <blp@ovn.org>
* rpms: Remove ovs-sim man page from spec.Gurucharan Shetty2015-09-181-1/+0
| | | | | Reported-by: 张强 <zhangqiang@meizu.com> Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
* Increase prerequisite from Python 2.4 to Python 2.7.Ben Pfaff2015-06-231-2/+0
| | | | | | | This means that users of XenServer 6.5 and earlier will need to install Python 2.7. Signed-off-by: Ben Pfaff <blp@nicira.com>
* rpms: Exclude OVN files from openvswitch packages.Gurucharan Shetty2015-06-221-0/+7
| | | | | | | | | Currently rhel rpm does not build because of OVN files. This patch only fixes the build failures. We eventually may have to add OVN packages for RHEL, Xenserver and Debian. Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* xenserver: Use kernel uname version for XenServer 6.5Edwin Chiu2015-05-021-6/+14
| | | | | | | | | | | | | | | | | | | | In XenServer 6.5, multiple kernel packages with different rpm versions can have the same uname. So, it is not necessary for openvswitch kernel module to require the exact rpm version. Instead, the kernel module package should check the uname version. This commit will add a new variable %{kernel_uname} to specify whether to use kernel uname version or kernel rpm version as requirement. When %{kernel_name} is used, openvswitch-module will have "Requires: kernel-uname-r = <uname version>" set instead of "Requires: kernel = <version>". Reported-by: Gosen Chien <astgosen@ccu.edu.tw> Signed-off-by: Edwin Chiu <echiu@vmware.com> Signed-off-by: Alex Wang <alexw@nicira.com>
* xenserver: Package vport-*.ko with kernel module.Ben Pfaff2015-04-051-1/+2
| | | | | | | Fixes a build error due to unpackaged files. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Justin Pettit <jpettit@nicira.com>
* bashcomp: Install and package completion scripts.Alex Wang2015-03-201-0/+2
| | | | | | | | | | | | | This commit makes the bash completion scripts be installed to $(sysconfdir)/bash_completion.d/ through 'make install' and to /etc/bash_completion.d/ through package installation. This will make the scripts available for each bash session. An alternative is to put scripts to /usr/share/bash_completion/ directory. However, this is not supported by earlier version of bash completion. Signed-off-by: Alex Wang <alexw@nicira.com>
* Use the IANA-assigned ports for OpenFlow and OVSDB.Justin Pettit2015-03-121-1/+1
| | | | | | | | We've been warning about the change since 2.1, which was released a year ago. Signed-off-by: Justin Pettit <jpettit@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* openvswitch-cfg-update: Fix incorrect controller config.Alex Wang2015-03-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 032c09ddd10 (XenServer: Don't reset on xe-toolstack-restart) introduced a bug which causes the setting of 'ssl::6632' at xenserver boot. Subsequently, at each bridge configuration, ovs will report '|socket_util|ERR|:6632: bad IPv4 address ""' due to the empty address. The exact calltrace is: 0 parse_sockaddr_components (ss=0xbf8dd87c, host_s=0x94c99f0 "", port_s=0x94c99f1 "6632", default_port=6632, s=0x948b9dc ":6632") at lib/socket-util.c:350 1 0x081163b5 in inet_parse_active (target_=0x948b9dc ":6632", default_port= 6632, ss=0xbf8dd87c) at lib/socket-util.c:412 2 0x08119dcf in stream_parse_target_with_default_port (target=0x948b9d8 "ssl::6632", default_port=6632, ss=0xbf8dd87c) at lib/stream.c:734 3 0x0804c946 in collect_in_band_managers (ovs_cfg=0x94433b0, managersp=0xbf8dd9a8, n_managersp=0xbf8dd9a0) at vswitchd/bridge.c:516 4 0x08054b87 in bridge_reconfigure (ovs_cfg=0x94433b0) at vswitchd/bridge.c: 614 5 0x080557cf in bridge_run () at vswitchd/bridge.c:2897 6 0x080564aa in main (argc=155674720, argv=0x0) at vswitchd/ovs-vswitchd.c: 116 This commit fixes the issue. Signed-off-by: Alex Wang <alexw@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* xenserver: Fix build spec for XenServer 6.5.Edwin Chiu2015-03-101-7/+19
| | | | | | | | | | | | | | | | | The latest XenServer 6.5 uses a new way for kernel version naming. Therein, the kernel flavor could not be found anymore. Also, the directory name in 'lib/modules/' becomes a shortened version of kernel version. e.g.: [root@localhost ~]# ls /lib/modules/ 3.10.0+2 As a workaround, this commit modifies the spec file to make %{kernel_flavor} optional and %{xen_version} definable by users. In the long run, I'd like to spend time refining the spec file. Signed-off-by: Edwin Chiu <echiu@vmware.com> Signed-off-by: Alex Wang <alexw@nicira.com>
* XenServer: Don't reset on xe-toolstack-restartJason Kölker2015-02-061-12/+17
| | | | | | | | | With XenServer only 1 manager is configured in the pool, which may not be the first manager returned from `get-manager` as it returns in lexicographical order. Signed-off-by: Jason Kölker <jason@koelker.net> Signed-off-by: Ben Pfaff <blp@nicira.com>
* XenServer: PEP8 Cleanup for openvswitch-cfg-updateJason Kölker2015-02-061-67/+80
| | | | | Signed-off-by: Jason Kölker <jason@koelker.net> Signed-off-by: Ben Pfaff <blp@nicira.com>
* xen.spec: Fix xenserver build failure.Alex Wang2014-11-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit conducts similar operations as commit 2fd84d5e5 (rhel: Include pkgconfig and update header install in Fedora/RHEL spec.) to xenserver spec file to prevent the following rpmbuild failure. RPM build errors: Installed (but unpackaged) file(s) found: /usr/include/openflow/nicira-ext.h /usr/include/openflow/openflow-1.0.h /usr/include/openflow/openflow-1.1.h /usr/include/openflow/openflow-1.2.h /usr/include/openflow/openflow-1.3.h /usr/include/openflow/openflow-1.4.h /usr/include/openflow/openflow-1.5.h /usr/include/openflow/openflow-common.h /usr/include/openflow/openflow.h /usr/include/openvswitch/types.h /usr/lib/pkgconfig/libofproto.pc /usr/lib/pkgconfig/libopenvswitch.pc /usr/lib/pkgconfig/libovsdb.pc /usr/lib/pkgconfig/libsflow.pc VMware-BZ: #1362092 Reported-by: Edwin Chiu <echiu@nicira.com> Signed-off-by: Alex Wang <alexw@nicira.com> Acked-by: Gurucharan Shetty <gshetty@nicira.com>
* xenserver: Turn on SSE and SSE2 for the build, for atomic 64-bit ops.Ben Pfaff2014-11-031-1/+1
| | | | | | | | | | | | | | | | The ovs-atomic-i586 implementation of atomic operations can implement 64-bit atomics more efficiently when SSE is supported. XenServer runs only on 64-bit capable processors, in 32-bit mode, so we know on XenServer that SSE and SSE2 are supported because they are architectural for amd64. Thus, this commit enables SSE and SSE2 when building for XenServer to get the improved atomics support. I tested that this successfully adds -msse -msse2 to the compiler flags inside a XenServer DDK, but I didn't actually run it on a real XenServer install. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
* xenserver: Add ovs-docker to the spec file.Gurucharan Shetty2014-10-171-0/+1
| | | | | | | Fixes a rpmbuild failure. Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* ovs-bugtool: Add fdb output for all bridgesAndy Zhou2014-10-091-0/+5
| | | | | | Fdb entries can provide useful information. Collect them in bugtool. Signed-off-by: Andy Zhou <azhou@nicira.com>
* Makefiles: Add $(AM_V_GEN) annotations to clean up "make" output.Ben Pfaff2014-09-291-2/+2
| | | | | | | | The Open vSwitch "make" output was still pretty verbose even when configured with --enable-silent-rules. This cleans it up. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Joe Stringer <joestringer@nicira.com>
* test-controller: Rename to ovs-testcontroller, again install.Ben Pfaff2014-08-261-1/+3
| | | | | | | | | | | mininet uses the Open vSwitch controller by default, for testing. CC: 757761@bugs.debian.org Reported-at: https://bugs.debian.org/757761 Requested-by: Tomasz Buchert <tomasz.buchert@inria.fr> Requested-by: Dariusz Dwornikowski <dariusz.dwornikowski@cs.put.poznan.pl> Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Justin Pettit <jpettit@nicira.com>
* rhel, xenserver: Run unit tests while creating rpms.Gurucharan Shetty2014-07-011-0/+16
| | | | | | | | | | | | | | | | | For RHEL, Fedora and Xenserver, run unit tests while building rpms. This may catch some cross-platform bugs. The commit also allows the users to optionally skip unit tests. (On debian, the default is to run unit tests. For consistency, do the same for rpms.) VMware-BZ: 1267127 CC: Flavio Leitner <fbl@redhat.com> CC: Ben Pfaff <blp@nicira.com> Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Flavio Leitner <fbl@redhat.com> Tested-by: Flavio Leitner <fbl@redhat.com>
* xenserver: Fix build failures because of libraries in /usr/lib.Gurucharan Shetty2013-12-181-0/+1
| | | | | Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* ovs-controller: Rename test-controller and do not install or package.Ben Pfaff2013-11-021-2/+0
| | | | | | | | | Too many users have incorrectly assumed that ovs-controller is a necessary or desirable part of an Open vSwitch deployment. This commit should fix the problem by renaming it test-controller and removing it from the default install and from packaging. Signed-off-by: Ben Pfaff <blp@nicira.com>
* xenserver: Add VTEP packaging.Justin Pettit2013-10-171-0/+5
| | | | | | Add VTEP files so XenServer build doesn't fail. Signed-off-by: Justin Pettit <jpettit@nicira.com>
* utilities: a top like tool for ovs-dpctl dump-flows.Mark Hamilton2013-09-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This python script summarizes ovs-dpctl dump-flows content by aggregating the number of packets, total bytes and occurrence of the following fields: - Datapath in_port - Ethernet type - Source and destination MAC addresses - IP protocol - Source and destination IPv4 addresses - Source and destination IPv6 addresses - UDP and TCP destination port - Tunnel source and destination addresses Testing included confirming both mega-flows and non-megaflows are properly parsed. Bit masks are applied in the case of mega-flows prior to aggregation. Test --script parameter which runs in non-interactive mode. Tested syntax against python 2.4.3, 2.6 and 2.7. Confirmed script passes pep8 and pylint run as: pylint --disable=I0011 --include-id=y --reports=n This tool has been added to these distribution: - add ovs-dpctl-top to debian distribution - add ovs-dpctl-top to rpm distribution. - add ovs-dpctl-top to XenServer RPM. Signed-off-by: Mark Hamilton <mhamilton@nicira.com> Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
* BFD: Add BFD output to bugtoolPavithra Ramesh2013-07-171-0/+5
| | | | | | | | This change includes the output of ovs-appctl bfd/show to ovs-bugtool output. Signed-off-by: Pavithra Ramesh <paramesh@vmware.com> Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
* rhel, xenserver: Create /var/log/openvswitch directory.Gurucharan Shetty2013-07-151-0/+1
| | | | | | | | During installation create the /var/log/openvswitch directory so that openvswitch startup script is able to write the ovs-ctl.log Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* ovs-bugtool: Add ovsdb-server/list-dbs command to bugtool.Gurucharan Shetty2013-07-101-0/+5
| | | | | Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>