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 1136733 - all addresses deleted after delete the first ip on device
Summary: all addresses deleted after delete the first ip on device
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel
Version: 6.0
Hardware: All
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Jiri Benc
QA Contact: Red Hat Kernel QE team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-03 07:42 UTC by Sun Baoliang
Modified: 2015-01-21 23:06 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-03 08:58:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Sun Baoliang 2014-09-03 07:42:47 UTC
Description of problem:


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

[root@hp-dl385pg8-04 sysctl2]# uname -r
2.6.32-497.el6.x86_64
How reproducible:
always

Steps to Reproduce:
1.add 4 ip to eth9
[root@hp-dl385pg8-04 sysctl2]# ip addr add 3.3.3.4/24 dev eth9
[root@hp-dl385pg8-04 sysctl2]# ip addr add 3.3.3.3/24 dev eth9
[root@hp-dl385pg8-04 sysctl2]# ip addr add 3.3.3.2/24 dev eth9
[root@hp-dl385pg8-04 sysctl2]# ip addr add 3.3.3.1/24 dev eth9
[root@hp-dl385pg8-04 sysctl2]# ip addr show
11: eth9: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 8c:7c:ff:2e:14:01 brd ff:ff:ff:ff:ff:ff
    inet 3.3.3.4/24 scope global eth9
    inet 3.3.3.3/24 scope global secondary eth9
    inet 3.3.3.2/24 scope global secondary eth9
    inet 3.3.3.1/24 scope global secondary eth9
    inet6 2001::8e7c:ffff:fe2e:1401/64 scope global dynamic 
       valid_lft 86344sec preferred_lft 14344sec
    inet6 fe80::8e7c:ffff:fe2e:1401/64 scope link 
       valid_lft forever preferred_lft forever

2.delete last on[3.3.3.1/24]
[root@hp-dl385pg8-04 sysctl2]# ip addr del 3.3.3.1/24 dev eth9
[root@hp-dl385pg8-04 sysctl2]# 
[root@hp-dl385pg8-04 sysctl2]# ip addr show dev eth9
11: eth9: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 8c:7c:ff:2e:14:01 brd ff:ff:ff:ff:ff:ff
    inet 3.3.3.4/24 scope global eth9
    inet 3.3.3.3/24 scope global secondary eth9
    inet 3.3.3.2/24 scope global secondary eth9
    inet6 2001::8e7c:ffff:fe2e:1401/64 scope global dynamic 
       valid_lft 86392sec preferred_lft 14392sec
    inet6 fe80::8e7c:ffff:fe2e:1401/64 scope link 
       valid_lft forever preferred_lft forever

3.delete the first one[3.3.3.4/24]
[root@hp-dl385pg8-04 sysctl2]# ip addr del 3.3.3.4/24 dev eth9
[root@hp-dl385pg8-04 sysctl2]# ip addr show dev eth9
11: eth9: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 8c:7c:ff:2e:14:01 brd ff:ff:ff:ff:ff:ff
    inet6 2001::8e7c:ffff:fe2e:1401/64 scope global dynamic 
       valid_lft 86385sec preferred_lft 14385sec
    inet6 fe80::8e7c:ffff:fe2e:1401/64 scope link 
       valid_lft forever preferred_lft forever
Actual results:
delete the first ip,all ip deleted.
delete other ip , there is no problem.

Expected results:
delete a ip, just delete one ip

Additional info:

Comment 2 Pavel Šimerda (pavlix) 2014-09-03 08:44:39 UTC
Switching to component kernel after consulting with Jiří Benc, as this is kernel behaviour, looking forward to more details from Jiří.

Note: Bugzilla is currently not capable of changing the component.

Comment 3 Jiri Benc 2014-09-03 08:58:54 UTC
You're adding multiple addresses in the same subnet, thus the second and subsequent ones become secondaries. This can be seen in the "ip addr show" output, note the keyword "secondary" next to those addresses.

By default, when deleting a primary address, kernel deletes also all respective secondaries.

If you want one of the secondaries to be promoted to be a new primary on primary deletion, set the net.ipv4.conf.eth9.promote_secondaries sysctl.

Comment 4 Sun Baoliang 2014-09-03 11:06:18 UTC
(In reply to Jiri Benc from comment #3)
> You're adding multiple addresses in the same subnet, thus the second and
> subsequent ones become secondaries. This can be seen in the "ip addr show"
> output, note the keyword "secondary" next to those addresses.
> 
> By default, when deleting a primary address, kernel deletes also all
> respective secondaries.
> 
> If you want one of the secondaries to be promoted to be a new primary on
> primary deletion, set the net.ipv4.conf.eth9.promote_secondaries sysctl.

Got it. Thanks for your answer.


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