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 - [6.3.2][regression] Uploading package to repository gives NoMethodError: undefined method `to_hash'
Summary: [6.3.2][regression] Uploading package to repository gives NoMethodError: unde...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Repositories
Version: 6.3.1
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Stephen Benjamin
QA Contact: Nikhil Kathole
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-29 08:33 UTC by Nikhil Kathole
Modified: 2019-09-26 15:36 UTC (History)
2 users (show)

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:
Clone Of:
: 1596352 (view as bug list)
Environment:
Last Closed: 2018-08-22 20:07:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
log in production.log file (24.70 KB, text/plain)
2018-05-29 08:33 UTC, Nikhil Kathole
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:2550 0 None None None 2018-08-22 20:07:47 UTC

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


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