Daniel P. Berrange wrote: > On Wed, Jul 09, 2008 at 11:47:23AM -0400, Cole Robinson wrote: >> Hi All, >> >> Back in February, support for checking bonding and vlan devices was >> added to virt-manager, and released in version 0.5.4. I'm curious if >> anyone has a working setup with this code? >> >> Reason I ask is that I backported this code to rhel5.2 and it doesn't >> seem to work, because of the following bit: >> >> + def _net_get_bonding_masters(self): >> + masters = [] >> + f = open("/sys/class/net/bonding_masters") >> + while True: >> + rline = f.readline() >> + if not rline: break >> + if rline == "\x00": continue >> + rline = rline.strip("\n\t") >> + masters = rline[:-1].split(' ') >> ^^^ >> this piece >> + return masters >> >> For some reason the last character is stripped off, which breaks all >> the setups I've tested on. Clearly this must have worked for someone >> at some time, so I would be curious to get some help from someone with >> a working setup, since there must be some middle ground that can work >> for both parties. I've tried contacting the original author but haven't >> received a response. > > Interesting - that code was tested on a machine running Fedora 8 IIRC > so its quite possible the older RHEL-5 kernel had slightly different > info in sysfs. > > Daniel That's my guess as well: on the RHEL setup this was stripping a legitimate character. Maybe there is some seperator or whitespace character that is present on f8? If anyone has a bonding setup on fedora they could probably paste their /sys/class/net/bonding_masters (and possibly a hexdump of it) and we could fix this. - Cole _______________________________________________ et-mgmt-tools mailing list et-mgmt-tools@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/et-mgmt-tools