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 1959136 - Backtick in password causes failure during deployment of virt-who config.
Summary: Backtick in password causes failure during deployment of virt-who config.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Virt-who Configure Plugin
Version: 6.9.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.12.0
Assignee: Marek Hulan
QA Contact: Kunxin Huang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-10 18:37 UTC by gtaylor
Modified: 2024-06-14 01:29 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-16 13:32:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github theforeman foreman_virt_who_configure pull 125 0 None Merged Fixes #124 2022-06-29 20:54:07 UTC
Red Hat Issue Tracker SAT-12382 0 None None None 2022-08-23 04:46:30 UTC
Red Hat Knowledge Base (Solution) 6029131 0 None None None 2021-05-11 00:41:29 UTC
Red Hat Product Errata RHSA-2022:8506 0 None None None 2022-11-16 13:32:36 UTC

Description gtaylor 2021-05-10 18:37:29 UTC
Description of problem:
During deployment of a virt-who config, if the password contains a backtick, the script and 'hammer virt-who-config deploy ...' fail.  
The failure is due to using backticks in the code for command substitution and the backtick in the password is conflicting.  


Version-Release number of selected component (if applicable):
virt-who.noarch  0.28.10-1.el7_9

How reproducible:
Always


Steps to Reproduce:
1. Infrastructure > Virt-who Configurations > Create Config
2. Fill out the fields as required.  For the Hypervisor Password field use text with a backtick. e.g. my`password.
3. Click submit
4. Click the Deploy tab to copy the hammer command or the Configuration script. 
5. Run either the hammer command or configuration script.

Actual results:
When using the hammer command:
/tmp/virt_who20210507-1272-1n4wcfx: line 102: unexpected EOF while looking for matching `''
/tmp/virt_who20210507-1272-1n4wcfx: line 108: syntax error: unexpected end of file

When using the script:
./myvirtwho: line 55: unexpected EOF while looking for matching ``'
./myvirtwho: line 108: syntax error: unexpected end of file



Expected results:
== Finished ==
Finished successfully




Additional info:
Workaround. Use the script method instead of the 'hammer virt-who-config deploy ...' method.  In the script: replace the backticks used for command substitution with $(). 
53 #  cr_password=`virt-who-password --password 'virt`who' 2> /dev/null`
54   cr_password=$(virt-who-password --password 'virt`who' 2> /dev/null)

Comment 6 errata-xmlrpc 2022-11-16 13:32:29 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 (Important: Satellite 6.12 Release), 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/RHSA-2022:8506


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