Bug 459145 - Can't use custom xen bridge script with cman
Summary: Can't use custom xen bridge script with cman
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: cman
Version: 5.2
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Ryan O'Hara
QA Contact: Cluster QE
Depends On:
TreeView+ depends on / blocked
Reported: 2008-08-14 18:08 UTC by Bryn M. Reeves
Modified: 2018-10-27 12:55 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2009-01-20 21:52:09 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:0189 0 normal SHIPPED_LIVE cman bug-fix and enhancement update 2009-01-20 16:05:55 UTC

Description Bryn M. Reeves 2008-08-14 18:08:36 UTC
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'
            errmsg='The xend bridged network script is missing'
        return 1
    /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):

How reproducible:

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 Program Management 2008-08-28 15:52:16 UTC
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 19 Ryan O'Hara 2008-08-29 15:12:14 UTC
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 21:52:09 UTC
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.


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