Bug 1397469

Summary: [negative] Deleting subnet connected to instance raise 'Unexpected error encountered '
Product: Red Hat CloudForms Management Engine Reporter: Ronnie Rasouli <rrasouli>
Component: UI - OPSAssignee: Tzu-Mainn Chen <tzumainn>
Status: CLOSED CURRENTRELEASE QA Contact: Ola Pavlenko <opavlenk>
Severity: high Docs Contact:
Priority: high    
Version: 5.7.0CC: hkataria, iovadia, jfrey, jhardy, maufart, mpovolny, obarenbo
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: openstack:sdn
Fixed In Version: 5.8.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1411516 (view as bug list) Environment:
Last Closed: 2017-06-12 16:55:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: Openstack Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1411516    

Description Ronnie Rasouli 2016-11-22 15:29:26 UTC
Description of problem:

We should have better error handling in this case while deleting subnet that connected to instance

Error text:

Expected(204) <=> Actual(409 Conflict) excon.error.response :body => "{\"NeutronError\": {\"message\": \"Unable to complete operation on subnet 2e9fbbe0-6bb3-4849-a981-d0a3406a45dc: One or more ports have an IP allocation from this subnet.\", \"type\": \"SubnetInUse\", \"detail\": \"\"}}" :cookies => [ ] :headers => { "Content-Length" => "204" "Content-Type" => "application/json" "Date" => "Tue, 22 Nov 2016 15:13:05 GMT" "X-Openstack-Request-Id" => "req-bdccc09b-4693-41e9-8be7-3ef3ec4457d6" } :host => "10.0.0.104" :local_address => "10.0.0.36" :local_port => 44258 :path => "/v2.0/subnets/2e9fbbe0-6bb3-4849-a981-d0a3406a45dc" :port => 9696 :reason_phrase => "Conflict" :remote_ip => "10.0.0.104" :status => 409 :status_line => "HTTP/1.1 409 Conflict\r\n" [cloud_subnet/button] 

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

5.7.0.11

How reproducible:
100%

Steps to Reproduce:
1. Navigate to: Networks --> Subnets
2. Tick a subnet connected to an instance
3. Click Configuration --> Delete selected Cloud Subnets.

Actual results:

Generic error page

Expected results:

A comprehensive message that deleting a cloud subnet attached to instance is not allowed

Additional info:

Comment 2 Marek Aufart 2016-11-22 15:39:46 UTC
We need extract error message text.

Comment 3 Tzu-Mainn Chen 2016-12-09 20:48:41 UTC
https://github.com/ManageIQ/manageiq/pull/13098

Comment 5 Ronnie Rasouli 2017-03-08 07:29:40 UTC
verified on 5.8.0.3 
no such option to delete subnet connected to an instance