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 1826603 - Remote execution job fails with TypeError (no implicit conversion of Array into String
Summary: Remote execution job fails with TypeError (no implicit conversion of Array in...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Remote Execution
Version: 6.7.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: 6.7.5
Assignee: Adam Ruzicka
QA Contact: Lukáš Hellebrandt
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-04-22 04:38 UTC by dgupte
Modified: 2023-10-06 19:43 UTC (History)
8 users (show)

Fixed In Version: tfm-rubygem-foreman_remote_execution-2.0.10.3-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-26 19:03:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 30068 0 Normal Closed Remote execution job fails with TypeError (no implicit conversion of Array into String 2021-02-09 10:57:39 UTC
Red Hat Knowledge Base (Solution) 5003401 0 None None None 2020-05-21 10:04:32 UTC
Red Hat Product Errata RHBA-2020:4346 0 None None None 2020-10-26 19:03:24 UTC

Description dgupte 2020-04-22 04:38:18 UTC
Description of problem:
>>>
Remote execution job fails with "TypeError (no implicit conversion of Array into String" error after upgrade to 6.7 when Global Parameter has "remote_execution_ssh_keys" defined. 

Version-Release number of selected component (if applicable):
>>>
6.7

Steps to Reproduce:
>>>
1. Add "remote_execution_ssh_keys" in Global Parameters with type string and any key value  like below,
--
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDSsK0oExZLLLVLS2ZN+8qTl2ak+4tRGTP57mTtlGd1nNd6aTFwDakQ6chW18VcrpELhU0VYzUBYI4K2IRlYQUolW3qCLIeKAYJHDj81KYdSWeGx4PPPskmUc3BczN2nZOb3+PoOsV00lH1rfPIFuA6Oj4TUiyCpKZIUIL6/tKrQ/WxZ5FDbdQyHicXtOQy/rroyoM/DArJm77LTC9V8RCDmBVioK4bltdQXSA4SQkmkIAn9hafNwmIbFq/9JRdFXYzj5pqWikXYj45BLcELlOoBoZZx6N9UelwcE/fFL/dy8hiWYzOkMxshuCTuVdAJi/rPedZd1XGSD455uboPlRJ
--

2.  Try to fetch host paras from Satellite webui >> Hosts >> select any host >> click on "YAML" or use hammer command, 

# echo  'Host.find_by_name("vm253-90.example.com").params'  |  foreman-rake console


Actual results:
>>>
[root@sat67 ~]# echo  'Host.find_by_name("vm253-90.example.com").params'  |  foreman-rake console
Loading production environment (Rails 5.2.1)
Switch to inspect mode.
Host.find_by_name("vm253-90.example.com").params
Traceback (most recent call last):
        6: from lib/tasks/console.rake:5:in `block in <top (required)>'
        5: from (irb):1
        4: from app/models/concerns/host_params.rb:11:in `params'
        3: from app/models/concerns/host_params.rb:54:in `host_params'
        2: from foreman_remote_execution (2.0.10) app/models/concerns/foreman_remote_execution/host_extensions.rb:54:in `host_params_hash'
        1: from foreman_remote_execution (2.0.10) app/models/concerns/foreman_remote_execution/host_extensions.rb:54:in `+'
TypeError (no implicit conversion of Array into String)

Expected results:
>>>
[root@sat66 ~]# echo  'Host.find_by_name("vm253-90.example.com").params'  |  foreman-rake console
Loading production environment (Rails 5.2.1)
Switch to inspect mode.
Host.find_by_name("vm253-90.example.com").params
{"anan"=>true, "enable-epel"=>"false", "enable-puppet5"=>"true", "remote_execution_ssh_keys"=>["ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDhZJllZtrkxCLRuHTPQdRGktroyY7S3Vmk6/QHtZSHCvV/OrtVYyaUGVGxB5nD+uzBnz2IkYp49lnPwPYqGX5S/gzzCbM4EoyGvulGCVTAq+TwKJUQkck2QmpTnyKNiZCGQlIlBE8aGSEfAwvfyUEkng+Rjsw4u/UoNYJ5ijuVNjyh6G6rIilT0f3MdQ/DQTmMQVy1Aol5li8MCbu2r96rgff2BHM2IdV1Aqr5hTbNF/+SbhKZWq1nTZ4Jmbu9hSux/l4atxH7ikqVucP2HZEDtDY6zAvHSgMSJtEcdC38GZ/QOc3gBpnPgtwECVORwzO+w5rNY9BBLNRQE6AMtLtl foreman-proxy.pnq2.redhat.com"], "remote_execution_ssh_user"=>"rex", "remote_execution_effective_user_method"=>"sudo", "remote_execution_connect_by_ip"=>true}

Comment 3 Adam Ruzicka 2020-04-22 10:20:12 UTC
Well, yes, the parameter should be an array of strings, not just a string.

Comment 10 Adam Ruzicka 2020-06-09 08:42:53 UTC
Created redmine issue http://projects.theforeman.org/issues/30068 from this bug

Comment 11 Bryan Kearney 2020-06-20 12:05:14 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/30068 has been resolved.

Comment 13 Adam Ruzicka 2020-07-03 08:36:27 UTC
Not sure what the actual question for the needinfo is. Anyway, support for it being a string was added back in tfm-rubygem-foreman_remote_execution-3.3.2

Comment 14 Taft Sanders 2020-07-03 12:33:43 UTC
(In reply to Adam Ruzicka from comment #13)
> Not sure what the actual question for the needinfo is. Anyway, support for
> it being a string was added back in
> tfm-rubygem-foreman_remote_execution-3.3.2

Sorry for the confusion. Just wanted to bring to your attention that the "Hidden Value" checkbox changes the value from array to string and wasn't sure if it was being addressed or covered in any QE testing. Since support for both array and string will be included, then it should. Thanks for clarifying.

Comment 16 Lukáš Hellebrandt 2020-10-14 14:44:51 UTC
Verified with Sat 6.7.5 snap 1.

Used reproducer from OP and from comment 14. Host parameters can now be retrieved.

Comment 21 errata-xmlrpc 2020-10-26 19:03:10 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 (Satellite 6.7.5 Async Bug Fix Update), 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-2020:4346


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