Bug 1302783
Summary: | ERROR -- : Method STDERR: -:53: warning: wrong element type nil at 0 (expected array) | ||
---|---|---|---|
Product: | Red Hat CloudForms Management Engine | Reporter: | Kevin Morey <kmorey> |
Component: | Automate | Assignee: | Greg McCullough <gmccullo> |
Status: | CLOSED NOTABUG | QA Contact: | Dave Johnson <dajohnso> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 5.5.0 | CC: | jhardy, mkanoor, obarenbo, tfitzger |
Target Milestone: | GA | ||
Target Release: | 5.6.0 | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-01-28 19:05:21 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: |
Description
Kevin Morey
2016-01-28 15:43:09 UTC
The change is that STDERR is now being logged. The error is with the script logic which will produce the same errors if you running it in the rails console. (with minor tweaks to replace $evm with a usable hash for testing.) Here is an example of how you can rewrite the method to avoid the errors: dialog_add_disks_hash = $evm.root.attributes.sort.each_with_object({}) do |(k, v), h| h[k] = v if k.kind_of?(String) && k.starts_with?('dialog_add_disk') do puts "#{dialog_add_disks_hash.inspect}" Also I do not think the sort is required and if so it could be done after on the shorter filtered list of items. In place of the "kind_of?" check you can replaced it with a simple ".to_s" call as in this version: dialog_add_disks_hash = $evm.root.attributes.each_with_object({}) do |(k, v), h| h[k] = v if k.to_s.starts_with?('dialog_add_disk') end puts "#{dialog_add_disks_hash.inspect}" |