unable to update enable_snat using router-update command

Bug #1503686 reported by Kiran
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-neutronclient
Won't Fix
Low
Unassigned
python-openstackclient
In Progress
Undecided
Unassigned

Bug Description

Currently enable_snat is allowed only when setting a gateway.

$ neutron router-gateway-set <router-name> <ext-network> --disable-net
$ neutron router-gateway-set <router-name> <ext-network> --enable-net

There should be provision to set this flag with update command too.
Like
$ neutron router-update --enable-snat
$ neutron router-update --disable-snat

On Neutron, with the below command:
curl -g -i -X PUT http://10.0.4.130:9696/v2.0/routers/deecfcf8-6a4d-494d-938e-515f5c9d5885.json -H "User-Agent: python-neutronclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: b964f5aed06147efa06d27392db4f4f4" -d '{"router": {"external_gateway_info": {"enable_snat": false}}}'

Actual Response:
HTTP/1.1 400 Bad Request
Content-Length: 234
Content-Type: application/json; charset=UTF-8
X-Openstack-Request-Id: req-ac54539c-74eb-4fc1-8eac-339c928c69a6
Date: Wed, 07 Sep 2016 08:31:22 GMT

{"NeutronError": {"message": "Invalid input for external_gateway_info. Reason: Validation of dictionary's keys failed. Expected keys: set(['network_id']) Provided keys: set([u'enable_snat'])."

Expected Response : That the external_gateway_info would have the SNAT disabled, even without the gateway network ID

In Other words,
Expectation is that user can be allowed to enable/disable SNAT independently if the External Gateway Network ID is set. If not,
then it should be avoided

Tags: api
Kiran (rkiran)
Changed in python-neutronclient:
assignee: nobody → Kiran (rkiran)
Revision history for this message
Ihar Hrachyshka (ihar-hrachyshka) wrote :

There is workaround, so setting Low priority.

Changed in python-neutronclient:
status: New → Confirmed
importance: Undecided → Low
tags: added: api rfe
Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :

This bug is > 180 days without activity. We are unsetting assignee and milestone and setting status to Incomplete in order to allow its expiry in 60 days.

If the bug is still valid, then update the bug status.

Changed in python-neutronclient:
assignee: Kiran (rkiran) → nobody
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for python-neutronclient because there has been no activity for 60 days.]

Changed in python-neutronclient:
status: Incomplete → Expired
description: updated
Changed in neutron:
assignee: nobody → Reedip (reedip-banerjee)
John Schwarz (jschwarz)
Changed in neutron:
importance: Undecided → Low
Revision history for this message
Ihar Hrachyshka (ihar-hrachyshka) wrote :

There is some slight value in allowing the new request, it makes api a bit more flexible. Though it's not clear to me how often one needs to set/unset just that flag.

I would say, we could remove 'rfe' tag and track it as a regular bug, as best effort. Maybe even tag the bug as a low-hanging-fruit.

Revision history for this message
Kevin Benton (kevinbenton) wrote :

I think this is a reasonable thing to allow to be fixed in the Neutron client. The workaround of clearing the gateway can result in losing the fixed IP to other ongoing requests.

Changed in python-neutronclient:
status: Expired → Confirmed
Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :

neutronclient development is frozen. If you want this target the OSC client. I know we still have a pending patch to allow us to set the gateway [1]. So this to me is a WONTFIX.

[1] https://review.openstack.org/#/c/357973/

Changed in python-neutronclient:
status: Confirmed → Won't Fix
no longer affects: neutron
tags: removed: rfe
Changed in python-openstackclient:
assignee: nobody → Reedip (reedip-banerjee)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-openstackclient (master)

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

Changed in python-openstackclient:
status: New → In Progress
Revision history for this message
Reedip (reedip-banerjee-deactivatedaccount) wrote :

Since I am not active anymore, I would like to remove myself from the assignee. Its open for anyone else to take up.

Changed in python-openstackclient:
assignee: Reedip (reedip-banerjee) → nobody
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.