xenserver: Fix "brctl show" compatibility by introducing "brctl" wrapper.
authorBen Pfaff <blp@nicira.com>
Wed, 19 Aug 2009 21:14:40 +0000 (14:14 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 19 Aug 2009 22:10:39 +0000 (15:10 -0700)
commit8521345b51ef456819412b175538555eb9f3c152
treeb8f5949a729b462d7176dd9cd14f71baf2018a2a
parent9d04e270a8749d8dc54cef860abfc8c95823ff28
xenserver: Fix "brctl show" compatibility by introducing "brctl" wrapper.

Bug NIC-19, which reported that "brctl show" did not format its output in
the way expected by Citrix QA scripts, was believed fixed by commit
35c979bff4 "vswitchd: Support creating fake bond device interfaces."
Unfortunately, this commit was not tested on a XenServer before it was
committed.  Due to differences in the actual test environment and the
XenServer environment, which have different versions of the bridge-utils
package that contains brctl, that commit did not fix the problem observed
by Citrix QA.  In particular, the XenServer brctl uses sysfs to obtain
the information displayed by "brctl show", but the previous commit only
fixed up the information output by the bridge ioctls.

The natural way to fix this problem would be to fix up the sysfs support
as well.  I started out along that path, but became bogged down in all
the details of the kernel sysfs.

This commit takes an alternate approach, by introducing a wrapper around
the system brctl binary that implements "brctl show" itself and delegates
all other functionality to the original binary (in a different location).
This will not fix tools that do not call into brctl, but to the best of
my knowledge there are no such tools used in the Citrix QA process.

Thanks to Justin and Reid for much feedback.

Bug NIC-19.
xenserver/README
xenserver/automake.mk
xenserver/usr_sbin_brctl [new file with mode: 0755]
xenserver/vswitch-xen.spec