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.
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}
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
(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 16Lukáš 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.
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