in init_l3 ip address delete may occurrent delete multiple ips

Bug #1343320 reported by Zang MingJie
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Zang MingJie

Bug Description

For example:

# ip ad add 10.1.1.1/24 dev lo
# ip ad add 10.1.1.2/24 dev lo

# ip ad
1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 10.1.1.1/24 scope global lo
       valid_lft forever preferred_lft forever
    inet 10.1.1.2/24 scope global secondary lo
       valid_lft forever preferred_lft forever

# ip ad del 10.1.1.1/24 dev lo
# ip ad
1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00

Added two ips, and deleted one, all ips are gone.

This is because 10.1.1.2 is secondary, if the primary address is deleted, also does the secondary address.

There is an sysconf entry controls the behaviour of deleting primary ip (/proc/sys/net/ipv4/conf/all/promote_secondaries). when set instead of deleting the secondary address, it will be promoted to primary ip

We should set it when creating a namespace.

description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/107743

Changed in neutron:
assignee: nobody → Zang MingJie (zealot0630)
status: New → In Progress
Kyle Mestery (mestery)
Changed in neutron:
milestone: none → juno-3
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/107743
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=141a00bd274ea7f90fcfe784e358bb6035af6e84
Submitter: Jenkins
Branch: master

commit 141a00bd274ea7f90fcfe784e358bb6035af6e84
Author: Zang MingJie <email address hidden>
Date: Thu Jul 17 23:06:07 2014 +0800

    Set promote_secondaries when creating namespaces

    there is a sysconf entry which controls how deletion of the primary ip
    is performed (/proc/sys/net/ipv4/conf/all/promote_secondaries). when set
    instead of deleting the secondary addresses, one of them will be
    promoted to primary ip.

    Without it, when init_l3 called on a port, it may unexpectedly delete
    some useful ips.

    Change-Id: I0b1b3bd6ade21129532c842daa31059ea164719e
    Closes-bug: 1343320

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: juno-3 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.