Bug 1402041

Summary: Status 500 Internal Server Error undefined method editing cloud network for non admin / tenant network
Product: Red Hat CloudForms Management Engine Reporter: Ronnie Rasouli <rrasouli>
Component: ProvidersAssignee: Marek Aufart <maufart>
Status: CLOSED CURRENTRELEASE QA Contact: Ola Pavlenko <opavlenk>
Severity: high Docs Contact:
Priority: high    
Version: 5.7.0CC: dajohnso, iovadia, jfrey, jhardy, obarenbo, rrasouli, simaishi, slucidi
Target Milestone: GA   
Target Release: 5.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: openstack:sdn
Fixed In Version: 5.9.0.13 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-06 15:27:30 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:
Attachments:
Description Flags
logs from reproducing the error none

Description Ronnie Rasouli 2016-12-06 15:48:34 UTC
Created attachment 1228612 [details]
logs from reproducing the error

Description of problem:

editing a cloud network fails results with http 500 error
`name&#39; for nil:NilClass [cloud_network/cloud_network_form_fields] 



Version-Release number of selected component (if applicable):
5.7.0.13-rc3.20161129142908_1d51fd2 

How reproducible:
100%

Steps to Reproduce:
1. create a new tenant (test_tenant) and user (test_user) in Horizon, make sure the user and admin roles in this project
2. add new cloud provider that the user is test_user
3. make sure all networks are public / shared
4. create a nettworks --> network router -> configuration add new network router
5. enter the tenant network manager manager, router name, network name, cloud tenant , save
6. go to networks --> networks -> select the tenant network
7. got to configuration --> edit this cloud network

Actual results:
http 500 error
`name&#39; for nil:NilClass [cloud_network/cloud_network_form_fields] 

Expected results:

proceed with the edit network dialog

Additional info:

Comment 3 Tzu-Mainn Chen 2016-12-06 16:16:40 UTC
It looks like the underlying issue is this: somehow a network was synced to ManageIQ without an associated cloud tenant.

Comment 4 Dave Johnson 2016-12-06 16:52:25 UTC
Please assess the impact of this issue and update the severity accordingly.  Please refer to https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity for a reminder on each severity's definition.

Comment 5 Ronnie Rasouli 2016-12-08 12:31:55 UTC
there is another https://bugzilla.redhat.com/show_bug.cgi?id=1402770 which is related, when adding new cloud provider it might be that it wont get associated with cloud network

Comment 6 Sam Lucidi 2017-11-22 19:41:57 UTC
This appears to happen only in situations where the network manager has been refreshed before the cloud manager, resulting in missing links between networks and cloud tenants. This generally clears up as soon as another refresh is run. A fix for this sync problem is available here: https://github.com/ManageIQ/manageiq-providers-openstack/pull/154 though I don't believe it will be able to be backported to Fine.

Comment 7 Ido Ovadia 2018-03-04 13:24:51 UTC
Verified
========
5.9.0.22