After disabling snat for router enabling it fails

Bug #1626442 reported by Michael Kraynov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Status tracked in 10.0.x
10.0.x
Fix Committed
Medium
MOS Neutron
7.0.x
Fix Released
Medium
Denis Meltsaykin
8.0.x
Fix Released
Medium
Max Yatsenko
9.x
Fix Released
Medium
MOS Neutron

Bug Description

If you disable snat for router gateway, enabling it back fails without any error.

Steps to reproduce:
neutron router-list
+--------------------------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+-------+
| id | name | external_gateway_info | distributed | ha |
+--------------------------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+-------+
| 76317a9f-466c-49ef-ae5a-7c2d562edbc7 | router04 | {"network_id": "dca98cc7-d74e-4c0a-b903-db202472733e", "enable_snat": true, "external_fixed_ips": [{"subnet_id": "0dd9ef0e-3ddf-44fa-8e75-c71c45fed555", "ip_address": "172.16.24.130"}]} | True | False |
+--------------------------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+-------+
neutron router-gateway-set --disable-snat 76317a9f-466c-49ef-ae5a-7c2d562edbc7 dca98cc7-d74e-4c0a-b903-db202472733e
Set gateway for router 76317a9f-466c-49ef-ae5a-7c2d562edbc7
neutron router-list
+--------------------------------------+----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+-------+
| id | name | external_gateway_info | distributed | ha |
+--------------------------------------+----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+-------+
| 76317a9f-466c-49ef-ae5a-7c2d562edbc7 | router04 | {"network_id": "dca98cc7-d74e-4c0a-b903-db202472733e", "enable_snat": false, "external_fixed_ips": [{"subnet_id": "0dd9ef0e-3ddf-44fa-8e75-c71c45fed555", "ip_address": "172.16.24.130"}]} | True | False |
+--------------------------------------+----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+-------+
neutron router-gateway-set --enable-snat 76317a9f-466c-49ef-ae5a-7c2d562edbc7 dca98cc7-d74e-4c0a-b903-db202472733e
Set gateway for router 76317a9f-466c-49ef-ae5a-7c2d562edbc7

Expected results:
"enable_snat" should be true
Actual result:
"enable_snat": false

Description of the environment:
MOS7.0 vanilla

Additional information:
upstream bug: https://bugs.launchpad.net/neutron/+bug/1598171

Changed in mos:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → MOS Maintenance (mos-maintenance)
milestone: none → 7.0-updates
Revision history for this message
Denis Meltsaykin (dmeltsaykin) wrote :

The fix is not merged upstream yet, so we are waiting for its resolution.

tags: added: area-neutron
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix proposed to openstack/python-neutronclient (9.0/mitaka)

Fix proposed to branch: 9.0/mitaka
Change author: Rodion Tikunov <email address hidden>
Review: https://review.fuel-infra.org/28344

Revision history for this message
Rodion Tikunov (rtikunov) wrote :

For reproducing.
Before steps from bug description, do two more steps:
1) Set enable_snat_by_default = false in /etc/neutron/neutron.conf
2) service neutron-server restart

tags: added: wait-for-stable
Revision history for this message
Alexander Ignatov (aignatov) wrote :

Series of patches to stable branches is on the review in Upstream.

https://review.openstack.org/#/q/I01009d5cd5edd5be3eead615c37d6aa2e3224442,n,z

Revision history for this message
Alexander Ignatov (aignatov) wrote :
tags: added: on-verification
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Change abandoned on openstack/python-neutronclient (9.0/mitaka)

Change abandoned by Rodion Tikunov <email address hidden> on branch: 9.0/mitaka
Review: https://review.fuel-infra.org/28344
Reason: Synced from upstream

Revision history for this message
Ekaterina Shutova (eshutova) wrote :

Verified on 9.2 snapshot #593.
After disabling snat for router gateway, enabling it back complete successfully without any error.

tags: removed: on-verification
Revision history for this message
Alexander Ignatov (aignatov) wrote :
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix proposed to openstack/python-neutronclient (openstack-ci/fuel-7.0/2015.1.0)

Fix proposed to branch: openstack-ci/fuel-7.0/2015.1.0
Change author: Rodion Tikunov <email address hidden>
Review: https://review.fuel-infra.org/35143

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix merged to openstack/python-neutronclient (openstack-ci/fuel-7.0/2015.1.0)

Reviewed: https://review.fuel-infra.org/35143
Submitter: Denis V. Meltsaykin <email address hidden>
Branch: openstack-ci/fuel-7.0/2015.1.0

Commit: cf1e6fcba50b25200ce9b55596d06f36aefeb544
Author: Rodion Tikunov <email address hidden>
Date: Wed May 17 12:27:18 2017

Added --enable-snat option for router-gateway-set

If enable_snat_by_default option set to false and disable snat via cli
it becomes unavailable to enable snat again.
This commit allows to enable snat after disabling it.

Change-Id: I01009d5cd5edd5be3eead615c37d6aa2e3224442
Closes-Bug: #1626442
(cherry picked from commit cc1d3fdd3582b0bbc2e24b65b9c690b5f0318148)

tags: added: on-verification
Revision history for this message
TatyanaGladysheva (tgladysheva) wrote :

Verified on 7.0 mu8 updates.

After disabling snat for router gateway, enabling it back complete successfully without any error.

tags: removed: on-verification
Revision history for this message
Max Yatsenko (myatsenko) wrote :

Patch for 8.0 branch (openstack-ci/fuel-8.0/liberty) was cherry_picked from upstream 'stable/mitaka ' branch:
https://review.fuel-infra.org/#/c/35626/

It was merged.

Revision history for this message
Ilya Bumarskov (ibumarskov) wrote :
Download full text (4.5 KiB)

Verified on Fuel 8.0 MU-5

root@node-1:~# neutron router-list
+--------------------------------------+----------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+-------+
| id | name | external_gateway_info | distributed | ha |
+--------------------------------------+----------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+-------+
| d59c36b4-c7ca-4ce4-999d-ee67c3b5bb39 | router04 | {"network_id": "e105957e-0a29-498a-9291-f94bdf5a60cb", "enable_snat": true, "external_fixed_ips": [{"subnet_id": "1df84671-cd94-4eaa-8334-c5f99ad7be19", "ip_address": "10.109.8.128"}]} | False | False |
+--------------------------------------+----------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+-------+
root@node-1:~#
root@node-1:~#
root@node-1:~#
root@node-1:~# neutron router-gateway-set --disable-snat d59c36b4-c7ca-4ce4-999d-ee67c3b5bb39 e105957e-0a29-498a-9291-f94bdf5a60cb
Set gateway for router d59c36b4-c7ca-4ce4-999d-ee67c3b5bb39
root@node-1:~#
root@node-1:~# neutron router-list
+--------------------------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+-------+
| id | name | external_gateway_info | distributed | ha |
+--------------------------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+-------+
| d59c36b4-c7ca-4ce4-999d-ee67c3b5bb39 | router04 | {"network_id": "e105957e-0a29-498a-9291-f94bdf5a60cb", "enable_snat": false, "external_fixed_ips": [{"subnet_id": "1df84671-cd94-4eaa-8334-c5f99ad7be19", "ip_address": "10.109.8.128"}]} | False | False |
+--------------------------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+-------+
root@node-1:~#
root@node-1:~#
root@node-1:~#
root@node-1:~# neutron router-gateway-set --enable-snat d59c36b4-c7ca-4ce4-999d-ee67c3b5bb39 e105957e-0a29-498a-9291-f94bdf5a60cb
Set ga...

Read more...

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.