Bug 1747566

Summary: Escape backslashes added to value each time Ansible array variable is edited in Satellite 6.6 beta
Product: Red Hat Satellite Reporter: Brian Smith <briasmit>
Component: Ansible - Configuration ManagementAssignee: Ondřej Pražák <oprazak>
Status: CLOSED ERRATA QA Contact: Lukas Pramuk <lpramuk>
Severity: medium Docs Contact:
Priority: high    
Version: 6.6.0CC: akarimi, fgarciad, fperalta, oprazak
Target Milestone: 6.7.0Keywords: Triaged, UserExperience
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-foreman_ansible-4.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1791500 (view as bug list) Environment:
Last Closed: 2020-04-14 13:25:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Brian Smith 2019-08-30 20:22:14 UTC
Description of problem:
Escape backslashes added to value each time Ansible array variable is edited in Satellite 6.6 beta in web interface

Version-Release number of selected component (if applicable):
Satellite 6.6 public beta

How reproducible:
every time

Steps to Reproduce:
- Go to Configure->Variables(Under Ansible Header)
- Click New Ansible Variable
- Name variable and assign to existing role
- Override, and set type to Array
- Set array value to ["test1","test2"]
- Click Submit
- Open variable for editing again, value is now:  "[\"test1\",\"test2\"]"
- Don't change anything, click Submit
- Open variable for editing again, value is now: "\"[\\\"test1\\\",\\\"test2\\\"]\""
- Each time the variable is opened and Submit is clicked, this pattern is repeated and additional backslashes are added.  

Actual results:
Backslashes are added to value each time variable is edited.  

Expected results:
Value remains the same, without escape backslashes added

Comment 3 Ondřej Pražák 2019-11-14 09:51:09 UTC
Connecting redmine issue https://projects.theforeman.org/issues/27445 from this bug

Comment 4 Bryan Kearney 2019-11-14 11:02:36 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/27445 has been resolved.

Comment 5 Ondřej Pražák 2019-11-26 12:00:09 UTC
Moving to ON_QA as this is already in 6.7 snaps.

Comment 6 Francisco Peralta 2019-12-03 10:17:56 UTC
Dear Ondrej,
 my customer is asking if it would be possible to also have a hotfix on top of 6.6 for them to proceed with their timeline: what do you think?

Thanks in advance,
 Cisco.

Comment 8 Ondřej Pražák 2019-12-16 07:51:01 UTC
I can't promise this will end up in 6.6.z, the target release(s) will be decided during regular triage sessions based on the capacity and priorities.

Comment 10 Lukas Pramuk 2020-01-30 13:04:46 UTC
VERIFIED.

@satellite-6.7.0-5.beta.el7sat.noarch
tfm-rubygem-foreman_ansible-4.0.3-1.el7sat.noarch

by the manual reproducer described in comment#0

>>> ansible variable array value remains ["test1","test2"] after successive edits

Comment 12 Ondřej Pražák 2020-03-12 09:23:57 UTC
*** Bug 1785820 has been marked as a duplicate of this bug. ***

Comment 14 errata-xmlrpc 2020-04-14 13:25:28 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/RHSA-2020:1454