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

205 Commits

Author SHA1 Message Date
Ben Pfaff
77912ae717 debian: Strip epoch from version number used in directory names.
This doesn't fix a visible bug, since there's no epoch in the Open vSwitch
version used in Debian, but some Nicira internal build scripts were
inserting an epoch so it was visible in our builds.

Reported-by: Edwin Chiu <echiu@nicira.com>
2011-11-10 09:08:37 -08:00
Ben Pfaff
d929d22c2c debian: Fix build failure installing ovs-vswitchd.conf.db(5) manpage.
ovs-vswitchd.conf.db is distributed so it's in the source directory not
the build directory.

This fixes a Debian package build failure introduced by commit 9840bdbd
"debian: Install ovs-vswitchd.conf.db(5) manpage."  I did test that commit
but the build failure didn't show up in my environment (probably I had a
stray file left over from development).
2011-11-04 14:10:29 -07:00
Ben Pfaff
9840bdbdff debian: Install ovs-vswitchd.conf.db(5) manpage.
This manpage wasn't getting installed.  This fixes it.

The --language=C option to dh_installman is necessary to keep that script
from thinking that the ".db" suffix indicates a translation into the "db"
language (which doesn't actually exist) and therefore installing it into
the wrong directory with the .db suffix stripped.

Bug #8138.
Reported-by: Ethan Jackson <ethan@nicira.com>
2011-11-04 13:01:44 -07:00
Ansis Atteka
0f49dd6925 packaging: dpkg --purge command fails on Ubuntu 11.04
The problem is that postrm script is unable to remove
contents of /var/log/openvswitch/ directory in case if
it contains any other directories. Steps to reproduce
on Ubuntu 11.04:
1. apt-get install openvswitch-switch
2. dpkg --purge openvswitch-switch
3. observe that purge failed, because of an empty "cores"
directory inside /var/log/openvswitch/
2011-11-01 16:33:33 -07:00
Ben Pfaff
23edef9e61 Fix manpage-check on RHEL 5.
The version of groff on RHEL 5 doesn't include the .SY, .OP, or .YS macros
that ovs-benchmark.1 uses, so the manpage-check target fails on that
platform.  This commit adds the groff definitions of those macros to a
file and includes it into ovs-benchmark.1.

I tested that this allows RHEL 5 to pass manpage-check.
2011-10-27 09:39:24 -07:00
Justin Pettit
079a862535 Declare the version as "1.3.0". 2011-10-25 15:30:26 -07:00
Justin Pettit
bd9e5b0e58 debian: Start ovs-monitor-ipsec after ovsdb running.
ovs-monitor-ipsec uses the OVS database to get configuration, so don't
bother starting the daemon until it's up.

Debian recently switched to using the LSB fields in the header of init
scripts to allow dependency-based boots.  This is described in the
following page:

    http://wiki.debian.org/LSBInitScripts/DependencyBasedBoot

This commit makes use of those fields to get the ordering we want.
2011-10-25 12:21:54 -07:00
Ben Pfaff
ad6247f508 ovs-monitor-ipsec: Fix use_ssl_cert option implementation.
I skipped writing a unit test for this feature on the first go-around, and
of course that meant it didn't work.

Bug #7693.
Reported-by: Michael Hu <mhu@nicira.com>
2011-10-06 14:54:30 -07:00
Ethan Jackson
c4f8424e0e debian: ovs-monitor-ipsec requires root_prefix option.
Before this patch, if the root_prefix option is left unset
ovs-monitor-ipsec will crash.
2011-10-05 18:07:04 -07:00
Ethan Jackson
0c13f5d505 debian: Make ovs-monitor-ipsec executable.
Commit b153e667 "python: Upgrade daemon module to argparse."
removed the execute bit.  This was incorrect.
2011-10-05 15:38:17 -07:00
Ethan Jackson
a251af0a53 debian: Fully convert ovs-monitor-ipsec to vlog.
Commit 201bf205 "ovs-monitor-ipsec: Convert to vlog." only
partially updated ovs-monitor-ipsec to the new vlog module.  This
commit completes the process.
2011-10-05 15:38:17 -07:00
Ethan Jackson
65b23a2ade debian: ovs-monitor-ipsec has a stale init script.
The ovs-monitor-ipsec init script used the old "pidfile-name"
instead of the new "pidfile" option.  This should cause it to fail
when starting.

This patch also causes ovs-monitor-ipsec to create a log file.
2011-10-05 15:38:16 -07:00
Ben Pfaff
12a7df9092 debian: Package the installed Python files, not those from the source tree.
The only difference between the Python files that are installed and the
Python files found in the source tree is in the ovs.dirs module, but this
is a very important difference: we want the directories used to be the ones
configured in (e.g. /usr/share/openvswitch), not the only used by default
by the source tree's dirs.py (e.g. /usr/local/share/openvswitch).

I verified with "dpkg-deb -x" and "diff -ur" that in fact this is the only
change that this commit makes.

This bug has been in place since at least commit 1d273d6d8 "debian: Rename
openvswitch-python to python-openvswitch" from over a year ago, but until
now the packaged Python files didn't actually use any directories that
differed between the two versions of dirs.py, so only now has the problem
manifested.

This problem prevented ovs-monitor-ipsec from finding the OVSDB schema
file.

Reported-by: Ethan Jackson <ethan@nicira.com>
2011-10-05 15:01:48 -07:00
Ben Pfaff
bc3aa0bf5a debian: Make python-openvswitch packaging work with squeeze dh_python2.
The dh_python2 helper in Debian squeeze has a limitation that is not
mentioned anywhere, as far as I can tell: Python files must be in
/usr/lib/python#.#/site-packages to be installed.  The version in Debian
wheezy does not have the same limitation.

This meant that building the Debian packages on squeeze silently produced
a broken python-openvswitch package, whereas building the same thing on
wheezy built a working package.

This fixes the problem by putting the .py files where squeeze expects them.
It works on wheezy too.

Bug #7510.
Reported-by: Michael Hu <mhu@nicira.com>
Tested-by: Simon Horman <horms@verge.net.au>
2011-10-03 09:19:29 -07:00
Justin Pettit
5ea61afe52 bugtool: Collect "lacp/show" and "cfm/show" information.
Feature #7496
2011-09-29 18:52:28 -07:00
Ethan Jackson
27ae98ba1a ovs-monitor-ipsec: Convert to vlog. 2011-09-27 14:51:49 -07:00
Ethan Jackson
b153e66790 python: Upgrade daemon module to argparse.
This patch also updates it's callers.
2011-09-27 14:51:49 -07:00
Ethan Jackson
6c88547dd0 python: Backport argparse to older platforms.
Argparse has some convenient advantages over optparse including the
ability to handle optional arguments to flags.  It also supports
parsing arguments as well as options.

This patch copies argparse.py from Python 2.7 into a newly created
compat directory.  It made some very minor syntactic updates in the
process.  Platforms which have a Python version too old to include
argparse by default will have this compat version installed as a
workaround.
2011-09-27 11:38:30 -07:00
Ben Pfaff
b54bdbe993 ovs-monitor-ipsec: Add unit test. 2011-09-26 13:08:58 -07:00
Ethan Jackson
0f4d9dce81 ovs-monitor-ipsec: Style cleanup.
Pleases pep8.
2011-09-23 17:22:47 -07:00
Ethan Jackson
6acddcaab1 ovs-monitor-ipsec: Remove unused root-prefix option. 2011-09-23 17:22:47 -07:00
Ben Pfaff
8cdf034974 python: Implement write support in Python IDL for OVSDB.
Until now, the Python bindings for OVSDB have not supported writing to the
database.  Instead, writes had to be done with "ovs-vsctl" subprocesses.
This commit adds write support and brings the Python bindings in line with
the C bindings.

This commit deletes the Python-specific IDL tests in favor of using the
same tests as the C version of the IDL, which now pass with both
implementations.

This commit updates the two users of the Python IDL to use the new write
support.  I tested this updates only by writing unit tests for them,
which appear in upcoming commits.
2011-09-23 14:23:16 -07:00
Ben Pfaff
7cba02e442 ovs.db.types: Add table reference to ovs.db.types.BaseType.
Until now ovs.db.types.BaseType has kept track of the name of the
referenced table but not a reference to it.  This commit renames the
ref_table attribute to ref_table_name and adds a new ref_table attribute
whose value is a reference to the named table.

This will be useful in an upcoming commit where table references are
actually followed.
2011-09-23 09:10:45 -07:00
Ben Pfaff
215d7280e4 ovs-monitor-ipsec: Fix typo in comment. 2011-09-23 09:10:43 -07:00
Ben Pfaff
e6687b0ea6 debian: Correct path to ovs-controller in init script.
Reported-by: George Shuklin <amarao@desunote.ru>
Bug-report: http://bugs.debian.org/642206
2011-09-20 10:59:39 -07:00
Simon Horman
64624b3cf4 Debian: fail gracefully if modules can't be loaded on install
By registering an error-handler for the init script used
in openvswitch-switch.postinst and detecting if module insertion fails,
it is possible to avoid failure to install in the case where the
openvswitch_mod module is not available.

This is done without altering the behaviour that the start target
of the openvswitch-switch init script will fail if module insertion fails.

This patch also adds a friendly hint as as to why starting
openvswitch-switch has failed if it is due to failure to insert
the openvswtich_mod. This message is displayed as necessary both
on package install and other calls to the start target of the
init script.

[Ben Pfaff fixed up == to = in postinst]
2011-09-12 09:31:18 -07:00
Ben Pfaff
3eda9831a4 ovs-monitor-ipsec: Don't abort if syslog is not available.
If /dev/log doesn't exist or cannot be contacted, ovs-monitor-ipsec would
abort with an exception.  This allows it to start up and run.

It's pretty common for a chroot used for testing not to have a syslogd
instance set up and running, so this limitation caused testing problems.

Reported-by: Simon Horman <horms@verge.net.au>
Tested-by: Simon Horman <horms@verge.net.au>
2011-08-26 16:47:52 -07:00
Simon Horman
00488a5eef debian: Transition to dh_python2
dh_pysupport that the packaging used until now is deprecated, with
dh_python2 as its successor.

This commit removes the PYTHONPATH setting from
debian/openvswitch-ipsec.init because it is not needed, as the Python
packaging is public.  In fact, the Python packaging was public,
unintentionally, before, so the PYTHONPATH could have been removed earlier.
2011-08-26 09:14:55 -07:00
Chuck Short
49c57a8fef debian: Apply Ubuntu patch to add DKMS support.
I tested that installing openvswitch-datapath-dkms worked OK on my own
Debian machine.

The bulk of this patch is taken from downstream Ubuntu DKMS support written
by Chuck Short <zulcss@ubuntu.com>, version 1.2.0-1ubuntu1.  I made the
following changes:

  * Update debian/.gitignore.

  * Update debian/automake.mk.

  * Correct description in debian/control (it was a cut-and-paste from
    the openvswitch-datapath-source description without editing).

  * Fix up for --with-l26 to --with-linux and datapath/linux-2.6 to
    datapath/linux transitions.

CC: Chuck Short <zulcss@ubuntu.com>
CC: Dave Walker <DaveWalker@ubuntu.com>
Acked-by: Simon Horman <horms@verge.net.au>
2011-08-25 10:24:59 -07:00
Simon Horman
92f8ebf943 Debian: set -e in brcompat postinst
As reported by lintian:

	The maintainer script doesn't seem to set the -e flag which ensures
	that the script's execution is aborted when any executed command
	fails.

	Refer to Debian Policy Manual section 10.4 (Scripts) for details.
2011-08-24 09:45:44 -07:00
Simon Horman
4b944e5bfb Debian: Add dependency on ${misc:Depends}
Add dependency on ${misc:Depends} to openvswitch-brcompat and ovsdbmonitor.
As reported by Lintian:

	The source package uses debhelper, but it does not include
	${misc:Depends} in the given binary package's debian/control entry.
	Any debhelper command may add dependencies to ${misc:Depends} that
	are required for the work that it does, so recommended best
	practice is always add ${misc:Depends} to the dependencies of each
	binary package if debhelper is in use.

	Refer to the debhelper(7) manual page for details.
2011-08-24 09:26:14 -07:00
Ben Pfaff
df89525eb0 debian: Avoid installing duplicate files in ovsdbmonitor package.
This is just a typo introduced in commit 57483aeda (debian: Fix bug from
commit 211b05b5 "debian: Modernize use of dh_install.) that caused the
ovsdbmonitor package to install too many files.

Bug-report: http://bugs.debian.org/636815
Reported-by: Ralf Treinen <treinen@free.fr>
2011-08-10 09:13:12 -07:00
Ben Pfaff
298fd6d2d2 debian: Ensure that /var/run/openvswitch exists in controller init script.
It would be better to use ovs-ctl from this script, but until now this is
an adequate solution.

Reported-by: Jibesh Patra
Bug-report: https://bugs.launchpad.net/bugs/822142
2011-08-08 10:59:07 -07:00
Justin Pettit
5e9c5b61d3 Prepare Open vSwitch 1.2.0 release. 2011-08-03 15:09:45 -07:00
Justin Pettit
733a287e17 debian: Fix path for ovsdb-server in init script.
Reported-by: Brad Hall <brad@nicira.com>
2011-08-01 10:44:41 -07:00
Ben Pfaff
5e00790eef ovs-benchmark: New utility. 2011-07-27 16:23:06 -07:00
Ben Pfaff
9dae0a2675 debian: Move OVSDB schema and ovsdb-tool to openvswitch-switch.
ovs-vswitchd in the openvswitch-switch package is tightly coupled to its
database schema.  During development, it's possible to change the schema
without changing the Open vSwitch version number, which makes it possible
for the openvswitch-switch and openvswitch-common packages to get out of
sync: openvswitch-switch requires the same version of openvswitch-common,
but if the version number doesn't get updated that has no effect.

Actually putting the schema and ovs-vswitchd (its primary user) in the
same package prevents them from getting out-of-sync.  This commit also
moves ovsdb-tool because that program often works directly with OVSDB
schemas and so there's not much point having it around without a schema to
work with.
2011-07-26 17:14:36 -07:00
Ben Pfaff
57483aeda3 debian: Fix bug from commit 211b05b5 "debian: Modernize use of dh_install."
Commit 211b05b5 "debian: Modernize use of dh_install" caused build failures
in clean environments because debian/ovsdbmonitor.install now installed
files that were never created in such an environment.  It didn't cause a
build failure in my own testing because I still had old files around.
This fixes the problem.

It seems to be necessary to run "make install" once for each of binary-arch
and binary-indep, because dh_prep always deletes debian/tmp.  It is
logically not necessary but I don't see a clean and robust way to avoid it.
2011-07-26 14:56:00 -07:00
Ben Pfaff
9fc47ed759 debian: Add support for bridge compatibility.
This adds support for bridge compatibility to the generic Open vSwitch
init scripts and to the Debian packaging.

See https://bugs.launchpad.net/ubuntu/+source/openvswitch/+bug/808224.
2011-07-26 10:37:28 -07:00
Ben Pfaff
211b05b5a1 debian: Modernize use of dh_install.
Originally I intended this as just a cleanup, but as a side effect it also
installs some files from the install tree in debian/tmp instead of from
_debian.  This should avoid a reported problem in which ovs-bugtool was
being created in the source directory instead of the build directory (I
still don't see why this happened).

Reported-by: Sébastien RICCIO <sr@swisscenter.com>
Tested-by: Sébastien RICCIO <sr@swisscenter.com>
Acked-by: Simon Horman <horms@verge.net.au>
CC: Simon Horman <horms@verge.net.au>
2011-07-26 09:23:37 -07:00
Ben Pfaff
57c1c735da debian: Remove obsolete comment.
The comment is obsolete because the switch now starts by default, without
prior configuration.
2011-07-18 11:37:46 -07:00
Ben Pfaff
b2df0225a3 ovs-bugtool: Add plugins previously used only under XenServer.
All of the xen-bugtool plugins that OVS has previously installed only under
XenServer are equally useful with Debian and other distributions, so
this commit installs and uses them everywhere.
2011-07-13 12:44:06 -07:00
Ben Pfaff
51a5f442e2 ovs-bugtool: Make available outside of Debian packages.
ovs-bugtool is no longer Debian-specific, so install it everywhere.  (On
XenServer, specifically, we do not install it, because there xen-bugtool
already exists.)
2011-07-12 09:37:08 -07:00
Ben Pfaff
899d3c2d24 ovs-bugtool: Restore RHEL support.
ovs-bugtool was originally xen-bugtool from Citrix XenServer.  We modified
it for OVS by tailoring it to work better on Debian, updating file
locations and removing features that were specific to XenServer or that
work with packages not installed by default on Debian.

This commit reverts many of those changes.  This commit:

  - Adds back code that works with RHEL features not installed by default
    on Debian (but not XenServer-specific features, since xen-bugtool works
    nicely on XenServer).

  - Switches from hard-coded paths for utilities to searching the
    superuser's typical $PATH (because RHEL and Debian disagree on the
    location for some utilities).

  - In a few cases merges lists, e.g. now it looks for logs under the names
    used in both Debian and RHEL.

  - Fixes a few spurious differences between ovs-bugtool and xen-bugtool,
    e.g. in white space.
2011-07-12 09:33:10 -07:00
Ben Pfaff
391614125f debian: Remove obsolete reference to var/log/core.
Commit 14c3b136 "debian: Remove corekeeper package" removed the
var/log/core directory from the Debian packaging, but I missed this part.
2011-07-06 08:59:39 -07:00
Jesse Gross
22bcc0e70b datapath: Rename linux-2.6 and compat-2.6 directories.
The linux-2.6 and compat-2.6 directories apply equally to the upcoming
Linux 3.0 release, so this drops the 2.6 suffix and updates Makefiles.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2011-06-24 14:37:49 -07:00
Simon Horman
dc2882fad7 Debian: set source format to 3.0 (quilt)
This is my preferred package format as it allows changes
to be added as patches when the Debian package needs to
be updated between upstream releases.

I have been making this change in the Debian packages
so it seems as well to include it upstream.

[Update to debian/automake.mk by Ben Pfaff.]
2011-06-23 14:12:53 -07:00
Ben Pfaff
8a2d6596f2 configure: Change --with-l26 to --with-linux.
Linux 3.0 will be out soon, so it seems like a good idea to reflect that
in our "configure" script options.
2011-06-22 14:05:53 -07:00
Ben Pfaff
e5b2afdbde debian: Avoid implying that Linux 2.6.9 is supported. 2011-06-22 14:05:53 -07:00
Ben Pfaff
b3a375f242 Avoid inserting duplicate iptables rules when restarting vswitch.
On startup, some OVS initscripts insert an iptables rule to allow GRE
traffic (because GRE support is an important OVS feature).  I noticed that,
each time I restarted OVS, this added another GRE-related rule to the
iptables chain.  This is wasteful, because each additional rule increases
the time it takes to process a packet in the IP stack.

This commit avoids the problem by inserting an iptables rule when there
isn't already an appropriate rule.  It also avoids inserting an iptables
rule if the iptables policy is ACCEPT, meaning that packets are accepted
by default; in such a case, if the GRE packet would be dropped, it is
because the system administrator made that decision explicitly.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2011-06-21 16:40:44 -07:00