Bug 1470309 - API request for VM information failing
API request for VM information failing
Status: CLOSED NOTABUG
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: API (Show other bugs)
5.8.0
Unspecified Unspecified
unspecified Severity unspecified
: GA
: cfme-future
Assigned To: Gregg Tanzillo
Dave Johnson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-12 13:28 EDT by Chris Hale
Modified: 2017-12-05 10:15 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-07-14 14:39:04 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Chris Hale 2017-07-12 13:28:53 EDT
Description of problem:
When attempting to make a request details on a VM we are receiving the following error. 
Looked at the log, and seeing an API error:

{
    "error": {
        "kind": "internal_server_error",
        "message": "undefined method `keys' for nil:NilClass",
        "klass": "NoMethodError"
    }
}

From this URL:

/api/services/12?expand=vms%2Corchestration_stacks&attributes=name%2Cguid%2Ccreated_at%2Ctype%2Cdescription%2Cpicture%2Cpicture.image_href%2Cevm_owner.name%2Cevm_owner.userid%2Cmiq_group.description%2Call_service_children%2Caggregate_all_vm_cpus%2Caggregate_all_vm_memory%2Caggregate_all_vm_disk_count%2Caggregate_all_vm_disk_space_allocated%2Caggregate_all_vm_disk_space_used%2Caggregate_all_vm_memory_on_disk%2Cretired%2Cretirement_state%2Cretirement_warn%2Cretires_on%2Cactions%2Ccustom_actions%2Cprovision_dialog%2Cservice_resources%2Cchargeback_report%2Cservice_template%2Cparent_service%2Cpower_state%2Cpower_status%2Coptions%2Cvms.ipaddresses%2Cvms.snapshots%2Cvms.v_total_snapshots%2Cvms.v_snapshot_newest_name%2Cvms.v_snapshot_newest_timestamp%2Cvms.v_snapshot_newest_total_size%2Cvms.supports_console%3F%2Cvms.supports_launch_cockpit%3F


Additional info:
We make this request in the SUI on the VM details page.
Comment 2 Chris Hale 2017-07-12 13:31:00 EDT
Actually , we make this request from the Service details page not the VM details page.
Comment 3 Dave Johnson 2017-07-13 23:01:03 EDT
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.

If it's something like a tracker bug where it doesn't matter, please set it to Low/Low.
Comment 4 Jillian Tullo 2017-07-14 14:39:04 EDT
Marking this as notabug.

After discussing with Chris and recreating locally, it is an issue with the same sample database that we are using (this is an issue that has only been seen locally). Some of the orchestration stack resources were removed (most likely for sanitation purposes) but their references remain, which results in orchestration_stacks returning [nil].

In real life this would not happen because the references would be removed (have ensured the relationship is configured properly).

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