Router interface fails to delete the interface with the updated port device id

Bug #1408193 reported by Abhishek G M
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
neutron
Expired
Low
Unassigned

Bug Description

Test to update the port device-id with a new router

Steps:
1) Create a network
2) Create a subnet
3) Create two routers with name router1 and router2
4) Add router1 interface with subnet
5 )update the port with new device-id i.e with router2
6) Delete the router2 interface with port

Actual Error:
neutron router-interface-delete router2 $subnet_id

ERROR: neutronclient.shell Unable to find subnet with name '316ac3a6-cd83-424f-855c-368c10cf83bc'
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/neutronclient/shell.py", line 691, in run_subcommand
    return run_command(cmd, cmd_parser, sub_argv)
  File "/usr/lib/python2.7/dist-packages/neutronclient/shell.py", line 90, in run_command
    return cmd.run(known_args)
  File "/usr/lib/python2.7/dist-packages/neutronclient/neutron/v2_0/router.py", line 143, in run
    neutron_client, resource, value)
  File "/usr/lib/python2.7/dist-packages/neutronclient/neutron/v2_0/__init__.py", line 112, in find_resourceid_by_name_or_id
    project_id, cmd_resource, parent_id)
  File "/usr/lib/python2.7/dist-packages/neutronclient/neutron/v2_0/__init__.py", line 99, in _find_resourceid_by_name
    message=not_found_message, status_code=404)
NeutronClientException: Unable to find subnet with name '316ac3a6-cd83-424f-855c-368c10cf83bc'

neutron router-interface-delete router2 port=316ac3a6-cd83-424f-855c-368c10cf83bc
Router $Router2_id does not have an interface with id $Port_id (HTTP 404) (Request-ID: req-$request_id)
ERROR: neutronclient.shell Router 68afd04f-6e35-4bd2-a9a7-838d5f54e84e does not have an interface with id 316ac3a6-cd83-424f-855c-368c10cf83bc (HTTP 404) (Request-ID: req-194a53c7-a3ac-49f1-b092-a8e6d9c0d999)
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/neutronclient/shell.py", line 691, in run_subcommand
    return run_command(cmd, cmd_parser, sub_argv)
  File "/usr/lib/python2.7/dist-packages/neutronclient/shell.py", line 90, in run_command
    return cmd.run(known_args)
  File "/usr/lib/python2.7/dist-packages/neutronclient/neutron/v2_0/router.py", line 146, in run
    portinfo = self.call_api(neutron_client, _router_id, body)
  File "/usr/lib/python2.7/dist-packages/neutronclient/neutron/v2_0/router.py", line 166, in call_api
    return neutron_client.remove_interface_router(router_id, body)
  File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 99, in with_params
    ret = self.function(instance, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 425, in remove_interface_router
    "/remove_router_interface", body=body)
  File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 1330, in put
    headers=headers, params=params)
  File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 1298, in retry_request
    headers=headers, params=params)
  File "/usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 1241, in do_request
    content_type=self.content_type())
  File "/usr/lib/python2.7/dist-packages/neutronclient/client.py", line 319, in do_request
    return self.request(url, method, **kwargs)
  File "/usr/lib/python2.7/dist-packages/neutronclient/client.py", line 63, in request
    return self._request(url, method, body=body, headers=headers, **kwargs)
  File "/usr/lib/python2.7/dist-packages/neutronclient/client.py", line 314, in _request
    **kwargs)
  File "/usr/lib/python2.7/dist-packages/keystoneclient/utils.py", line 318, in inner
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/keystoneclient/session.py", line 339, in request
    raise exceptions.from_response(resp, method, url)
NotFound: Router 68afd04f-6e35-4bd2-a9a7-838d5f54e84e does not have an interface with id 316ac3a6-cd83-424f-855c-368c10cf83bc (HTTP 404) (Request-ID: req-194a53c7-a3ac-49f1-b092-a8e6d9c0d999)
Router 68afd04f-6e35-4bd2-a9a7-838d5f54e84e does not have an interface with id 316ac3a6-cd83-424f-855c-368c10cf83bc (HTTP 404) (Request-ID: req-194a53c7-a3ac-49f1-b092-a8e6d9c0d999)

In juno the error saying router2 does not having interface with port
neutron-server 1:2014.2.1-0ubuntu1~cloud0

In icehouse release version router2 interface with port with updated device id as router id is getting deleted successfully
neutron-server 1:2014.1.2-0ubuntu1.1~cloud0

Tags: api
Revision history for this message
Abhishek G M (abhishek-g-m) wrote :
Changed in neutron:
assignee: nobody → venkata anil (anil-venkata)
Revision history for this message
Eugene Nikanorov (enikanorov) wrote :

The use case seems incorrect to me. Why would someone change device-id of router interface port?

summary: - Roter interface fails to delete the interface with the updated port
+ Router interface fails to delete the interface with the updated port
device id
tags: added: api
Changed in neutron:
status: New → Opinion
importance: Undecided → Low
Revision history for this message
Abhishek G M (abhishek-g-m) wrote :

Steps involved in updating the interfaced port device_id with other router id

1) Create a network
2) Create a subnet
3) Create two routers with name router1 and router2
4) Add router1 interface with subnet
5 )update the interfaced port with new device-id i.e with router2
6) Delete the router2 interface with port

My tempest code -> https://review.openstack.org/#/c/139571/
Jenkins failing

Its working fine in Icehouse
But creating issue in Juno

Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :

Are you trying some sort of 'fail-over' action? Changing the device id on a router port does not sound like the right thing to do, as you may need other events to occur in the system to move from one router to another. To me the fact that this was 'working' in Icehouse leads to me believe that it was failing silently rather than working as you say. Ultimately I think we should prevent such a port update from occurring.

Marking incomplete, as I would like to understand more about the use case being addressed.

Changed in neutron:
status: Opinion → Incomplete
Revision history for this message
Abhishek G M (abhishek-g-m) wrote :

usecase: Here without deleting the port i am interfacing with the other router-id.

Revision history for this message
Abhishek G M (abhishek-g-m) wrote :

https://review.openstack.org/#/c/139571/ is failing because of this issue.
In icehouse the test_update_port_device_id is passing but in juno its not.

Changed in neutron:
status: Incomplete → In Progress
Changed in neutron:
assignee: venkata anil (anil-venkata) → nobody
ZongKai LI (zongkai)
Changed in neutron:
assignee: nobody → ZongKai LI (lzklibj)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by Armando Migliaccio (<email address hidden>) on branch: master
Review: https://review.openstack.org/252203
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Changed in neutron:
status: In Progress → Incomplete
assignee: ZongKai LI (lzklibj) → nobody
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for neutron because there has been no activity for 60 days.]

Changed in neutron:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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