Bug 1562065

Summary: Unable to create Cloud Network due to undefined method
Product: Red Hat CloudForms Management Engine Reporter: Ido Ovadia <iovadia>
Component: ProvidersAssignee: Scott Seago <sseago>
Status: CLOSED CURRENTRELEASE QA Contact: Ido Ovadia <iovadia>
Severity: high Docs Contact:
Priority: high    
Version: 5.9.0CC: cpelland, dajohnso, gblomqui, iovadia, jfrey, jhardy, maufart, obarenbo, rhrazdil, sseago
Target Milestone: GAKeywords: Regression, 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:
: 1565147 (view as bug list) Environment:
Last Closed: 2019-02-11 14:03:02 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: 1561962, 1565147    
Attachments:
Description Flags
Cloud net fail
none
evm log
none
production log
none
cloud network raw data error none

Description Ido Ovadia 2018-03-29 13:05:38 UTC
Description of problem:
=======================
Failed to create cloud network (OSP 11 Overcloud)
Unable to create Cloud Network "private": undefined method `[]' for nil:NilClass

Version-Release number of selected component:
=============================================
5.9.2.0
OSPD 11 SSL Overcloud and Undercloud  

How reproducible:
=================

Steps to Reproduce:
===================
1. Deploy OSPD11 SSL Undercloud and Overcloud
2. Add Undercloud as Infrastructure provider and Overcloud as Cloud provider   
3. ems_refresh is_admin: true
4. Networks --> Networks --> Add new Cloud Network 

Actual results:
===============
Unable to create Cloud Network "private": undefined method `[]' for nil:NilClass

Expected results:
=================
Network created successfully 

Additional info:
================
log are enclosed

Comment 1 Ido Ovadia 2018-03-29 13:07:56 UTC
Created attachment 1414760 [details]
Cloud net fail

Comment 2 Ido Ovadia 2018-03-29 13:08:57 UTC
Created attachment 1414762 [details]
evm log

Comment 3 Ido Ovadia 2018-03-29 13:10:24 UTC
Created attachment 1414763 [details]
production log

Comment 6 Marek Aufart 2018-03-29 14:04:25 UTC
There is a small issue with parsing error message from Neutron call which failed in Keystone. The actual 401 for Network creation is the problem.

Comment 7 Scott Seago 2018-04-02 21:45:57 UTC
As Marek suggested, there are two components to what's happened here:
1) The OpenStack API call is throwing a 401 error
2) The MIQ codebase is failing to parse the 401 error properly, since it assumes any exception returned is a Neutron error and doesn't verify this before trying to dig into the NeutronError element.

I'm assuming that the first component is driving the blocker aspect to this -- failing to create something that should work properly. The second component -- displaying the wrong error message if there is an error on creation would, by itself, be a less significant bug.

In investigating this, I was unable to reproduce 1) in my development environment. Regarding 2), I see the error in the parsing code -- in the absence of a "NeutronError" element, we need to fall back to looking for an "error" element, pulling the "message" sub-element from whichever one we find.

Comment 10 Scott Seago 2018-04-03 13:31:48 UTC
Fix to the error parsing bug (the one remaining problem here after the 401 was confirmed to be a credentials problem) posted here: https://github.com/ManageIQ/manageiq-providers-openstack/pull/263

Comment 12 Radim Hrazdil 2018-05-23 14:55:30 UTC
*** Bug 1561962 has been marked as a duplicate of this bug. ***

Comment 13 Radim Hrazdil 2018-05-23 15:09:37 UTC
Hello Scott,

the patch [1] fixes the error parsing bug in the way that it is not null, however, the shown error contains raw data and should be further parsed.

See the attached screenshot.

Shall I file a new bug for this or can it be within this one? Thanks.

[1] https://github.com/ManageIQ/manageiq-providers-openstack/pull/263

Comment 14 Radim Hrazdil 2018-05-23 15:10:17 UTC
Created attachment 1440662 [details]
cloud network raw data error

Comment 15 Scott Seago 2018-05-24 18:10:25 UTC
I think this should be opened as a new bug. It looks like you're triggering a different error condition. The good news is that PR https://github.com/ManageIQ/manageiq-providers-openstack/pull/293 should probably fix the raw data error you're seeing, so it can probably be moved straight to post linking that PR.

Comment 16 Ido Ovadia 2018-06-17 21:23:43 UTC
Verified
========
5.10.0.0