2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-15 14:17:18 +00:00
Commit Graph

473 Commits

Author SHA1 Message Date
Gurucharan Shetty
5902b4ed6d rhel, xenserver: Punch holes through firewall for VXLAN.
Bug #15518.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
2013-04-08 10:40:05 -07:00
Gurucharan Shetty
58fd55c0eb xenserver: Add information about some bugtool scripts.
The README file in xenserver directory currently misses information
about a few bugtool scripts. Add them.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
2013-03-25 10:26:49 -07:00
Gurucharan Shetty
740f68d71a ovs-bugtool: Add ovs-appctl dpif commands to debug bundle.
With single datapath, 'ovs-dpctl dump-flows ' dumps datapath flows for
all the userspace bridges in a system. It can get a little harder
to figure out the datapath flows belonging to a particular userspace
bridge.

This patch adds the 'ovs-appctl dpif/show' and 'ovs-appctl dpif/dump-flows'
output for each userspace bridge. This gives us a summary of configured
datapaths and all datapath flow entries for each bridge separately.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
2013-03-25 10:09:23 -07:00
Gurucharan Shetty
9933c207b5 ovs-bugtool: Add ovs-ofctl commands to bugtool plugin scripts.
This patch adds two new scripts that run "ovs-ofctl show" and
"ovs-ofctl dump-flows" on each bridge.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
2013-03-21 14:25:08 -07:00
Ben Pfaff
fba6bd1d3f ovs-vsctl: Try connecting only once for active connections by default.
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>
2013-03-15 16:26:47 -07:00
Gurucharan Shetty
46528f78e5 debian, rhel, xenserver: Ability to collect ovs-ctl logs.
We use ovs-ctl from startup scripts to start, stop, restart,
force-reload-kmod OVS daemons. ovs-ctl gives quite a descriptive
o/p while running the above commands. But the o/p goes to stdout.
Sometimes, this output is quite useful to debug issues.

With this patch, we store the o/p of ovs-ctl when called from
startup scripts in /var/log/openvswitch/ovs-ctl.log

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
2013-03-15 09:16:13 -07:00
Gurucharan Shetty
31f4bd4717 xenserver: Include ovs-bugtool in xenserver rpm.
Currently we do not include ovs-bugtool in xenserver rpms.
This is because xen-bugtool provides the information required
to debug openvswitch. But xen-bugtool also provides a lot more
data that is not required for openvswitch debugging. This makes
the debug bundle quite huge.

Also, xen-bugtool takes a lot of time to collect the required
information.  For example, in my xenserver6.0.2 with 100 OVS
interfaces, 'xen-bugtool -y -s' takes 180 seconds to finish
creating a debug bundle with a size of 124M.

On the other hand, if we run a ovs-bugtool command of the form
'ovs-bugtool -y -s --log-days=10 --outfile bundle.tar.gz', it
takes 5 seconds to finish with a debug bundle size of 28M.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
2013-02-15 08:27:05 -08:00
Gurucharan Shetty
43516d9339 rhel, xenserver: Make logrotate daily and compress old logs.
The default values can be different and usually comes from /etc/logrotate.conf.

For xenserver6.0.2, the values in /etc/logrotate.conf is daily and compress.
So this patch does not make any difference. But it does future proof against
any changes in xenserver in the future.

For rhel6.1, the values are weekly and un-compress.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
2013-02-14 14:14:33 -08:00
Pravin B Shelar
5ca1ba484b openvswitch: Remove Linux bridge compatibility.
Currently brcompat does not work on master due to recent
datapath changes. We have decided to remove it as it is
not used very widely.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
2012-12-27 13:48:51 -08:00
Gurucharan Shetty
aad12c5f8f xenserver, rhel, debian: Use ovs-ctl restart.
ovs-ctl has a new command called "restart" which
saves and restores the openflow flows on bridges.
Use that command from the init scripts when doing
a "restart --save-flows=yes".

Also, the debian package postinst script can
set the variable OVS_RESTART_SAVE_FLOWS to "yes"
to ask for save and restore of flows.

Feature #13555.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
2012-10-24 16:43:38 -07:00
Ethan Jackson
013061cfa3 utilities: New helper ovs-parse-backtrace.
The new ovs-parse-backtrace utility makes the output of ovs-appctl
backtrace more human readable by removing duplicate traces and
converting addresses to function names.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-10-17 13:23:24 -07:00
Ed Maste
8a77bb2ec8 Don't assume python is in /usr/bin.
Signed-off-by: Ed Maste <emaste@freebsd.org>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-07-30 17:17:24 -07:00
Ansis Atteka
bce821a555 Fix build error on XenServer
A missing backslash broke the build.

Signed-off-by: Ansis Atteka <aatteka@nicira.com>
2012-07-02 15:02:39 -07:00
Ansis Atteka
2d8bdd8f22 ovs-l3ping: A new test utility that allows to detect L3 tunneling issues
ovs-l3ping is similar to ovs-test, but the main difference
is that it does not require administrator to open firewall
holes for the XML/RPC control connection. This is achieved
by encapsulating the Control Connection over the L3 tunnel
itself.

This tool is not intended as a replacement for ovs-test,
because ovs-test covers much broader set of test cases.

Sample usage:
Node1: ovs-l3ping -s 192.168.122.236,10.1.1.1 -t gre
Node2: ovs-l3ping -c 192.168.122.220,10.1.1.2,10.1.1.1 -t gre

Issue#11791
Signed-off-by: Ansis Atteka <aatteka@nicira.com>
2012-07-02 12:23:49 -07:00
Rob Hoes
1dc6839d2d xenserver: Improve efficiency of code by using get_all_records_where()
Replace the get_record() for network references which caused as many
slave-to-master calls as there are Network records plus one.
The get_all_records_where() call gets exactly what is needed with a single
call.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Acked-by: Dominic Curran <dominic.curran@citrix.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-06-27 09:33:55 -07:00
Ben Pfaff
87378a8770 xenserver, rhel: Enable extra ovs-ctl options from init scripts.
This is useful for passing wrapper script options and possibly for other
purposes.

Bug #11889.
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-06-15 10:26:34 -07:00
Ben Pfaff
b54c9e972e Properly reopen python daemon log files after rotation.
The OVS Python daemons weren't reopening their log files after rotation, so
all the log information after the second rotation was lost.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-05-22 10:17:07 -07:00
Ben Pfaff
ea523221d4 vlog: Take advantage of relaxed "-v" syntax through the tree.
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>
2012-05-22 10:17:06 -07:00
Ben Pfaff
53cf9963cc python: Break unixctl implementation into registry, client, and server.
I wish to add some unixctl commands to the Python vlog module.  However,
importing ovs.unixctl in ovs.vlog creates a circular dependency, because
ovs.unixctl imports ovs.vlog already.  The solution, in this commit, is to
break the unixctl module into three parts: a register (ovs.unixctl) that
does not depend on ovs.vlog, and client (ovs.unixctl.client) and server
(ovs.unixctl.server) modules that do.  This breaks the circular dependency.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-05-22 10:17:05 -07:00
Arun Sharma
271c896ee4 bugtool: Collect bond state information from ovs.
This is an enhancement in bugtool archive output to determine the bond
state information. It is implemented as a plugin which internally calls
"ovs-appctl bond/show" command to get bond state.

Feature #11283.
Signed-off-by: Arun Sharma <arun.sharma@calsoftinc.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-05-10 09:10:52 -07:00
Raju Subramanian
e0edde6fee Global replace of Nicira Networks.
Replaced all instances of Nicira Networks(, Inc) to Nicira, Inc.

Feature #10593
Signed-off-by: Raju Subramanian <rsubramanian@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-05-02 17:08:02 -07:00
Ben Pfaff
2dc7590de5 ovs-ctl: Make "force-reload-kmod" warn when DHCP clients must be restarted.
This should make it more obvious when the admin needs to restart a DHCP
client (or other daemon).  Without this, unless the admin carefully reads
the documentation, the first notice he gets about a need to restart the
DHCP client can easily be when the lease expires and the machine drops off
the network.

Bug #5391.
Tested-by: Gurucharan Shetty <gshetty@nicira.com>
Suggested-by: Duffie Cooley <dcooley@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-05-01 15:36:44 -07:00
Gurucharan Shetty
43d3667854 xenserver: Update Open vSwitch post upgrade instructions.
Currently, when we upgrade the userspace rpm for XenServer,
we print a message asking users to reboot the hypervisor.
This is not needed. The reboot of hypervisor is needed when
we upgrade the rpm containing the kernel module.  This
reboot can sometimes be avoided by running a
"service openvswitch force-reload-kmod".

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
2012-04-27 15:26:56 -07:00
Arun Sharma
932f36ebdb Python binaries to write comment in db show-log while updating database
This is an improvement in python script ovs-xapi-sync to call add_comment()
method while updating database. This will help developer to debug binaries
and database from ovsdb-tool show-log command output and understand which
python binary is updating db.

Feature #10543
Signed-off-by: Arun Sharma <arun.sharma@calsoftinc.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-10 10:42:03 -07:00
Arun Sharma
a2af1e9dd9 bugtool - Collect version information for all running Open vSwitch daemons.
This is an improvement in {ovs|xen}-bugtool archive output to determine the
version which was running for all the OVS daemons. It is implemented as a
plugin which internally calls "ovs-appctl -t <daemon> version" command for
daemons whose pid file is present in /var/run/openvswitch directory.

Feature #10383
Signed-off-by: Arun Sharma <arun.sharma@calsoftinc.com>
[blp@nicira.com updated debian/copyright.in]
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-05 13:01:51 -07:00
Ben Pfaff
0d6fc641dc xenserver: Recognize XenServer 5.6-SP2 scripts in RPM %post.
Somehow we forgot to put the md5sums for 5.6-SP2 so users were getting
scary error messages.

Bug #10210.
Reported-by: Ronald Lee <rlee@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-03-22 08:47:43 -07:00
Ethan Jackson
94e0c3ff3c xenserver: Verify updates in ovs-xapi-sync.
This prevents potential race conditions when updating database
tables.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-03-19 18:08:45 -07:00
Ben Pfaff
8a07709cb8 configure: Remove --with-build-number.
From early days, Nicira used the --with-build-number option to configure to
stamp our internal builds.  We've since switched to another scheme, so
this option is obsolete.

Good riddance.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-03-19 10:07:09 -07:00
Ethan Jackson
bf42f674e7 idl: Convert python daemons to utilize SchemaHelper.
The recently added SchemaHelper class significantly simplifies IDL
instantiation in Python.  This commit converts all users of the old
method to the new method, and removes support for the old method.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-03-09 13:37:39 -08:00
Ethan Jackson
a256b6e5a9 ovs-xapi-sync: Use unixctl to trigger cache flushes.
Typically Open vSwitch communicates with running processes using
unixctl.  This patch converts ovs-xapi-sync to the strategy for
consistency.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-03-09 13:37:38 -08:00
Ethan Jackson
8084c0119c ovs-xapi-sync: Add unixctl support.
With this patch, users can query a running ovs-xapi-sync's version
or ask it to exit using ovs-appctl.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-03-09 13:37:38 -08:00
Ethan Jackson
330d7cf413 ovs-xapi-sync: Cache nicira-bridge-id in ovs-xapi-sync.
Communicating with xapi from Python can be quite expensive so it
makes sense to cache this data if convenient.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-03-09 13:37:38 -08:00
Ethan Jackson
d2cee5a48e ovs-xapi-sync: Remove useless root_prefix global.
There's no reason for this variable to be global, or to exist at
all for that matter.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-03-09 13:37:38 -08:00
Chris Wright
9b80f761be datapath: omit _mod from module names
This renames the datapath modules:

  openvswitch_mod -> openvswitch
  brcompat_mod -> brcompat

The first makes the module name consistent with upstream, and the latter
is just for internal consistency.  This makes tools, and documentation
refer to a common module name regardless if it's coming from upstream
linux or built from datapath/ as part of a local build.

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Jesse Gross <jesse@nicira.com>
2012-03-09 11:20:54 -08:00
Ben Pfaff
a8a4d9565b ovs-xapi-sync: Rerun processing when a db update arrives during a commit.
The logic in ovs-xapi-sync didn't handle the case where ovsdb-server sends
a database update before it replies to a transaction that ovs-xapi-sync
sent, like this:

ovs-xapi-sync              ovsdb-server
-------------              ------------

                      .
                      .
                      .
transaction request  --->
                     <---  database contents update
                     <---  transaction reply
                      .
                      .
                      .

The update was not lost but ovs-xapi-sync would not process it until the
database changed again.

Bug #10082.
Reported-by: Krishna Miriyala <krishna@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-03-08 11:42:25 -08:00
Gurucharan Shetty
c473936b9a xenserver: Add vm-id to the external_ids.
The vm-id external id in the interface table will uniquely identify a VM
that is connected to a bridge through that interface.

In xenserver, this will have the same value as the external id - xs-vm-uuid
and can be overridden by setting the nicira-vm-id key in the other_config
field of VM record of XAPI.

Bug #10020.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
2012-03-06 14:26:09 -08:00
Ben Pfaff
565dae448b xenserver: Fix rule for generating xenserver/openvswitch-xen.spec.
Commands in Makefiles have to begin with a hard tab, otherwise they are
ignored, which is what happened here.

Fixes "make distcheck".

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-03-02 10:17:58 -08:00
Ethan Jackson
f40af195a5 xenserver: Restart ovs-xapi-sync on kmod reload.
Some users never restart OVS, they just reload the kernel module on
each new version. Since ovs-xapi-sync is a daemon, a restart is
required to use the new code.  Therefore, without this patch, users
could unwittingly use stale versions of ovs-xapi-sync.

Bug #9919.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Diagnosed-by: Ben Pfaff <blp@nicira.com>
2012-02-29 20:08:13 -08:00
Ethan Jackson
753a774f5c xenserver: Always update the bridge ID in ovs-xapi-sync.
In some cases we were seeing this column get stale.

Bug #9929.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Diagnosed-by: Justin Pettit <jpettit@nicira.com>
2012-02-29 20:05:34 -08:00
Dominic Curran
2d57bfce57 xenserver: Fix iteration of dictionary.
Fix bug in commit 3249bb907a, which incorrectly assumed that
get_all_records_where() returned a list.  It in fact returns a
dictionary and the list iteratory needs to change to account for this.

Thanks to Nicira for pointing this out.

NIC-454.

Reported-by: David Tsai <dtsai@nicira.com>
Acked-by: Rob Hoes <rob.hoes@citrix.com>
Signed-off-by: Dominic Curran <dominic.curran@citrix.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-02-15 09:48:28 -08:00
Ethan Jackson
122d6b053b xenserver: Remove openvswitch-xen.spec file.
This file is automatically generated by the openvswitch-xen.spec.in
file.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-02-09 01:54:47 -08:00
Ben Pfaff
96f900fac6 xenserver: Remove dead code from ovs-xapi-sync.
Nothing actually uses call_vsctl(), so remove it and its dependencies.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-02-06 10:22:32 -08:00
Ben Pfaff
7b00700637 xenserver: Simplify RPM build instructions.
I got tired of trying to follow them properly myself.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-02-03 13:35:24 -08:00
Ben Pfaff
e9ade0fee6 ovs-xapi-sync: Always set iface-id, not just when xs-vif-uuid changes.
When XAPI moves an interface from one bridge to another, the vif script
removes the vif from one bridge and adds it to (possibly) a different
bridge in a single transaction.  The new record does not have an iface-id
initially (because the vif script never adds the iface-id initially) but
it has the same name and xs-vif-uuid as the old one, so the caching logic
in ovs-xapi-sync failed to add a new iface-id.  This commit fixes the
caching logic.

Observed on XenServer 5.6.100.  It's possible that XAPI behavior changed in
later versions so the bug cannot be triggered there, but we have not
checked.

Bug #9414.
Reported-by: Duffie Cooley <dcooley@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-02-02 15:07:22 -08:00
Ben Pfaff
1650ab62da openvswitch-xen.spec: Avoid warning if build_number not defined.
I expect that only Nicira internal builds want a build number, so it's
nice to avoid a complaint from RPM if the build_number macro is not
defined.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-01-24 14:30:19 -08:00
Ben Pfaff
efbf489638 xenserver/README: Remove bad instructions.
The instructions in INSTALL.XenServer are more detailed and correct.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-01-24 14:30:17 -08:00
Ben Pfaff
4f256587f1 xenserver: Only replace XenServer hosts scripts that we recognize.
Open vSwitch comes with slightly improved versions of upstream Citrix
XenSever host scripts.  Until now, the Open vSwitch RPMs have always
installed its own versions of the scripts over the Citrix versions.  This
commit changes behavior to replace the scripts only if we recognize the
exact versions being replaced.  This approach seems safer given that the
benefits of the OVS changes are minor and we don't want to break any
upstream changes inadvertently.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-01-24 09:53:44 -08:00
Ben Pfaff
acfb4e9597 xenserver: Synchronize scripts with XenServer 6.0.0.
This commit updates the "vif" and "interface-reconfigure" scripts installed
by Open vSwitch on Citrix XenServer with those in XenServer 6.0.0.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-01-24 09:52:48 -08:00
Chris Wright
4b38c153a9 bugtool: move plugins data from /etc/openvswitch to /usr/share/openvswitch
This is in repsonse to the following rpmlint warnings:

 W: non-conffile-in-etc /etc/openvswitch/bugtool-plugins/system-configuration/openvswitch.xml
 W: non-conffile-in-etc /etc/openvswitch/bugtool-plugins/system-logs/openvswitch.xml
 W: non-conffile-in-etc /etc/openvswitch/bugtool-plugins/system-configuration.xml
 W: non-conffile-in-etc /etc/openvswitch/bugtool-plugins/network-status/openvswitch.xml
 W: non-conffile-in-etc /etc/openvswitch/bugtool-plugins/kernel-info/openvswitch.xml

The xenserver specfile still places them in /etc/xensource/bugtool since
that's a distro policy.  Of course, the rpmlint warnings are as well,
however, this seems like a more logical place for the bugtool plugins.

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2011-12-09 09:32:38 -08:00
Chris Wright
d422c11899 utilites: rename ovs-lib.sh to ovs-lib
Rename this helper script to simply ovs-lib, since it's primarily
a library of helper functions.

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2011-12-09 09:32:06 -08:00