Bug 1392594 - Querying all providers while expanding cloud_networks causes an internal_server_error
Summary: Querying all providers while expanding cloud_networks causes an internal_serv...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: API
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.8.0
Assignee: Jillian Tullo
QA Contact: Martin Kourim
URL:
Whiteboard: rest:cloud:sdn
Depends On:
Blocks: 1397138
TreeView+ depends on / blocked
 
Reported: 2016-11-07 21:02 UTC by abellott
Modified: 2019-08-06 20:05 UTC (History)
5 users (show)

Fixed In Version: 5.8.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1397138 (view as bug list)
Environment:
Last Closed: 2017-06-12 16:59:59 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:


Attachments (Terms of Use)

Description abellott 2016-11-07 21:02:06 UTC
Description of problem:

When the DB includes regular InfraManagers in addition to CloudManagers,
querying the providers causes a stack trace and returns an internal server
error (HTTP 500).

GET /api/providers?expand=resources,cloud_networks

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

5.7

How reproducible:

Always:

Steps to Reproduce:

1. Setup appliance.
2. Setup a VmWare or RedHat provider.
3. Run the GET /api/providers?expand=resources,cloud_networks API command


Actual results:

{
  "error": {
    "kind": "internal_server_error",
    "message": "undefined method `cloud_networks' for #<ManageIQ::Providers::Redhat::InfraManager:0x007f8d1966c1c0>",
    "klass": "NoMethodError"
  }
}

Expected results:

Successful provider resource list

Additional info:

Comment 2 Šimon Lukašík 2016-11-09 11:50:27 UTC
https://github.com/ManageIQ/manageiq/pull/12522

Comment 3 Šimon Lukašík 2016-11-14 11:47:39 UTC
Jillian was first to fix this. Reassigning.

https://github.com/ManageIQ/manageiq/pull/12467

Comment 4 abellott 2016-11-21 14:39:01 UTC
moving to POST this was merged upstream and backported to Euwe release:

$ git log -1
commit 82d6df6a1c6a093f1060453d21935843886776a1
Author: Alberto Bellotti <abellotti.github.com>
Date:   Wed Nov 16 10:14:50 2016 -0500

    Merge pull request #12467 from jntullo/fix_cloud_network_subcollection

    check if provider responds to cloud_networks in subcollection
    (cherry picked from commit 1ff3ed360f841c3f1c4546dbdb24617795875160)

    https://github.com/ManageIQ/manageiq/issues/12456

Comment 6 Martin Kourim 2017-02-28 19:32:38 UTC
Tested on appliance with VmWare and GCE providers. Provider resource list successfully returned.


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