Bug 459145 - Can't use custom xen bridge script with cman
Can't use custom xen bridge script with cman
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: cman (Show other bugs)
5.2
All Linux
medium Severity medium
: rc
: ---
Assigned To: Ryan O'Hara
Cluster QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-08-14 14:08 EDT by Bryn M. Reeves
Modified: 2010-10-22 23:45 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-20 16:52:09 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bryn M. Reeves 2008-08-14 14:08:36 EDT
Description of problem:
The file /etc/xen/xend-config.xsp allows for tweaking the default network script for xenbridges configuration. The default is (network-script network-bridge).

When used with cman the bridges are started from the cman init script. In RHEL-5.2 this uses the following script fragment:

xend_bridged_net_start() {
    if [ ! -x /etc/xen/scripts/network-bridge ]; then
        if [ -f /etc/xen/scripts/network-bridge ]; then
            errmsg='The xend bridged network script cannot be run'
        else
            errmsg='The xend bridged network script is missing'
        fi
        return 1
    fi
    
    /sbin/modprobe netbk >& /dev/null
    /sbin/modprobe netloop >& /dev/null
    bridge_parms=`egrep -m 1 "^[[:blank:]]*\([[:blank:]]*network-script[[:blank:]]+(')?[[:blank:]]*network-bridge([[:blank:]]*\)|[[:blank:]]+)" /etc/xen/xend-config.sxp| sed -r "s/^[[:blank:]]*\([[:blank:]]*network-script[[:blank:]]+'?[[:blank:]]*network-bridge[[:blank:]]*//; s/'?[[:blank:]]*\).*//"`
    errmsg=$(/etc/xen/scripts/network-bridge start $bridge_parms 2>&1) || return 1
    return 0
}

This seems to hard code the path to the script:

    errmsg=$(/etc/xen/scripts/network-bridge start $bridge_parms 2>&1) || return 1

Although it does retrieve customised parameters from xend-config.sxp and applies these when starting the bridge.

Version-Release number of selected component (if applicable):
cman-2.0.84-2.el5

How reproducible:
100%

Steps to Reproduce:
1. Configure a custom bridge script in xend-config.sxp, e.g. add:

(network-script mynetwork)

2. Create the mynetwork script in the /etc/xen/scripts directory
3. Start cman services
  
Actual results:
No bridges are started

Expected results:
Custom bridge script runs. Bridges start.

Additional info:
Comment 15 RHEL Product and Program Management 2008-08-28 11:52:16 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
release.
Comment 19 Ryan O'Hara 2008-08-29 11:12:14 EDT
Fixed in RHEL5 branch.

The fix is to use a NETWORK_BRIDGE_SCRIPT variable. If users wish to use a custom Xen network bridge script, they should define NETWORK_BRIDGE_SCRIPT in /etc/sysconfig/cman and update the /etc/xen/xend-config.sxp file accordingly.

The default value for NETWORK_BRIDGE_SCRIPT is "network-bridge" (the old hard-coded script name). If a custom script is desired, it must exist in /etc/xen/scripts and be executable.
Comment 23 errata-xmlrpc 2009-01-20 16:52:09 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 therefore 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.

http://rhn.redhat.com/errata/RHBA-2009-0189.html

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