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 1311811 - ifdown on lo alias does not work
Summary: ifdown on lo alias does not work
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: initscripts
Version: 6.7
Hardware: x86_64
OS: Linux
urgent
urgent
Target Milestone: rc
: ---
Assignee: David Kaspar // Dee'Kej
QA Contact: Jan Ščotka
Mirek Jahoda
URL:
Whiteboard:
Depends On:
Blocks: 1269194 1356056 1359260 1370193 1398678 1420052 1420053
TreeView+ depends on / blocked
 
Reported: 2016-02-25 03:43 UTC by Jonathan Maxwell
Modified: 2020-04-15 14:23 UTC (History)
9 users (show)

Fixed In Version: initscripts-9.03.54-1
Doc Type: Bug Fix
Doc Text:
"ifdown" on a loopback device now works properly In Red Hat Enterprise Linux version 6.7 and 6.8, executing the "ifdown" command on a local loopback device failed to remove the device. A patch has been applied, and the removal of an existing loopback device using "ifdown" now succeeds.
Clone Of:
: 1398678 1420052 1420053 (view as bug list)
Environment:
Last Closed: 2017-03-21 11:52:32 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2327451 0 None None None 2016-05-17 17:54:45 UTC
Red Hat Product Errata RHBA-2017:0786 0 normal SHIPPED_LIVE initscripts bug fix update 2017-03-21 12:49:53 UTC

Description Jonathan Maxwell 2016-02-25 03:43:36 UTC
Description of problem:

when executing ifdown lo:0, it does not report an error but fails to remove the device.

This worked on RHEL6.6 but fails on RHEL6.7. Replacing RHEL6.7 /etc/sysconfig/ifdown-eth with a RHEL6.6 fixed the problem.

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

RHEL6.7

# rpm -qa |grep initscr
initscripts-9.03.49-1.el6.x86_64

How reproducible:

Always
Steps to Reproduce:
1. Install RHEL6.7 and make sure above initscript version is installed.
2. Create the following /etc/sysconfig/network-scripts/ifcfg-lo:0 file:

DEVICE=lo:0
IPADDR=192.55.1.1
NETMASK=255.255.255.255
ONBOOT=yes
NAME=loopback
ARP=no

3. Bring the device up:

# ifup lo:0

4. Now ifdown:

# ifdown lo:0

The device is still there:

# ifconfig
.
.
lo:0      Link encap:Local Loopback  
          inet addr:192.55.38.53  Mask:255.255.255.255
          UP LOOPBACK RUNNING NOARP  MTU:65536  Metric:1

Actual results:

The lo:0 device is not removed.

Expected results:

The lo:0 device should be removed.

Additional info:

I add the following patch:

https://git.fedorahosted.org/cgit/initscripts.git/commit/?h=rhel6-branch&id=78cbc202ad90ffc9256bfd3b45c423eeff0e97b5

However the problem remained. 

Then I changed the following:

if [ "${REALDEVICE}" = "lo" ]; then
       ip addr flush dev ${REALDEVICE} ${LABEL} scope host 2>/dev/null

to

ip addr flush dev ${REALDEVICE} ${LABEL} scope global 2>/dev/null

Here is the diff:

# diff -Naur /etc/sysconfig/network-scripts/ifdown-eth ifdown-eth.fix
--- /etc/sysconfig/network-scripts/ifdown-eth	2016-02-24 22:35:42.092750956 -0500
+++ ifdown-eth.fix	2016-02-24 22:35:07.495844305 -0500
@@ -111,7 +111,7 @@
 		LABEL="label ${DEVICE}"
 	fi
 	if [ "${REALDEVICE}" = "lo" ]; then
-		ip addr flush dev ${REALDEVICE} ${LABEL} scope host 2>/dev/null
+		ip addr flush dev ${REALDEVICE} ${LABEL} scope global 2>/dev/null
 	else
 		ip addr flush dev ${REALDEVICE} ${LABEL} scope global 2>/dev/null
 		ip -4 addr flush dev ${REALDEVICE} ${LABEL} scope host 2>/dev/null

and that fixed the problem.

Comment 2 Lukáš Nykrýn 2016-02-25 09:27:01 UTC
Unfortunately running flush on lo devices with scope global brings other problems
https://bugzilla.redhat.com/show_bug.cgi?id=1072967

Comment 3 Jonathan Maxwell 2016-02-25 21:53:35 UTC
I wonder why flushing lo with global hangs in the bz_1072967 case? I don't see that behaviour on my LAB system. It shutdowns and boots up fine with this change.

Comment 13 Lukáš Nykrýn 2016-06-30 05:44:51 UTC
"fixed" in upstream rhel6 branch -> https://git.fedorahosted.org/cgit/initscripts.git/commit/?h=rhel6-branch&id=d59202d1d37c23126e17f8bc05d8a05d059b72a0 -> post

Comment 14 Ashish Vijayaram 2016-08-22 18:51:06 UTC
This bug is present in CentOS 7 as well - https://bugs.centos.org/view.php?id=10980. Can the upstream fix be ported over for the rhel7-branch as well?

Comment 15 Ashish Vijayaram 2016-08-22 18:56:27 UTC
Apologies, ignore Comment 14.

Comment 17 David Kaspar // Dee'Kej 2016-11-07 14:03:32 UTC
Commit was accepted:
https://github.com/fedora-sysv/initscripts/commit/d59202d1d37c23126e17f8bc

Comment 26 errata-xmlrpc 2017-03-21 11:52:32 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.

https://rhn.redhat.com/errata/RHBA-2017-0786.html


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