Bug 237667 - network-bridge fails on some machines
network-bridge fails on some machines
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: xen (Show other bugs)
All Linux
medium Severity high
: ---
: ---
Assigned To: Herbert Xu
Depends On:
Blocks: 236524
  Show dependency treegraph
Reported: 2007-04-24 12:36 EDT by Daniel de Kok
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version: RHEA-2007-0635
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-11-07 12:10:23 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Fix addr_pfx test (745 bytes, patch)
2007-04-24 19:38 EDT, Herbert Xu
no flags Details | Diff

  None (edit)
Description Daniel de Kok 2007-04-24 12:36:35 EDT
Description of problem:
network-bridge fails halfway the script, leaving networking in a unusable state,
due to incorrect parsing of 'ip addr show' output.

Version-Release number of selected component (if applicable):


How reproducible:

Upgrade to this package version.

Additional info:

xen-network-bonding-fix.patch makes the following change:
 get_ip_info() {
-    addr_pfx=`ip addr show dev $1 | egrep '^ *inet' | sed -e 's/ *inet //' -e
's/ .*//'`
+    addr_pfx=`ip addr show dev $1 | sed -n 's/^ *inet \(.*\) [^ ]*$/\1/p'`
     gateway=`ip route show dev $1 | fgrep default | sed 's/default via //'`

This doesn't work for all 'ip addr show' output, for instance:
# ip addr show dev eth1
8: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue
    link/ether 00:30:6e:12:d3:5a brd ff:ff:ff:ff:ff:ff
    inet scope global eth1
    inet6 fe80::230:6eff:fe12:d35a/64 scope link
       valid_lft forever preferred_lft forever

Reverting back to the old line fixes this problem. Though this is not to
accurate either, because it also includes inet6 lines. This works great for me:

    addr_pfx=`ip addr show dev $1 | egrep '^ *inet ' | sed -e 's/ *inet //' -e
's/ .*//'`
Comment 1 RHEL Product and Program Management 2007-04-24 13:43:44 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
Comment 2 Herbert Xu 2007-04-24 19:38:39 EDT
Created attachment 153392 [details]
Fix addr_pfx test

Actually, we do want to keep the 'scope global' when copying the address.  I
think the problem here is that the addr_pfx shell test doesn't cope with the
space.	Could you please see if this patch makes your problem go away?

Comment 3 Daniel de Kok 2007-04-25 04:57:29 EDT
Confirmed, the patch fixes this problem correctly.

Comment 5 Daniel Berrange 2007-06-26 15:23:24 EDT
Built as xen-3.0.3-30.el5 into dist-5E-qu-candidate

* Tue Jun 26 2007 Daniel P. Berrange <berrange@redhat.com> - 3.0.3-30.el5
- Fix address test in network-bridge (rhbz 237667)

Comment 8 errata-xmlrpc 2007-11-07 12:10:23 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.