Bug 1267651

Summary: Containers: Inventory collection fails - undefined method `collect' for nil:NilClass
Product: Red Hat CloudForms Management Engine Reporter: Jan Krocil <jkrocil>
Component: ProvidersAssignee: Alissa <abonas>
Status: CLOSED ERRATA QA Contact: Jan Krocil <jkrocil>
Severity: high Docs Contact:
Priority: high    
Version: 5.5.0CC: abonas, atal, jfrey, jhardy, jkrocil, mfeifer, obarenbo
Target Milestone: GA   
Target Release: 5.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: container
Fixed In Version: 5.5.0.5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-08 13:33:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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