Re-creation of subnet with different gw/no-gw ends up with old parameter value

Bug #1722837 reported by Petr Jediný
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.1
Fix Committed
Undecided
Unassigned
R3.1.1.x
Fix Committed
Undecided
Unassigned
R3.2
Fix Committed
Undecided
Unassigned
R3.2.3.x
Fix Committed
Undecided
Unassigned
R4.0
Fix Committed
Undecided
Unassigned
R4.1
Fix Committed
Undecided
Unassigned
Trunk
Fix Committed
Undecided
Unassigned
OpenContrail
New
Undecided
Unassigned

Bug Description

When you create the subnet with gateway and delete it and recreate it with no gateway, in some cases the recreated subnet is created with gateway.

This is the way to replicate the issue:

root@ctl01:~# neutron subnet-create --name net1 net1 192.168.22.0/24
Created a new subnet:
+-------------------+----------------------------------------------------+
| Field | Value |
+-------------------+----------------------------------------------------+
| allocation_pools | {"start": "192.168.22.2", "end": "192.168.22.254"} |
| cidr | 192.168.22.0/24 |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 192.168.22.1 |
| host_routes | |
| id | 471308b2-7b8b-42f4-8ec8-d4cd047fe29a |
| ip_version | 4 |
| ipv6_address_mode | |
| ipv6_ra_mode | |
| name | net1 |
| network_id | 3b2aeefb-c516-4ff7-8868-14fd3abe26f1 |
| tenant_id | cfe5f2124ec046fab78ff9475e20a882 |
+-------------------+----------------------------------------------------+

root@ctl01:~# neutron subnet-delete net1
Deleted subnet(s): net1

root@ctl01:~# neutron subnet-create --no-gateway --name net1 net1 192.168.22.0/24
Created a new subnet:
+-------------------+----------------------------------------------------+
| Field | Value |
+-------------------+----------------------------------------------------+
| allocation_pools | {"start": "192.168.22.2", "end": "192.168.22.254"} |
| cidr | 192.168.22.0/24 |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 192.168.22.1 |
| host_routes | |
| id | 848698be-8c7b-4adf-8ee8-c500c7281bfe |
| ip_version | 4 |
| ipv6_address_mode | |
| ipv6_ra_mode | |
| name | net1 |
| network_id | 3b2aeefb-c516-4ff7-8868-14fd3abe26f1 |
| tenant_id | cfe5f2124ec046fab78ff9475e20a882 |
+-------------------+----------------------------------------------------+

root@ctl01:~# neutron subnet-create --no-gateway --name net2 net1 192.168.23.0/24
Created a new subnet:
+-------------------+----------------------------------------------------+
| Field | Value |
+-------------------+----------------------------------------------------+
| allocation_pools | {"start": "192.168.23.1", "end": "192.168.23.254"} |
| cidr | 192.168.23.0/24 |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 0.0.0.0 |
| host_routes | |
| id | 46fe1f11-540d-4a7c-b8f7-5eacc0522fd0 |
| ip_version | 4 |
| ipv6_address_mode | |
| ipv6_ra_mode | |
| name | net2 |
| network_id | 3b2aeefb-c516-4ff7-8868-14fd3abe26f1 |
| tenant_id | cfe5f2124ec046fab78ff9475e20a882 |
+-------------------+----------------------------------------------------+

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

Review in progress for https://review.opencontrail.org/36418
Submitter: Petr Jedin? (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/36418
Submitter: Petr Jediný (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/36418
Submitter: Petr Jedin? (<email address hidden>)

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

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

commit ab8c5c03764f9e73306d61752f84a26505a192de
Author: Petr Jediný <email address hidden>
Date: Wed Oct 11 17:25:33 2017 +0200

Fix subnet re-creation

Avoid using old cached subnet when re-creating subnet with same
CIDR but different gateway setting.

Change-Id: I51b25c946b75a72fb0139e9250f319389588b380
Closes-Bug: #1722837

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

Review in progress for https://review.opencontrail.org/36783
Submitter: Petr Jedin? (<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/36784
Submitter: Petr Jedin? (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/36785
Submitter: Petr Jedin? (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/36786
Submitter: Petr Jedin? (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/36788
Submitter: Petr Jedin? (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/36789
Submitter: Petr Jedin? (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/36788
Submitter: Petr Jedin? (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/36786
Submitter: Petr Jedin? (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/36785
Submitter: Petr Jedin? (<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/36784
Submitter: Petr Jedin? (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/36785
Submitter: Petr Jedin? (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/36786
Submitter: Petr Jedin? (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/36788
Submitter: Petr Jedin? (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/36789
Submitter: Petr Jedin? (<email address hidden>)

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

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

commit fbb1a0f20a9ceb02b9b55c381441c112dcc7c113
Author: Petr Jediný <email address hidden>
Date: Wed Oct 11 17:25:33 2017 +0200

Fix subnet re-creation

Avoid using old cached subnet when re-creating subnet with same
CIDR but different gateway setting.

Change-Id: I51b25c946b75a72fb0139e9250f319389588b380
Closes-Bug: #1722837

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

Review in progress for https://review.opencontrail.org/36789
Submitter: Petr Jedin? (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/36788
Submitter: Petr Jedin? (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/36786
Submitter: Petr Jedin? (<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/36784
Submitter: Petr Jedin? (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/36785
Submitter: Petr Jedin? (<email address hidden>)

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

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

commit 30312e4f4719495f8f953ea0bf6811db485102b9
Author: Petr Jediný <email address hidden>
Date: Wed Oct 11 17:25:33 2017 +0200

Fix subnet re-creation

Avoid using old cached subnet when re-creating subnet with same
CIDR but different gateway setting.

Change-Id: I51b25c946b75a72fb0139e9250f319389588b380
Closes-Bug: #1722837

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

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

commit 1db3f9e20476ae4279ee517d6659f72b8cbffeb9
Author: Petr Jediný <email address hidden>
Date: Wed Oct 11 17:25:33 2017 +0200

Fix subnet re-creation

Avoid using old cached subnet when re-creating subnet with same
CIDR but different gateway setting.

Change-Id: I51b25c946b75a72fb0139e9250f319389588b380
Closes-Bug: #1722837

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

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

commit 20e43f45c76c937b1507e4951cce8f5ae0254fa1
Author: Petr Jediný <email address hidden>
Date: Wed Oct 11 17:25:33 2017 +0200

Fix subnet re-creation

Avoid using old cached subnet when re-creating subnet with same
CIDR but different gateway setting.

Change-Id: I51b25c946b75a72fb0139e9250f319389588b380
Closes-Bug: #1722837

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

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

commit dae4afd6f5cc0ad35fe0a23bdb81f6b551fe7418
Author: Petr Jediný <email address hidden>
Date: Wed Oct 11 17:25:33 2017 +0200

Fix subnet re-creation

Avoid using old cached subnet when re-creating subnet with same
CIDR but different gateway setting.

Change-Id: I51b25c946b75a72fb0139e9250f319389588b380
Closes-Bug: #1722837

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

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

commit 4fba4d5cd15a6bcaaa01058af25a4bcef66945a2
Author: Petr Jediný <email address hidden>
Date: Wed Oct 11 17:25:33 2017 +0200

Fix subnet re-creation

Avoid using old cached subnet when re-creating subnet with same
CIDR but different gateway setting.

Change-Id: I51b25c946b75a72fb0139e9250f319389588b380
Closes-Bug: #1722837

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.