Bug 1545240 - internal server error when cloud_tenants or flavors subcollection is requested on infra provider
Summary: internal server error when cloud_tenants or flavors subcollection is requeste...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: API
Version: 5.9.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: GA
: 5.10.0
Assignee: Gregg Tanzillo
QA Contact: Parthvi Vala
URL:
Whiteboard: api:rest:provider
Depends On:
Blocks: 1612905
TreeView+ depends on / blocked
 
Reported: 2018-02-14 13:05 UTC by Martin Kourim
Modified: 2019-02-11 14:08 UTC (History)
7 users (show)

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


Attachments (Terms of Use)

Description Martin Kourim 2018-02-14 13:05:30 UTC
Description of problem:
When accessing "cloud_tenants" or "flavors" subcollection on infrastructure provider the request fails with internal server error:

{
    "error": {
        "kind": "internal_server_error",
        "message": "undefined method `cloud_tenants' for #<ManageIQ::Providers::Vmware::InfraManager:0x0000001162c120>\nDid you mean?  cloud_subnets",
        "klass": "NoMethodError"
    }
}
and
{
    "error": {
        "kind": "internal_server_error",
        "message": "undefined method `flavors' for #<ManageIQ::Providers::Vmware::InfraManager:0x00000010d40c78>",
        "klass": "NoMethodError"
    }
}

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


How reproducible:
100%


Steps to Reproduce:
1. add infrastructure provider
2. request the "cloud_tenants" or "flavors" subcollection
GET /api/providers/:id/cloud_tenants
GET /api/providers/:id/flavors

Comment 3 CFME Bot 2018-02-14 14:45:16 UTC
New commit detected on ManageIQ/manageiq-api/master:
https://github.com/ManageIQ/manageiq-api/commit/6fc044ede5c14688eb12b2436880f292f9e32486

commit 6fc044ede5c14688eb12b2436880f292f9e32486
Author:     Jillian Tullo <jtullo>
AuthorDate: Wed Feb 14 09:02:08 2018 -0500
Commit:     Jillian Tullo <jtullo>
CommitDate: Wed Feb 14 09:02:08 2018 -0500

    Infra providers do not have cloud_tenants or flavors, causing a 500 error to be returned when they are requested.
    
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1545240

 app/controllers/api/subcollections/cloud_tenants.rb |  2 +-
 app/controllers/api/subcollections/flavors.rb       |  2 +-
 spec/requests/cloud_tenants_spec.rb                 | 12 ++++++++++++
 spec/requests/flavors_spec.rb                       | 10 ++++++++++
 4 files changed, 24 insertions(+), 2 deletions(-)

Comment 5 Jan Zmeskal 2018-07-18 08:41:39 UTC
Is this bug going to be fixed in 5.9? I have 5.9.4.0 installed and the bug is still present in there.

Comment 10 Parthvi Vala 2018-11-06 14:13:29 UTC
FIXED. Verified on 5.10.0.22.20181030184024_26956a0.


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