Age | Commit message (Collapse) | Author |
|
|
|
When --monitor is used, administrators sometimes become confused about the
presence of two copies of each process. This commit attempts to clarify
the situation by making the monitoring process change its process name, as
seen in /proc/$pid/cmdline and in "ps", to clearly indicate what is going
on.
CC: Dan Wendlandt <dan@nicira.com>
|
|
All of these programs were re-reporting an error that
unixctl_server_create() had already reported. There's no need for that.
|
|
This builds on earlier work that implemented netdev object refcounting.
However, rather than requiring explicit create and destroy calls,
these operations are now performed automatically based on the referenece
count. This is important because in certain situations it is not
possible to know whether a netdev has already been created. A
workaround existed (which looked fairly similar to this paradigm) but
introduced it's own issues. This simplifies and unifies the API.
|
|
|
|
When ovs-brcompatd can't connect to the database, the "ovs" variable
is never set. The function "brc_recv_update" takes care of draining
brcompat kernel module's netlink messages. When the netlink message
comes in to modify the bridge, that function never gets called, so a
netlink message always appears to be ready and we consume 100% CPU
looping.
With this commit, we log a warning and drop the request on the floor.
Bug #2373
|
|
During the transition to the configuration database, not all code from
the bridge compatibility layer was updated. In particular, the code
which removes port configuration based on RTNL notifications of port
removal was not updated. This commit brings that code back.
Note that the code that removes ports based on actively checking whether
ports exist is still commented out pending a review of its impact on GRE
support.
Bug #2370
|
|
This module, which catches segmentation faults and prints a backtrace
before exiting, was useful for a while, but I believe that it has now
outlived its purpose. It is altogether better to have a core dump from
which one can extract much more information than a usually-poor backtrace,
and core dumps are much better integrated into a typical Unix system.
In addition, the "fault" module was of course not all that portable.
|
|
There are conflicting pressures in startup of a daemon process:
* The parent process should exit with an error code if the daemon
cannot start up successfully.
* Some startup actions must be performed in the child process, not in
the parent. The most obvious of these are file locking, since
child processes do not inherit locks, and anything that requires
knowing the child process's PID (e.g. unixctl sockets).
Until now, this conflict has usually been handled by giving up part of the
first property, i.e. in some cases the parent process would exit
successfully and the child immediately afterward exit with a failure code.
This commit introduces a better approach, by allowing daemons to perform
startup work in the child and only then signal the parent that they have
successfully started. If the child instead exits without signaling
success, the parent passes this exit code along to its own parent.
This commit also modifies the daemons that can usefully take advantage of
this new feature to do so.
|
|
The ovs-brcompatd code was trying hard to make sure that an Open_vSwitch
record would exist in the database before it would look for one. It is
easier to just check for a record and use it if it is there, and it is
also more robust against databases that have not been initialized.
|
|
This status was introduced several commits ago but not added to the switch
statement here.
Also, change the "status" variable to type enum ovsdb_idl_txn_status so
that GCC will warn about future additions.
|
|
With the config DB, it is no longer necessary to lock the config file.
This removes references to the need for that.
|
|
This is an extremely lightly tested attempt at switching ovs-brcompatd
from using the config file to the new config db. There are a lot of
shortcomings in this cut, but we need to make progress on the XenServer
integration, so it's going in now. Expect changes in the near future.
|
|
Two issues exist that prevent GRE tunnels from working properly on
Xen: iptables rules and brcompatd. The first issue is that GRE
traffic is not permitted by the default iptables rules. The second
is that brcompatd removes ports from the configuration that it
believes do not exist, which causes GRE ports to be deleted before
they are created.
This commit avoids these issues though not in the most optimal way.
Better fixes will be forthcoming in the near future.
|
|
It is inconvenient to type the whole path to the Unix daemon socket when
using ovs-appctl. Allow the name of the daemon to be used instead when
a pidfile exists in the default location, and contact ovs-vswitchd by
default.
Also, the various options for manipulating vlog were invented before the
general-purpose command mechanism existed. Get rid of all of the action
options in favor of just specifying the command to be executed as
non-option arguments.
Finally, there simply wasn't much value in allowing multiple targets or
options to be specified; these variations were never used in practice. So
simplify the interface by making it one target, one action per invocation.
Also, make ovs-vsctl use the same syntax for its --target option.
Based on work by Justin Pettit.
|
|
|
|
vlan.%s.* will match e.g. eth0.123 if the %s expands to eth0. We only
want it to match eth0 in that case.
This is based on code inspection. It may or may not fix a real problem.
|
|
|
|
This was a somewhat difficult merge since there was a fair amount of
superficially divergent development on the two branches, especially in the
datapath.
This has been build-tested against XenServer 5.5.0 and XenServer 5.7.0
build 15122. It has been booted and connected to XenCenter on 5.5.0.
The merge revealed a couple of outstanding bugs, which will be fixed on
citrix and then merged back into master.
|
|
The BRCTL_GET_PORT_LIST ioctl is not supposed to include the bridge port
itself in the list of ports, but ovs-brcompatd was doing that.
|
|
|
|
|
|
The Citrix QA scripts assume that "brctl show" will show a topology as if
the Linux bridge were still in use; that is, as if there were one bridge
per VLAN and as if bonds were network devices of their own instead of
separate devices. However, we were showing the datapath topology, i.e.
all VLANs and bond devices lumped together into a single datapath. This
commit fixes the VLAN end of the problem, by moving the implementation of
the ioctls that brctl uses into userspace in ovs-brcompatd and putting the
necessary translation logic into ovs-brcompatd.
By itself, this commit does not fix the problem for bonds: the port name
for a bond does not (normally) under Open vSwitch exist as an actual
Linux network device, and thus it has no ifindex, and so ovs-brcompatd
can't pass it back to the kernel to report to brctl. This fix will have
to wait for another commit.
Bug NIC-19.
|
|
An upcoming commit wants to do the same thing in another place, so break
the logic into a function.
|
|
handle_fdb_query_cmd() should return an error when an error occurs, but
in this case it was always returning 0, because error is known to have
value 0 at this point.
Nothing really uses the return value here, and so eventually it would make
sense to just change the return type here and in the rest of the
handle_*() functions to void.
|
|
Upcoming commits will require sending Netlink messages to the kernel that
have additional attributes. Instead of adding more arguments to
send_reply() to handle these, it's cleaner to break up send_reply() into
two functions and let the caller add those attributes itself.
|
|
The BRCTL_GET_BRIDGES ioctl is going to move to userspace, but that ioctl
doesn't provide a bridge name as argument, so we need to support that.
|
|
A previous checkin added the cfg_init() function, so we now call it. We
also check the return value of the initial call to cfg_read(), since if
it fails, there's not much point in continuing.
|
|
This new abstraction layer allows multiple implementations of network
devices in a single running process. This will be useful, for example, to
support network devices that are simulated entirely in the running process
or that communicate with other processes over Unix domain sockets, etc.
The reimplemented tap device support in this commit has not been tested.
|
|
The netdev_nodev_*() functions have always been a bit of a kluge. It's
better to keep a network device open than to open it every time that it is
needed. This commit converts all of the users of these functions to use
the corresponding functions that take a "struct netdev *" instead.
|
|
This new function allows cleanup of code that was using
netdev_nodev_get_flags() or ad-hoc methods to detect whether a network
device with the given name exists.
|
|
The kernel only handles a single VLAN per bridge, but vswitchd can deal
with all the VLANs on a single bridge. This commit makes "brctl showmacs"
pretend that the former is the case even though the latter is the
implementation.
Bug #1567.
|
|
This is needed by the Citrix test infrastructure.
|
|
An upcoming commit will also need to gather all of the interfaces on a
specified bridge, so break this code into a helper function.
|
|
These messages proved useful during debugging, and they should not be too
common, so log them at a higher level.
|
|
XenServer Tools version 5.0.0 destroys and recreates network devices with
the same name on boot of (at least) Windows VMs. We had a race such that
ovs-brcompatd would delete the new device from the vswitchd configuration
file (not the old one). This commit fixes that problem.
Bug #1429.
|
|
|
|
|