If-Match header ignored for routers and floating ip updates

Bug #1865156 reported by Michal Dulko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Confirmed
Medium
Unassigned

Bug Description

According to release note [1], the If-Match conditional updates should be supported for all resources that have revision_number. Apparently that doesn't work for routers:

mdulko:openstacksdk/ (neutron-if-match*) $ curl -g -i -X PUT <snip> -H "Content-Type: application/json" -H "User-Agent: openstacksdk/0.41.1 keystoneauth1/3.18.0 python-requests/2.22.0 CPython/3.7.6" -H "X-Auth-Token: <snip>" -H "If-Match: revision_number=9999" -d '{"router": {"name": "dulek2"}}'
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 475
X-Openstack-Request-Id: req-153fe53e-3b79-4bb8-aebb-4f334c35e449
Date: Fri, 28 Feb 2020 14:07:40 GMT

{"router": {"status": "ACTIVE", "external_gateway_info": null, "availability_zone_hints": [], "availability_zones": ["nova"], "description": "", "tags": [], "tenant_id": "c73b7097d07c46f78eb4b4dcfbac5ca8", "created_at": "2020-02-28T14:00:43Z", "admin_state_up": true, "updated_at": "2020-02-28T14:07:40Z", "flavor_id": null, "revision_number": 7, "routes": [], "project_id": "c73b7097d07c46f78eb4b4dcfbac5ca8", "id": "b6012d87-886b-4b3b-912b-2eb6ad655514", "name": "dulek2"}}%

Unfortunately I'm not sure what OpenStack version is that.

[1] https://github.com/openstack/neutron/blob/a388701ddfe628e9a5bd16a78422164799b11ef8/releasenotes/notes/conditional_updates-10b9aa66fd144217.yaml

description: updated
Revision history for this message
Michal Dulko (michal-dulko-f) wrote :

Seems like the same goes for updates to floating ips. The deletion however works fine.

summary: - If-Match header ignored for routers
+ If-Match header ignored for routers and floating ip updates
Revision history for this message
Michal Dulko (michal-dulko-f) wrote :

Seems like this works on master.

Changed in neutron:
status: New → Invalid
Revision history for this message
Slawek Kaplonski (slaweq) wrote :

It seems it works fine in master branch http://paste.openstack.org/show/790119/
I'm not sure if there was any bug related to that in the past. Maybe we are just missing some backport but it would be good to at least know on which version this issue happened for You.

Changed in neutron:
status: Invalid → Incomplete
status: Incomplete → Invalid
Revision history for this message
Slawek Kaplonski (slaweq) wrote :

Hmm,

but indeed it don't works for Floating IP:

curl -g -i -X PUT http://10.120.0.30:9696/v2.0/floatingips/742a4311-99af-4232-a45a-00b7827bd9ba -H "If-Match: revision_number=33333" -H "Accept: application/json" -H "Content-Type: application/json" -H "User-Agent: python-neutronclient" -H "X-Auth-Token: $token" -d '{"floatingip": {"description": "Test 5"}}'
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 927
X-Openstack-Request-Id: req-714f5d6e-c672-4f3a-aac8-a21f3bf8ec41
Date: Thu, 27 Feb 2020 15:16:17 GMT

{"floatingip": {"id": "742a4311-99af-4232-a45a-00b7827bd9ba", "tenant_id": "0c5d93b067784b609fb5d07873e1b80d", "floating_ip_address": "10.10.0.165", "floating_network_id": "b5623d28-a48e-4fca-a4bc-8490e35b8b99", "router_id": "9c760b37-3af6-4955-959c-c608f2ef4822", "port_id": "684bcfaf-ba6d-4c53-9ec9-ae4786e07268", "fixed_ip_address": "10.100.127.222", "status": "DOWN", "description": "Test 5", "qos_policy_id": null, "port_details": {"name": "tobiko.openstack.stacks._cirros.CirrosServerStackFixture-port-44c77t5zhuq4", "network_id": "e09c14f0-0460-44f2-9629-a3fa876e9c80", "mac_address": "fa:16:3e:e2:78:cc", "admin_state_up": true, "status": "ACTIVE", "device_id": "b2d88234-7978-4682-8f6a-a51d25485573", "device_owner": "compute:nova"}, "port_forwardings": [], "tags": [], "created_at": "2020-02-26T21:50:51Z", "updated_at": "2020-02-27T15:16:16Z", "revision_number": 4, "project_id": "0c5d93b067784b609fb5d07873e1b80d"}}

Changed in neutron:
status: Invalid → Confirmed
importance: Undecided → Medium
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.