This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
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 2258968 - Using nonASCII characters in sudo password in REX raises NoMethodError undefined method `empty?' for nil:NilClass:
Summary: Using nonASCII characters in sudo password in REX raises NoMethodError undefi...
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Remote Execution
Version: 6.12.5
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: stream
Assignee: Adam Ruzicka
QA Contact: Peter Ondrejka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-01-18 10:15 UTC by Pavel Moravec
Modified: 2024-06-06 16:59 UTC (History)
4 users (show)

Fixed In Version: rubygem-smart_proxy_dynflow-0.9.2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-06-06 16:59:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 37060 0 Normal Assigned Using nonASCII characters in sudo password in REX raises NoMethodError undefined method `empty?' for nil:NilClass: 2024-01-18 11:24:01 UTC
Red Hat Issue Tracker   SAT-22554 0 None Migrated None 2024-06-06 16:59:49 UTC
Red Hat Knowledge Base (Solution) 7052542 0 None None None 2024-01-18 14:25:38 UTC

Description Pavel Moravec 2024-01-18 10:15:10 UTC
Description of problem:
Setting REX with sudo with effective user password (I assume with REX user password it will be the same), when the password contains some wide characters, REX job fails with output

output: 'Error initializing command: NoMethodError - undefined method `empty?''
      for nil:NilClass'

and relevant backtrace in proxy.log (on the Sat/Caps that was attempting to ssh to the client system).


Version-Release number of selected component (if applicable):
6.12 + (any running preflight checks)


How reproducible:
100%


Steps to Reproduce:
1. On a client, configure some user with password containing a wide character (I used password čislo where the č did it)
2. Set the user as a sudoer requiring password
3. Invoke a REX job via ssh with:
effective_user_method: sudo
ssh_user: the-sudo-user
Effective user password : the password from 1.


Actual results:
The REX job fails with below backtrace in /var/log/foreman-proxy/proxy.log:

2024-01-15T11:21:42  [E] error while initializing command NoMethodError undefined method `empty?' for nil:NilClass:
 /usr/share/gems/gems/smart_proxy_dynflow-0.8.2/lib/smart_proxy_dynflow/io_buffer.rb:87:in `write_available!'
/usr/share/gems/gems/smart_proxy_dynflow-0.8.2/lib/smart_proxy_dynflow/process_manager.rb:130:in `each'
/usr/share/gems/gems/smart_proxy_dynflow-0.8.2/lib/smart_proxy_dynflow/process_manager.rb:130:in `process'
/usr/share/gems/gems/smart_proxy_dynflow-0.8.2/lib/smart_proxy_dynflow/process_manager.rb:65:in `run!'
/usr/share/gems/gems/smart_proxy_remote_execution_ssh-0.7.3/lib/smart_proxy_remote_execution_ssh/runners/script_runner.rb:327:in `run_sync'
/usr/share/gems/gems/smart_proxy_remote_execution_ssh-0.7.3/lib/smart_proxy_remote_execution_ssh/runners/script_runner.rb:404:in `ensure_remote_command'
/usr/share/gems/gems/smart_proxy_remote_execution_ssh-0.7.3/lib/smart_proxy_remote_execution_ssh/runners/script_runner.rb:167:in `preflight_checks'
/usr/share/gems/gems/smart_proxy_remote_execution_ssh-0.7.3/lib/smart_proxy_remote_execution_ssh/runners/script_runner.rb:147:in `start'
/usr/share/gems/gems/smart_proxy_dynflow-0.8.2/lib/smart_proxy_dynflow/runner/dispatcher.rb:32:in `start_runner'
/usr/share/gems/gems/dynflow-1.6.10/lib/dynflow/actor.rb:13:in `on_message'
..


Expected results:
No such error.


Additional info:
ruby IO sending the wide character reports back it sent *multiple* chars instead just the one, causing @buffer underflow in io_buffer.rb .

aruzicka++ for the idea / collaboration

Comment 1 Peter Ondrejka 2024-03-27 16:06:04 UTC
Verified on stream snap 51 using QE automation

Comment 2 Eric Helms 2024-06-06 16:59:51 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "SAT-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.


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