RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 787107 - "ifdown-eth: line 69: echo: write error: Invalid argument" when making a bonding device down
Summary: "ifdown-eth: line 69: echo: write error: Invalid argument" when making a bond...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: initscripts
Version: 6.2
Hardware: x86_64
OS: Linux
urgent
high
Target Milestone: rc
: ---
Assignee: initscripts Maintenance Team
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks: 1212352
TreeView+ depends on / blocked
 
Reported: 2012-02-03 07:13 UTC by Kamal Maiti
Modified: 2019-05-20 11:01 UTC (History)
5 users (show)

Fixed In Version: initscripts-9.03.28-1.el6
Doc Type: Bug Fix
Doc Text:
Due to an incorrect logic operator, using initscripts to shut down the network service previously failed with an "Invalid argument" error. With this update, the code of the shutdown init script has been modified to prevent the problem, and the error is no longer returned on network service shutdown.
Clone Of:
: 1212352 (view as bug list)
Environment:
RHEL 6.2
Last Closed: 2012-06-20 13:09:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0816 0 normal SHIPPED_LIVE initscripts bug fix and enhancement update 2012-06-19 20:34:23 UTC

Description Kamal Maiti 2012-02-03 07:13:25 UTC
Description of problem:

Found following error while doing "service network restart" having bonded Ethernet :

"ifdown-eth: line 69: echo: write error: Invalid argument" when making a bonding device down

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

initscripts-9.03.27-1.el6.x86_64

How reproducible:

Error appeared in RHEL 6.2 : (initscripts-9.03.27-1.el6.x86_64)

Testing :

cat /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
BOOTPROTO=none
ONBOOT=yes
NETWORK=192.168.122.255
NETMASK=255.255.255.0
IPADDR=192.168.122.225
USERCTL=no
BONDING_OPTS="mode=1 arp_interval=1000 arp_ip_target=192.168.122.255 arp_validate=3"   

[root@~]# ifup bond0

$fconfig
bond0     Link encap:Ethernet  HWaddr 00:00:00:00:00:00  
          inet addr:192.168.122.225  Bcast:192.168.122.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

[root@ ~]cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 6.2 (Santiago)

$rpm -qf /etc/sysconfig/network-scripts/ifdown-eth
initscripts-9.03.27-1.el6.x86_64

$service network restart
Shutting down interface bond0:  /etc/sysconfig/network-scripts/ifdown-eth: line 69: echo: write error: Invalid argument
                                                           [  OK  ]
Shutting down interface eth0:                              [  OK  ]
Shutting down loopback interface:                          [  OK  ]
Bringing up loopback interface:                            [  OK  ]
Bringing up interface bond0:                               [  OK  ]
Bringing up interface eth0:                                [  OK  ]

>> vi /etc/sysconfig/network-scripts/ifdown-eth: line 69 :

--------------
if is_bonding_device ${DEVICE} ; then
    for device in $(LANG=C egrep -l "^[[:space:]]*MASTER=\"?${DEVICE}\"?" /etc/sysconfig/network-scripts/ifcfg-*) ; do
        is_ignored_file "$device" && continue
        /sbin/ifdown ${device##*/}
    done
    for arg in $BONDING_OPTS ; do
        key=${arg%%=*};
        [[ "${key}" != "arp_ip_target" ]] || continue
        value=${arg##*=};
        if [ "${value:0:1}" != "" ]; then
            OLDIFS=$IFS;
            IFS=',';
            for arp_ip in $value; do
                if grep -q $arp_ip /sys/class/net/${DEVICE}/bonding/arp_ip_target; then
                    echo "-$arp_ip" > /sys/class/net/${DEVICE}/bonding/arp_ip_target    //69th Line
                fi
            done
            IFS=$OLDIFS;
        else
            value=${value#+};
            if grep -q $value /sys/class/net/${DEVICE}/bonding/arp_ip_target; then
                echo "-$value" > /sys/class/net/${DEVICE}/bonding/arp_ip_target
            fi
        fi
    done
fi
----------------

Steps to Reproduce:

1. Check above

  
Actual results:

Shutting down interface bond0:  /etc/sysconfig/network-scripts/ifdown-eth: line 69: echo: write error: Invalid argument

Expected results:

No error

Additional info:

Similar bug found in BZ#745681 on RHEL 5.7 and this will be fixed in rhel5.8. Issue doesn't appear with initscripts-9.03.23-1.el6.x86_64 on RHEL 6.1. Problem appears with initscripts-9.03.27-1.el6.x86_64 on RHEL 6.2

Comment 2 Bill Nottingham 2012-02-03 16:40:32 UTC
05d7d8b6ee43103a589c8a999d5d96bdcd06f519 is the upstream commit.

Comment 9 errata-xmlrpc 2012-06-20 13:09:47 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0816.html


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