vswitchd: Add error column to Interface table to store error condition
authorThomas Graf <tgraf@redhat.com>
Thu, 10 Apr 2014 10:50:10 +0000 (12:50 +0200)
committerBen Pfaff <blp@nicira.com>
Mon, 19 May 2014 22:42:30 +0000 (15:42 -0700)
commitbbe6109de720e073a4ae78910577f7747cef3bc6
tree29ae758f4aa46d1614dce0038d8973d297f88cce
parentdc0e34c51b3dc28dd8a3e647fbf5d561590a1c50
vswitchd: Add error column to Interface table to store error condition

Store the error condition of a failed port configuration in a new
column 'error' in the Interface table.

Example:
$ ovs-vsctl add-port br0 test -- \
     set Interface test type=vxlan options:unknown=1
ovs-vsctl: Error detected while setting up 'test'.  [...]

$ ovs-vsctl list Interface test | grep error
error         : "test: could not set configuration (Invalid argument)"

Fixing the error will clear the error column:
$ ovs-vsctl set Interface test options:remote_ip=1.1.1.1
$ ovs-vsctl list Interface test | grep error
error         : []
$

For now, the high level error messages when opening and configuring
the netdev are used. Further patches can extend passing the error
pointer into the individual netdev implementations to allow for more
fine grained error messages to be stored.

Signed-off-by: Thomas Graf <tgraf@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/netdev.c
lib/netdev.h
utilities/ovs-dpctl.c
vswitchd/bridge.c
vswitchd/vswitch.ovsschema
vswitchd/vswitch.xml