Bug 1267651 - Containers: Inventory collection fails - undefined method `collect' for nil:NilClass
Containers: Inventory collection fails - undefined method `collect' for nil:N...
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers (Show other bugs)
5.5.0
Unspecified Unspecified
high Severity high
: GA
: 5.5.0
Assigned To: Alissa
Jan Krocil
container
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-30 11:04 EDT by Jan Krocil
Modified: 2015-12-08 08:33 EST (History)
7 users (show)

See Also:
Fixed In Version: 5.5.0.5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-08 08:33:49 EST
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)
Comment 2 Alissa 2015-10-01 12:02:28 EDT
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 08:33:49 EST
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.