FAQ Search Today's Posts Mark Forums Read

» Linux Archive
Home
New Posts
Search
FAQ


Go Back   Linux Archive > Redhat > Fedora/Linux Management Tools

 
 
LinkBack Thread Tools
 
Old 07-09-2008, 03:47 PM
Cole Robinson
 
Default Anyone have a bonding device setup working with virt-manager?

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("
")
+ 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.

This code is from:

http://hg.et.redhat.com/virt/applications/virt-manager--devel?cs=6a155cfe437c

Thanks,
Cole

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
 
Old 07-09-2008, 04:06 PM
"Daniel P. Berrange"
 
Default Anyone have a bonding device setup working with virt-manager?

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("
")
> + 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
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
 
Old 07-09-2008, 05:44 PM
Cole Robinson
 
Default Anyone have a bonding device setup working with virt-manager?

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("
")
>> + 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@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
 

Thread Tools




All times are GMT. The time now is 08:37 AM.

VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org