IndexAllocator is not deleted when a subnet is deleted

Bug #1365824 reported by Numan Siddique
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.2
Fix Committed
Undecided
Numan Siddique
R4.0
Fix Committed
Undecided
Numan Siddique
Trunk
Fix Committed
Undecided
Numan Siddique
OpenContrail
Fix Committed
Undecided
Numan Siddique

Bug Description

IndexAllocator is not deleted when a subnet is deleted because of which if i delete a subnet and create a new one with same CIDR but with different allocation pool, still the old allocation pool is used.

Eg.
$neutron subnet-create private 10.0.0.0/24 --allocation-pool start=10.0.0.2,end=10.0.0.4
$neutron subnet-delete <SUBNET_ID>
$neutron subnet-create private 10.0.0.0/24 --allocation-pool start=10.0.0.2,end=10.0.0.8

After this, I will not be able to create a port with ip address >=10.0.0.5

Tags: config
Changed in opencontrail:
assignee: nobody → Numan Siddique (numansiddique)
status: New → In Progress
Revision history for this message
Numan Siddique (numansiddique) wrote :
Changed in opencontrail:
status: In Progress → Fix Committed
Changed in juniperopenstack:
assignee: nobody → Numan Siddique (numansiddique)
milestone: none → r1.11
Revision history for this message
Numan Siddique (numansiddique) wrote :

Vedamurthy : This fix is already merged in masterand r1.10.
I didn't understand why you assigned to r.11.
In the github i dont see any branch related to r1.11
Can you please clear my doubt

Revision history for this message
Sachin Bansal (sbansal) wrote :
Changed in juniperopenstack:
status: New → Fix Committed
Revision history for this message
Vedamurthy Joshi (vedujoshi) wrote : Re: [Bug 1365824] Re: IndexAllocator is not deleted when a subnet is deleted

Hi Numan,
 Usually, when people commit to a branch(master/R1.10), they post the
commit or review link for that branch.
Since I saw only the link for master, I opened a new scope for R1.10

I see that Sachin added the commit reference for R1.10

We are fine now..

On 9/17/14, 12:40 AM, "Numan Siddique" <email address hidden> wrote:

>Vedamurthy : This fix is already merged in masterand r1.10.
>I didn't understand why you assigned to r.11.
>In the github i dont see any branch related to r1.11
>Can you please clear my doubt
>
>--
>You received this bug notification because you are a member of Contrail
>Systems engineering, which is subscribed to Juniper Openstack.
>https://bugs.launchpad.net/bugs/1365824
>
>Title:
> IndexAllocator is not deleted when a subnet is deleted
>
>Status in Juniper Openstack distribution:
> New
>Status in OpenContrail:
> Fix Committed
>
>Bug description:
> IndexAllocator is not deleted when a subnet is deleted because of
> which if i delete a subnet and create a new one with same CIDR but
> with different allocation pool, still the old allocation pool is used.
>
> Eg.
> $neutron subnet-create private 10.0.0.0/24 --allocation-pool
>start=10.0.0.2,end=10.0.0.4
> $neutron subnet-delete <SUBNET_ID>
> $neutron subnet-create private 10.0.0.0/24 --allocation-pool
>start=10.0.0.2,end=10.0.0.8
>
> After this, I will not be able to create a port with ip address
> >=10.0.0.5
>
>To manage notifications about this bug go to:
>https://bugs.launchpad.net/juniperopenstack/+bug/1365824/+subscriptions

Changed in juniperopenstack:
milestone: r1.11 → none
tags: added: config
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/29561
Submitter: yacine (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/29561
Committed: http://github.com/Juniper/contrail-controller/commit/f3056c8663be341484468843888ce1646bd5da5d
Submitter: Zuul (<email address hidden>)
Branch: master

commit f3056c8663be341484468843888ce1646bd5da5d
Author: Yacine Saibi <email address hidden>
Date: Mon Mar 13 16:13:19 2017 +0100

Patch for IP pool issues:

The problem is when we have more than one api-server, when a subnet is
deleted, the other api-servers keep the subnet allocator in their
subnet_allocator dict (in vnc_db.py). So when we create a subnet with
the same parameters (net, name, cidr,...) when we attach a port to him,
the allocated api is not always in the good range, depending on which
api-server responded to the create-port request.

- net_(delete/update)_notify methods modified,to update dicts on each nodes.

- ipam_(delete/update)_notify modified too.

- new parameter added (notify) now, "IndexAllocator.delete_all"
is done only from "*_req" methods.

- unittests updated to match and test new behavior

Change-Id: I98f095aeca37290c98bf12fb2be57e74b66efa0a
Closes-Bug: #1332645
Closes-Bug: #1365824

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R4.0

Review in progress for https://review.opencontrail.org/32511
Submitter: yacine (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.2

Review in progress for https://review.opencontrail.org/32512
Submitter: yacine (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/32511
Committed: http://github.com/Juniper/contrail-controller/commit/e53ad2963b0db706799c15d9c61db9be9a2a50df
Submitter: Zuul (<email address hidden>)
Branch: R4.0

commit e53ad2963b0db706799c15d9c61db9be9a2a50df
Author: Yacine Saibi <email address hidden>
Date: Mon Mar 13 16:13:19 2017 +0100

Patch for IP pool issues:

The problem is when we have more than one api-server, when a subnet is
deleted, the other api-servers keep the subnet allocator in their
subnet_allocator dict (in vnc_db.py). So when we create a subnet with
the same parameters (net, name, cidr,...) when we attach a port to him,
the allocated api is not always in the good range, depending on which
api-server responded to the create-port request.

- net_(delete/update)_notify methods modified,to update dicts on each nodes.

- ipam_(delete/update)_notify modified too.

- new parameter added (notify) now, "IndexAllocator.delete_all"
is done only from "*_req" methods.

- unittests updated to match and test new behavior

Change-Id: I98f095aeca37290c98bf12fb2be57e74b66efa0a
Closes-Bug: #1332645
Closes-Bug: #1365824
(cherry picked from commit f3056c8663be341484468843888ce1646bd5da5d)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/32512
Committed: http://github.com/Juniper/contrail-controller/commit/bfa269893808db5d58b1a0d539e720a321ee32e7
Submitter: Zuul (<email address hidden>)
Branch: R3.2

commit bfa269893808db5d58b1a0d539e720a321ee32e7
Author: Yacine Saibi <email address hidden>
Date: Mon Mar 13 16:13:19 2017 +0100

Patch for IP pool issues:

The problem is when we have more than one api-server, when a subnet is
deleted, the other api-servers keep the subnet allocator in their
subnet_allocator dict (in vnc_db.py). So when we create a subnet with
the same parameters (net, name, cidr,...) when we attach a port to him,
the allocated api is not always in the good range, depending on which
api-server responded to the create-port request.

- net_(delete/update)_notify methods modified,to update dicts on each nodes.

- ipam_(delete/update)_notify modified too.

- new parameter added (notify) now, "IndexAllocator.delete_all"
is done only from "*_req" methods.

- unittests updated to match and test new behavior

Change-Id: I98f095aeca37290c98bf12fb2be57e74b66efa0a
Closes-Bug: #1332645
Closes-Bug: #1365824
(cherry picked from commit f3056c8663be341484468843888ce1646bd5da5d)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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