summaryrefslogtreecommitdiff
path: root/tests/interface-reconfigure.at
Commit message (Collapse)AuthorAgeFilesLines
* xenserver: Fix string compatibility in python3.Joe Stringer2016-06-071-8/+8
| | | | | | | | | 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-2/+2
| | | | | | | | | 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: consistently use OVS_APP_EXIT_AND_WAIT() for daemon terminationLance Richardson2016-03-181-0/+2
| | | | | | | | | Tools such as gcov rely on normal termination (via exit()), ensure consistent graceful termination of daemons in tests by using the OVS_APP_EXIT_AND_WAIT() macro. Signed-off-by: Lance Richardson <lrichard@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* interface-reconfigure.at: Skip POSIX specfic tests for Windows.Gurucharan Shetty2014-06-261-0/+4
| | | | | | | | interface-reconfigure.at mostly tests functionality for Xenserver and the tests use some POSIX only features. Skip them for Windows. Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* tunnel: Fix bug where misconfiguration persists.Joe Stringer2014-05-081-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, misconfiguring a tunnel port to use the exact same settings would cause the corresponding netdev to never be destroyed. When attempting to re-use the port as a different type, this would fail and result in a discrepancy between reported port type and actual netdev in use. An example configuration that would previously give unexpected behaviour: ovs-vsctl add-port br0 p0 -- set int p0 type=gre options:remote_ip=1.2.3.4 ovs-vsctl add-port br0 p1 -- set int p1 type=internal ovs-vsctl set int p1 type=gre options:remote_ip=1.2.3.4 ovs-vsctl set int p1 type=internal The final command would report in the ovs-vswitchd logs that it is attempting to configure the port with the same gre settings as p0, despite the command specifying the type as internal. Even after deleting and re-adding the port, the message would reappear. This patch fixes the bug by dereferencing the netdev in the failure case of tnl_port_add__(), and ensures that the tnl_port structure is freed in that case as well. Bug #1198386. Signed-off-by: Joe Stringer <joestringer@nicira.com> Acked-by: Ryan Wilson <wryan@vmware.com> Acked-by: Alex Wang <alexw@nicira.com>
* tests: Skip Python daemon tests in directory with non-ASCII name.Ben Pfaff2013-10-251-0/+4
| | | | | | | | | | | | | | | | | | | | | | The Debian autobuild machines run their builds inside a top-level directory named /«BUILDDIR». That name contains two non-ASCII characters that cause the Python code in the interface-reconfigure and ovs-monitor-ipsec tests to fail. The problem seems to be related to the locale, because switching to a UTF-8 locale allows the tests to proceed farther but does not fix the problem. I was not able to easily fix the actual problem. Web searches turn up articles that imply that the problem is not reasonably fixable with Python 2.x, e.g.: http://stackoverflow.com/a/11742928 This commit instead avoids the problem by skipping these tests if the current working directory's name contains non-ASCII characters. This is a legitimate solution only because interface-reconfigure and ovs-monitor-ipsec run from initscripts and thus their current working directories are system directories. (Also, the current working directory matters much less when run in a real environment because the --root-prefix option that causes the issue is not used in a real environment.) Signed-off-by: Ben Pfaff <blp@nicira.com>
* ovs-vsctl: Try connecting only once for active connections by default.Ben Pfaff2013-03-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Until now, ovs-vsctl has kept trying to the database server until it succeeded or the timeout expired (if one was specified with --timeout). This meant that if ovsdb-server wasn't running, then ovs-vsctl would hang. The result was that almost every ovs-vsctl invocation in scripts specified a timeout on the off-chance that the database server might not be running. But it's difficult to choose a good timeout. A timeout that is too short can cause spurious failures. A timeout that is too long causes long delays if the server really isn't running. This commit should alleviate this problem. It changes ovs-vsctl's behavior so that, if it fails to connect to the server, it exits unsuccessfully. This makes --timeout obsolete for the purpose of avoiding a hang if the database server isn't running. (--timeout is still useful to avoid a hang if ovsdb-server is running but ovs-vswitchd is not, for ovs-vsctl commands that modify the database. --no-wait also avoids that issue.) Bug #2393. Bug #15594. Reported-by: Jeff Merrick <jmerrick@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* vlog: Take advantage of relaxed "-v" syntax through the tree.Ben Pfaff2012-05-221-2/+2
| | | | | | | | The vlog manpage implies that writing ANY explicitly is obsolete, but examples elsewhere in the documentation and code still tend to add it. This removes them. Signed-off-by: Ben Pfaff <blp@nicira.com>
* Use `pwd` in place of $PWD, treewide.Ben Pfaff2012-03-131-2/+2
| | | | | | | | | | | | | | | | | The Autoconf manual says: Posix 1003.1-2001 requires that `cd' and `pwd' must update the `PWD' environment variable to point to the logical name of the current directory, but traditional shells do not support this. This can cause confusion if one shell instance maintains `PWD' but a subsidiary and different shell does not know about `PWD' and executes `cd'; in this case `PWD' points to the wrong directory. Use ``pwd`' rather than `$PWD'. so this commit replaces all uses of $PWD by `pwd`. Reported-by: Justin Pettit <jpettit@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* tests: Convert interface-reconfigure macros to shell functions.Ben Pfaff2012-03-071-90/+96
| | | | | | | This reduces tests/testsuite by about 50 kB, by collapsing a number of macro expansions into just one copy in a shell function. Signed-off-by: Ben Pfaff <blp@nicira.com>
* tests: Fix broken interface-reconfigure tests.Ben Pfaff2012-01-241-0/+4
| | | | | | | Commit acfb4e9597 updated the interface-reconfigure scripts without updating the corresponding tests, causing false test failures. Signed-off-by: Ben Pfaff <blp@nicira.com>
* vlog: Add a new log level "off".Ben Pfaff2011-08-011-2/+2
| | | | | | | Until now, "emer" has effectively been "off" because no messages were ever logged at "emer" level. Justin points out that it is useful to use "emer" for messages that indicate a fatal error. This commit makes that change and adds a new "off" level to really turn off all logging to a facility.
* xenserver: allow dom0 traffic in secure pool host when controller unavailable.David Tsai2011-06-171-6/+41
| | | | | | | | | | | | | | | A pool configured for secure fail-mode can block dom0 traffic on hosts joining the pool or if the host reboots while the controller is unavailable. This commit sets default flows on a host under these conditions to allow management traffic. Once the connection with the controller is re-established, these default flows are replaced by the controller. tests/interface-reconfigure.at updated by Ben Pfaff. NIC-376. Signed-off-by: David Tsai <dtsai@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* tests: Fix up interface-reconfigure test and results.Ben Pfaff2011-03-161-1/+17
| | | | I forgot to update the test when I added the VLAN bug workaround.
* xenserver: Delete Bridge when creating vlan.Ethan Jackson2011-03-101-0/+2
| | | | | | | | | Commit 34edeccfd8d4273844d12c85fe38ec47002c47cd removed a workaround which still applies to XenServer versions older than 5.5. This could causes creation of vlans to fail in some cases. CC: "David Tsai" <dtsai@nicira.com> Bug #4877.
* xenserver: Add support for disabling in-band management via XAPI.Andrew Evans2011-02-281-1/+9
| | | | | | | | | Allow users or applications to enable or disable in-band management of individual bridges by setting the 'vswitch-disable-in-band' key in the 'other_config' attribute of the corresponding network to 'true' or 'false'. Bug #4749.
* xenserver: Remove support for XenServer versions older than 5.6 FP1.Justin Pettit2011-02-111-2/+0
| | | | | | | | Commit 404c169247b1c3ac2ebad887f0421478a6cef924 breaks compatibility with XenServers older than 5.6 FP1. This commit removes the last vestiges of support for those older XenServer versions. Signed-off-by: Justin Pettit <jpettit@nicira.com>
* xenserver: Merge upstream changes and drop pre-5.6.100 support.Andrew Evans2011-02-111-0/+14
| | | | | | | | | | | | | | | Citrix have made modifications to the various interface configuration scripts that OVS replaces, so at present those modifications are lost when OVS is installed on e.g. XenServer 5.6.100. This commit applies those changes while preserving OVS-specific modifications that have been made in the interim. One major change introduced by these updates is the removal of support for XenServer releases prior to 5.6.100. This commit also updates the OVS-supplied xen-bugtool in similar fashion. We will soon remove xen-bugtool from OVS altogether and move the added OVS functionality to an XML extension as described in the Supplemental Pack DDK guide.
* xenserver: Allow LACP configuration from xapi.Ethan Jackson2011-02-031-2/+2
| | | | | | | | | Makes required changes to interface reconfigure to allow LACP configuration from xapi. Conforms to XenServer style bonding configuration which is slightly different from OVS. Signed-off-by: Ethan Jackson <ethan@nicira.com> Bug #4213.
* tests: Update interface-reconfigure tests.Ethan Jackson2011-01-181-0/+11
| | | | | The interface-reconfigure tests currently fail because they were not updated when fail_mode was added to XenServer configuration.
* xenserver: Add miimon configuration support for xenserver.Ethan Jackson2011-01-121-2/+2
| | | | | | | | This commit makes necessary changes to Interface Reconfigure to allow miimon bond-detect-mode and bond-miimon-interval to be changed using xapi. Signed-off-by: Ethan Jackson <ethan@nicira.com>
* tests: Fix bonding related test failures.Ethan Jackson2011-01-121-2/+2
| | | | | The tests did not get updated with recent interface reconfigure changes. This fixes the problem.
* xenserver: Only put the primary XenServer UUID in default bridge-idEthan Jackson2010-09-221-3/+3
| | | | | | | | | | | | | This patch defensively guarantees that the first id in xs-network-uuids will belong to the primary network (as opposed to a vlan). Given that the primary network id comes first, it parses xs-network-ids and only copies the primary id to bridge-id when monitor-external-ids is run. Feature #3647 Signed-off-by: Ethan Jackson <ethan@nicira.com> Reviewed-by: Ben Pfaff <blp@nicira.com>
* xenserver: Prepend XenServer external ids with "xs-"Justin Pettit2010-08-251-6/+6
| | | | Signed-off-by: Justin Pettit <jpettit@nicira.com>
* xenserver: Ensure that Bridge.other-config:hwaddr and Interface.MAC are set ↵Ian Campbell2010-03-261-4/+4
| | | | | | | | | | | | as appropriate. Otherwise bridges can end up with a generated MAC address using Nicira OID which has an impact when using DHCP on that devices. tests/interface-reconfigure.at updated by Ben Pfaff. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* vswitchd: Make names of Bridge external_ids generic.Ben Pfaff2010-03-241-6/+6
| | | | | | | | | | | | | Until now the names of the external_ids keys used for Bridge records have implied that they are specific to XenServer, because they begin with "xs-". They are more generic in intent, however, so this commit removes the "xs-" prefix and explains them more generically. This finishes the renaming process started in commit c0f9490 "vswitchd: Make names of Interface external_ids generic." CC: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* xenserver: Implement missing interface-reconfigure settings.Ben Pfaff2010-03-031-0/+8
| | | | | | | | | | | These settings are supported by the bridge, and they were supported earlier by the vswitch, but support regressed when OVSDB was initially introduced because at first ovs-vsctl did not support these settings. This commit restores support. Related to bug #2430, #2442. Signed-off-by: Ben Pfaff <blp@nicira.com>
* vswitch: interface-reconfigure: bring down physical interfacesIan Campbell2010-02-261-0/+10
| | | | | | | | | | | | | | This should be done when bringing down the last PIF which uses a datapath in order to account for VLAN PIFs sharing a datapath. The logic in bring_down() already acounts for this requirement by clearing the dp variable if the datapath is still required so if we get as far as deconfiguring that datapath then it is also correct to bring down the physical devices. With unit test suite update by Ben Pfaff. Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* interface-reconfigure: Fix up unit tests expected output.Ben Pfaff2010-02-241-6/+10
| | | | | The previous commit added "mtu" settings in various places, so the output changed.
* tests: Add basic unit tests for interface-reconfigure.Ben Pfaff2010-02-231-0/+910
These tests are probably not perfect, and we could and should certainly add more of them, but they should at least help us to notice when commits change interface-reconfigure's behavior. Signed-off-by: Ben Pfaff <blp@nicira.com>