Bug 1397454 - Delete router failed
Summary: Delete router failed
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.8.0
Assignee: Gilles Dubreuil
QA Contact: Ola Pavlenko
URL:
Whiteboard: openstack:sdn
Depends On:
Blocks: 1402499
TreeView+ depends on / blocked
 
Reported: 2016-11-22 14:59 UTC by Ronnie Rasouli
Modified: 2018-02-12 09:57 UTC (History)
10 users (show)

Fixed In Version: 5.8.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1402499 (view as bug list)
Environment:
Last Closed: 2017-06-12 16:30:46 UTC
Category: ---
Cloudforms Team: Openstack
Target Upstream Version:


Attachments (Terms of Use)
last 1500 lines of evm.log (491.66 KB, text/plain)
2016-11-22 14:59 UTC, Ronnie Rasouli
no flags Details

Description Ronnie Rasouli 2016-11-22 14:59:02 UTC
Created attachment 1222748 [details]
last 1500 lines of evm.log

Description of problem:

Delete a router created by CF failed

Version-Release number of selected component (if applicable):

5.7.0.11

How reproducible:
100%

Steps to Reproduce:
1.Navigate to: Networks --> Network Routers
2.select an existing router created  
3.Click Configuration --> Delete this Router


Actual results:

router does not delete, no indication to user that action failed.

Expected results:
Router should be deleted successfully.


Additional info:

Comment 2 Ronnie Rasouli 2016-11-22 15:02:49 UTC
Delete router succeeded via CLI

Comment 3 Tzu-Mainn Chen 2016-11-22 21:03:57 UTC
Oddly I can't reproduce this on master, but I can't find the commit that would have fixed it for euwe.  I'll ask around to see if anyone has any ideas.

Comment 4 Ido Ovadia 2016-11-27 13:17:39 UTC
Reproduced to me too.

1. If the router has no interface, it successfully deleted
2. I failed to delete router which has interfaces connected. 
   Router does not delete, no indication to user that action failed


------------------      evm.log      ------------------

[----] I, [2016-11-27T07:46:23.532453 #13733:73f12c]  INFO -- : MIQ(MiqQueue#delivered) Message id: [888000000110049], State: [ok], Delivered in [0.021831025] seconds
[----] E, [2016-11-27T07:46:24.028092 #13752:73f12c] ERROR -- : <Fog> excon.error     #<Excon::Error::Conflict: Expected(204) <=> Actual(409 Conflict)
excon.error.response
  :body          => "{\"NeutronError\": {\"message\": \"Router de56cc7e-e323-4053-81ca-5beb3a54eb66 still has ports\", \"type\": \"RouterInUse\", \"detail\": \"\"}}"
  :cookies       => [
  ]
  :headers       => {
    "Content-Length"         => "129"
    "Content-Type"           => "application/json; charset=UTF-8"
    "Date"                   => "Sun, 27 Nov 2016 12:46:28 GMT"
    "X-Openstack-Request-Id" => "req-3d9dc806-d240-468c-8b47-470a8c4c92e2"
  }
  :host          => "10.0.0.101"
  :local_address => "10.0.0.63"
  :local_port    => 39592
  :path          => "/v2.0/routers/de56cc7e-e323-4053-81ca-5beb3a54eb66"
  :port          => 9696
  :reason_phrase => "Conflict"
  :remote_ip     => "10.0.0.101"
  :status        => 409
  :status_line   => "HTTP/1.1 409 Conflict\r\n"
>

[----] E, [2016-11-27T07:46:24.028622 #13752:73f12c] ERROR -- : MIQ(ManageIQ::Providers::Openstack::NetworkManager::NetworkRouter#delete_network_router) router=[Router_test_4c], error: Expected(204) <=> Actual(409 Conflict)
excon.error.response
  :body          => "{\"NeutronError\": {\"message\": \"Router de56cc7e-e323-4053-81ca-5beb3a54eb66 still has ports\", \"type\": \"RouterInUse\", \"detail\": \"\"}}"
  :cookies       => [
  ]
  :headers       => {
    "Content-Length"         => "129"
    "Content-Type"           => "application/json; charset=UTF-8"
    "Date"                   => "Sun, 27 Nov 2016 12:46:28 GMT"
    "X-Openstack-Request-Id" => "req-3d9dc806-d240-468c-8b47-470a8c4c92e2"
  }
  :host          => "10.0.0.101"
  :local_address => "10.0.0.63"
  :local_port    => 39592
  :path          => "/v2.0/routers/de56cc7e-e323-4053-81ca-5beb3a54eb66"
  :port          => 9696
  :reason_phrase => "Conflict"
  :remote_ip     => "10.0.0.101"
  :status        => 409
  :status_line   => "HTTP/1.1 409 Conflict\r\n"

[----] E, [2016-11-27T07:46:24.028887 #13752:73f12c] ERROR -- : MIQ(MiqQueue#deliver) Message id: [888000000110048], Error: [Expected(204) <=> Actual(409 Conflict)
excon.error.response
  :body          => "{\"NeutronError\": {\"message\": \"Router de56cc7e-e323-4053-81ca-5beb3a54eb66 still has ports\", \"type\": \"RouterInUse\", \"detail\": \"\"}}"
  :cookies       => [
  ]
  :headers       => {
    "Content-Length"         => "129"
    "Content-Type"           => "application/json; charset=UTF-8"
    "Date"                   => "Sun, 27 Nov 2016 12:46:28 GMT"
    "X-Openstack-Request-Id" => "req-3d9dc806-d240-468c-8b47-470a8c4c92e2"
  }
  :host          => "10.0.0.101"
  :local_address => "10.0.0.63"
  :local_port    => 39592
  :path          => "/v2.0/routers/de56cc7e-e323-4053-81ca-5beb3a54eb66"
  :port          => 9696
  :reason_phrase => "Conflict"
  :remote_ip     => "10.0.0.101"
  :status        => 409
  :status_line   => "HTTP/1.1 409 Conflict\r\n"
]
[----] I, [2016-11-27T07:46:24.028995 #13752:73f12c]  INFO -- : MIQ(MiqQueue#delivered) Message id: [888000000110048], State: [error], Delivered in [0.615147985] seconds
[----] I, [2016-11-27T07:46:24.031289 #13752:73f12c]  INFO -- : MIQ(MiqQueue#m_callback) Message id: [888000000110048], Invoking Callback with args: ["Finished", "error", "Expected(204) <=> Actual(409 Conflict)\nexcon.error.response\n  :body          => \"{\\\"NeutronError\\\": {\\\"message\\\": \\\"Router de56cc7e-e323-4053-81ca-5beb3a54eb66 still has ports\\\", \\\"type\\\": \\\"RouterInUse\\\", \\\"detail\\\": \\\"\\\"}}\"\n  :cookies       => [\n  ]\n  :headers       => {\n    \"Content-Length\"         => \"129\"\n    \"Content-Type\"           => \"application/json; charset=UTF-8\"\n    \"Date\"                   => \"Sun, 27 Nov 2016 12:46:28 GMT\"\n    \"X-Openstack-Request-Id\" => \"req-3d9dc806-d240-468c-8b47-470a8c4c92e2\"\n  }\n  :host          => \"10.0.0.101\"\n  :local_address => \"10.0.0.63\"\n  :local_port    => 39592\n  :path          => \"/v2.0/routers/de56cc7e-e323-4053-81ca-5beb3a54eb66\"\n  :port          => 9696\n  :reason_phrase => \"Conflict\"\n  :remote_ip     => \"10.0.0.101\"\n  :status        => 409\n  :status_line   => \"HTTP/1.1 409 Conflict\\r\\n\"\n", "nil"]
[----] I, [2016-11-27T07:46:24.031930 #13752:73f12c]  INFO -- : MIQ(MiqTask#update_status) Task: [888000000000563] [Finished] [Error] [Expected(204) <=> Actual(409 Conflict)
excon.error.response
  :body          => "{\"NeutronError\": {\"message\": \"Router de56cc7e-e323-4053-81ca-5beb3a54eb66 still has ports\", \"type\": \"RouterInUse\", \"detail\": \"\"}}"
  :cookies       => [
  ]
  :headers       => {
    "Content-Length"         => "129"
    "Content-Type"           => "application/json; charset=UTF-8"
    "Date"                   => "Sun, 27 Nov 2016 12:46:28 GMT"
    "X-Openstack-Request-Id" => "req-3d9dc806-d240-468c-8b47-470a8c4c92e2"
  }
  :host          => "10.0.0.101"
  :local_address => "10.0.0.63"
  :local_port    => 39592
  :path          => "/v2.0/routers/de56cc7e-e323-4053-81ca-5beb3a54eb66"
  :port          => 9696
  :reason_phrase => "Conflict"
  :remote_ip     => "10.0.0.101"
  :status        => 409
  :status_line   => "HTTP/1.1 409 Conflict\r\n"
]
[----] I, [2016-11-27T07:46:25.652306 #14693:918c64]  INFO -- : Querying Openstack Ceilometer for events newer than 2016-11-27T12:46:05.013000...
[----] I, [2016-11-27T07:46:25.898358 #14670:9186d8]  INFO -- : Querying Openstack Ceilometer for events newer than 2016-11-27T12:46:05.013000...

Comment 5 Gilles Dubreuil 2016-11-29 11:22:07 UTC
Per comment#3 I confirm this isn't an issue on euwe branch. Please re-sync with euwe. BTW I'm not sure either which commit fix-it, but again it works on euwe HEAD therefore this one an issue any more and this one can be closed.

Comment 6 Gilles Dubreuil 2016-11-29 11:43:04 UTC
Per comment#4, not being able to delete the router because of other dependencies is effectively expected. With latest Euwe branch, no error message is returned as the flash message indicates: 
"Delete initiated for 1 Network Router."

This doesn't mean the router was deleted but only means the deletion is scheduled.
I'm not trying to play with words here, but this is happening because of the nature of the network provider backend for Openstack. 

To avoid this kind of behaviour, more checks need to be done before triggering the delete operation.

Meanwhile this is a different issue, I suggest to open an enhancement BZ.

Comment 7 Ronnie Rasouli 2016-12-07 09:52:49 UTC
I was able to delete router in 5.7.0.14

Comment 10 Ronnie Rasouli 2017-03-08 07:18:19 UTC
verified on 5.8.0.3


Note You need to log in before you can comment on or make changes to this bug.