Bug 1562065 - Unable to create Cloud Network due to undefined method
Summary: Unable to create Cloud Network due to undefined method
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.9.0
Hardware: x86_64
OS: Linux
high
high
Target Milestone: GA
: 5.10.0
Assignee: Scott Seago
QA Contact: Ido Ovadia
URL:
Whiteboard: openstack:sdn
: 1561962 (view as bug list)
Depends On:
Blocks: 1561962 1565147
TreeView+ depends on / blocked
 
Reported: 2018-03-29 13:05 UTC by Ido Ovadia
Modified: 2019-02-11 14:03 UTC (History)
10 users (show)

Fixed In Version: 5.10.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1565147 (view as bug list)
Environment:
Last Closed: 2019-02-11 14:03:02 UTC
Category: ---
Cloudforms Team: Openstack
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Cloud net fail (115.89 KB, image/png)
2018-03-29 13:07 UTC, Ido Ovadia
no flags Details
evm log (35.73 KB, text/plain)
2018-03-29 13:08 UTC, Ido Ovadia
no flags Details
production log (23.54 KB, text/plain)
2018-03-29 13:10 UTC, Ido Ovadia
no flags Details
cloud network raw data error (37.17 KB, image/png)
2018-05-23 15:10 UTC, Radim Hrazdil
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1561962 0 high CLOSED Unable to create Cloud Network "<network_name>": undefined method `[]' for nil:NilClass 2021-02-22 00:41:40 UTC

Internal Links: 1561962

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


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