Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1583545

Summary: [6.3.2][regression] Uploading package to repository gives NoMethodError: undefined method `to_hash'
Product: Red Hat Satellite Reporter: Nikhil Kathole <nkathole>
Component: RepositoriesAssignee: Stephen Benjamin <stbenjam>
Status: CLOSED ERRATA QA Contact: Nikhil Kathole <nkathole>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.3.1CC: pcreech, stbenjam
Target Milestone: UnspecifiedKeywords: Regression, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-runcible-1.12.0.5-1,tfm-rubygem-runcible-1.12.0.7-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1596352 (view as bug list) Environment:
Last Closed: 2018-08-22 20:07:12 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:
Attachments:
Description Flags
log in production.log file none

Description Nikhil Kathole 2018-05-29 08:33:00 UTC
Created attachment 1445244 [details]
log in production.log file

Description of problem: Trying to upload package in yum/puppet repositories gives rror during upload: Task 70e34ae7-8da8-4b3a-b099-b2d4294d6050: NoMethodError: undefined method `to_hash' for #<Runcible::Response:0x00007f0e080ad5a8> Did you mean? to_s


Version-Release number of selected component (if applicable): Satellite 6.3.2 snap 1


How reproducible: always


Steps to Reproduce:
1. Create product
2. Create repository within product
3. Try to upload package in repository

Actual results:
UI shows error as  Error during upload: Task 70e34ae7-8da8-4b3a-b099-b2d4294d6050: NoMethodError: undefined method `to_hash' for #<Runcible::Response:0x00007f0e080ad5a8> Did you mean? to_s (see attachment)

and production.log showed 

2018-05-29 04:26:42  [foreman-tasks/action] [E] undefined method `to_hash' for #<Runcible::Response:0x00007f0e080ad5a8>
 | Did you mean?  to_s (NoMethodError)
 | /opt/theforeman/tfm/root/usr/share/gems/gems/runcible-1.12.0.4/lib/runcible/response.rb:32:in `method_missing'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.34/lib/dynflow/serializable.rb:50:in `recursive_to_hash'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.34/lib/dynflow/serializable.rb:46:in `block in recursive_to_hash'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.34/lib/dynflow/serializable.rb:46:in `each'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.34/lib/dynflow/serializable.rb:46:in `inject'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.34/lib/dynflow/serializable.rb:46:in `recursive_to_hash'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.34/lib/dynflow/action.rb:548:in `check_serializable'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.34/lib/dynflow/action.rb:525:in `block in execute_run'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.34/lib/dynflow/action.rb:431:in `block in with_error_handling'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.34/lib/dynflow/action.rb:431:in `catch'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.34/lib/dynflow/action.rb:431:in `with_error_handling'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.34/lib/dynflow/action.rb:511:in `execute_run'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.34/lib/dynflow/action.rb:268:in `execute'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.34/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:9:in `block (2 levels) in execute'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.34/lib/dynflow/execution_plan/steps/abstract.rb:155:in `with_meta_calculation'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.34/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:8:in `block in execute'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.34/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:22:in `open_action


Expected results: Successful package upload in repository.


Additional info: Regression. Works fine in 6.3.1.

Comment 9 Nikhil Kathole 2018-07-11 09:12:13 UTC
VERIFIED

Version tested:
Satellite 6.3.3 snap 1

# rpm -q satellite
satellite-6.3.3-1.el7sat.noarch

# rpm -qa | grep runcible
tfm-rubygem-runcible-1.12.0.7-1.el7sat.noarch

Successful package upload in repo.

2018-07-11 05:08:11 c5a4b8e9 [app] [I] Started POST "/katello/api/v2/repositories/53/upload_content" for IP at 2018-07-11 05:08:11 -0400
2018-07-11 05:08:11 c5a4b8e9 [app] [I] Processing by Katello::Api::V2::RepositoriesController#upload_content as HTML
2018-07-11 05:08:11 c5a4b8e9 [app] [I]   Parameters: {"content"=>[#<ActionDispatch::Http::UploadedFile:0x00007f37f511e868 @tempfile=#<Tempfile:/tmp/RackMultipart20180711-7591-tl483y.rpm>, @original_filename="tfm-rubygem-hammer_cli_foreman-0.11.0.5-1.el7sat.noarch.rpm", @content_type="application/x-rpm", @headers="Content-Disposition: form-data; name=\"content[]\"; filename=\"tfm-rubygem-hammer_cli_foreman-0.11.0.5-1.el7sat.noarch.rpm\"\r\nContent-Type: application/x-rpm\r\n">], "authenticity_token"=>"PseWped7MHDuMDggns6A4jZa2Kd2cxh7OKcRBXO/be6FNyfG4uHtEvWkkopX0Nmv7arRG+PkF9nHNtszpgCxZw==", "api_version"=>"v2", "id"=>"53"}
2018-07-11 05:08:11 c5a4b8e9 [app] [I] Current user: admin (administrator)
2018-07-11 05:08:11 c5a4b8e9 [app] [I] Expire fragment views/tabs_and_title_records-3 (0.2ms)
2018-07-11 05:08:11 c5a4b8e9 [app] [I] Current user: foreman_admin (administrator)
2018-07-11 05:08:11 c5a4b8e9 [app] [I] Current user: admin (administrator)
2018-07-11 05:08:13 2d35f1ef [app] [I] Completed 200 OK in 12ms (Views: 0.2ms | ActiveRecord: 1.9ms)

Comment 11 errata-xmlrpc 2018-08-22 20:07:12 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/RHBA-2018:2550