Bug 1267651 - Containers: Inventory collection fails - undefined method `collect' for nil:NilClass
Summary: Containers: Inventory collection fails - undefined method `collect' for nil:N...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.5.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.5.0
Assignee: Alissa
QA Contact: Jan Krocil
URL:
Whiteboard: container
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-30 15:04 UTC by Jan Krocil
Modified: 2015-12-08 13:33 UTC (History)
7 users (show)

Fixed In Version: 5.5.0.5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-08 13:33:49 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:2551 0 normal SHIPPED_LIVE Moderate: CFME 5.5.0 bug fixes and enhancement update 2015-12-08 17:58:09 UTC

Comment 2 Alissa 2015-10-01 16:02:28 UTC
I believe the above problem may occur on environments where there are one or more pods which have no volumes. 
Jan, please access directly the REST api on your openshift/k8s environment and attach here the output of the GET pods json response that lists the pods to see how volumes are returned as part of the pods response.
(GET request to https://yourK8sMasterHostNameOrIP:8443/api/v1/pods)
Thanks!

If that's indeed the issue and nil is returned when there are no volumes (as opposed to an empty array), the right solution seems to be on the below line by adding .to_a before .collect here:
https://github.com/ManageIQ/manageiq/blob/master/app/models/manageiq/providers/kubernetes/container_manager/refresh_parser.rb#L507

Comment 8 errata-xmlrpc 2015-12-08 13:33:49 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2015:2551


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