Red Hat Bugzilla – Bug 1267651
Containers: Inventory collection fails - undefined method `collect' for nil:NilClass
Last modified: 2015-12-08 08:33:49 EST
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)
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:
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.