Bug 1577943

Summary: Adding interface to a router cause Unexpected error
Product: Red Hat CloudForms Management Engine Reporter: Ido Ovadia <iovadia>
Component: ProvidersAssignee: Sam Lucidi <slucidi>
Status: CLOSED CURRENTRELEASE QA Contact: Ido Ovadia <iovadia>
Severity: high Docs Contact:
Priority: high    
Version: 5.9.0CC: cpelland, gblomqui, iovadia, jfrey, jhajyahy, jhardy, maufart, obarenbo, simaishi, slucidi
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.10.0   
Hardware: x86_64   
OS: Linux   
Whiteboard: openstack:sdn
Fixed In Version: 5.10.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1580520 (view as bug list) Environment:
Last Closed: 2019-02-11 14:10:15 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: 1580520    
Attachments:
Description Flags
screenshot_unexpected
none
production log
none
evm log none

Description Ido Ovadia 2018-05-14 13:31:45 UTC
Description of problem:
=======================
Adding interface to a router cause Unexpected error

Adding interface to a router cause Unexpected error

FATAL -- : Error caught: [NoMethodError] undefined method `cloud_subnets' for nil:NilClass


Version-Release number of selected component:
=============================================
RHOS13 CFME 5.9.2.4


How reproducible:
=================
100%


Steps to Reproduce:
===================
1. Deploy RHOS 10 SSL HA (Undercloud, 3*Controller, 2*Compute)
2. Add Undercloud as Infrastructure Provider 
3. Add Ovrercloud as Cloud Provider
4. Create a External Network and Subnet
5. Create a private Network and Subnet
6. Create a Router with External Gateway using the network you have created on step 4
7. Select the router you have created on step 6 click Configuration --> 'Add Interface to this Router'


Actual results:
===============
Unexpected error encountered

FATAL -- : Error caught: [NoMethodError] undefined method `cloud_subnets' for nil:NilClass
/opt/rh/cfme-gemset/bundler/gems/cfme-ui-classic-cbe46a84e127/app/controllers/network_router_controller.rb:261:in `add_interface_select'


Expected results:
=================
Interface add successfully 


Additional info:
===============
Screenshot and log are enclosed

Comment 1 Ido Ovadia 2018-05-14 13:32:46 UTC
Created attachment 1436185 [details]
screenshot_unexpected

Comment 2 Ido Ovadia 2018-05-14 13:38:48 UTC
Created attachment 1436190 [details]
production log

Comment 3 Ido Ovadia 2018-05-14 13:39:11 UTC
Created attachment 1436191 [details]
evm log

Comment 4 Ido Ovadia 2018-05-14 15:27:48 UTC
Sorry for typo  on Steps to Reproduce, step 1 should be --> Deploy RHOS 13

Comment 5 Sam Lucidi 2018-05-15 17:49:17 UTC
Ido, does the router you used when discovering this bug have a network manager associated with it? This only seems to reproduce on routers that don't have a network manager due to a refresh bug that was fixed by https://github.com/ManageIQ/manageiq-providers-openstack/pull/290 (not yet backported to 5.9)

Comment 6 Ido Ovadia 2018-05-21 11:30:47 UTC
(In reply to Sam Lucidi from comment #5)
> Ido, does the router you used when discovering this bug have a network
> manager associated with it? This only seems to reproduce on routers that
> don't have a network manager due to a refresh bug that was fixed by
> https://github.com/ManageIQ/manageiq-providers-openstack/pull/290 (not yet
> backported to 5.9)

Correct. Routers don't have a network manager

Comment 7 Sam Lucidi 2018-05-21 16:59:33 UTC
Fixed by https://github.com/ManageIQ/manageiq-providers-openstack/pull/290 in the sense that Routers won't appear without network managers, which is how the scenario described in this bug is possible.

Comment 9 Jad Haj Yahya 2018-07-02 16:58:46 UTC
Verified on 5.10.0.2