Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1204916 - downcase_hash_keys function missing
downcase_hash_keys function missing
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Container Management (Show other bugs)
6.0.4
Unspecified Unspecified
unspecified Severity high (vote)
: Beta
: Unused
Assigned To: Dmitri Dolguikh
Og Maciel
http://projects.theforeman.org/issues...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-03-23 14:27 EDT by Mike McCune
Modified: 2017-02-23 15:15 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-08-12 01:30:29 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Fog error while searching for Docker Hub container image (302.09 KB, image/png)
2015-03-23 14:30 EDT, Og Maciel
no flags Details
stacktrace (185.07 KB, text/plain)
2015-03-23 14:41 EDT, Og Maciel
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 9544 None None None 2016-04-22 12:46 EDT
Red Hat Product Errata RHSA-2015:1592 normal SHIPPED_LIVE Important: Red Hat Satellite 6.1.1 on RHEL 6 2015-08-12 05:04:35 EDT

  None (edit)
Description Mike McCune 2015-03-23 14:27:43 EDT
Hi guys,

I recently confirmed a bug (9242) which has since been resolved but the resolution has brought another bug to my attention preventing the image search from completing on foreman for me at this time.

I have tracked the issue down to the file:

/usr/share/foreman/vendor/ruby/1.9.1/gems/foreman_docker-1.2.0/app/models/concerns/fog_extensions/fogdocker/images.rb

It looks like the module necessary to provide 'downcase_hash_keys' has not been included in this module sadly. I have managed to workaround this by adding the following:

      def downcase_hash_keys(hash, k = [])
        return {k.join('_').gsub(/([a-z])([A-Z])/,'\1_\2').downcase => hash} unless hash.is_a?(Hash)
        hash.reduce({}){ |h, v| h.merge! downcase_hash_keys(v[-1], k + [v[0]]) }
      end

This is, however, very hacky and should be resolved by including the correct module in my opinion.

Please let me know if you need any further information.
Comment 1 Mike McCune 2015-03-23 14:27:44 EDT
Created from redmine issue http://projects.theforeman.org/issues/9544
Comment 2 Og Maciel 2015-03-23 14:30:59 EDT
Created attachment 1005552 [details]
Fog error while searching for Docker Hub container image
Comment 4 Og Maciel 2015-03-23 14:39:39 EDT
Here's how I came across the error shown on the attached file from comment #2:

* Create a new Docker container
  * Select your docker compute resource
  * Select the Docker Hub tab
  * Search for a docker container image that you know is not present in the compute resource
Comment 5 Og Maciel 2015-03-23 14:41:41 EDT
Created attachment 1005553 [details]
stacktrace
Comment 6 Bryan Kearney 2015-03-23 16:05:38 EDT
Upstream bug assigned to ddolguik@redhat.com
Comment 7 Bryan Kearney 2015-03-23 16:05:39 EDT
Moving to POST since upstream bug http://projects.theforeman.org/issues/9544 has been closed
-------------
Anonymous
Applied in changeset commit:foreman-docker|10216d79d016e5a1408d1ceb6141d7b75139e518.
Comment 10 Og Maciel 2015-03-26 12:00:36 EDT
Verified by QE using Satellite-6.1.0-RHEL-7-20150324.0 build. This issue is no longer happening.
Comment 11 Bryan Kearney 2015-08-11 09:36:03 EDT
This bug is slated to be released with Satellite 6.1.
Comment 12 errata-xmlrpc 2015-08-12 01:30:29 EDT
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:1592

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