Bug 2121249

Summary: Syncable Exports have spaces in the exported paths
Product: Red Hat Satellite Reporter: Partha Aji <paji>
Component: Inter Satellite SyncAssignee: Partha Aji <paji>
Status: CLOSED ERRATA QA Contact: Radek Mynar <rmynar>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.11.2CC: chrobert, pcreech
Target Milestone: 6.12.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-katello-4.5.0.6-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-16 13:35:34 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 Partha Aji 2022-08-25 00:21:59 UTC
Description of problem:
Syncable Exports introduced an issue with path names. It uses the content view name + version and generates paths that look like
```/var/lib/pulp/exports/Test_Organization/Test CV/1.0/2022-08-03T00-17-11-00-00/metadata.json```

instead of

```/var/lib/pulp/exports/Test_Organization/Test_CV/1.0/2022-08-03T00-17-11-00-00/metadata.json```

The CV name has a space in it on the expanded path. While this in itself is not a big issue it seems break the bats tests.

Version-Release number of selected component (if applicable):
6.11.z

How reproducible: always


Steps to Reproduce:
1. Create a CV name with a space in it
2. Add a simple custom repo or rh repo with `immediate` download policy
3. Publish
4. Export the content view version via hammer.
`hammer content-export complete version --id=<cvv-id> `

Actual path
`/var/lib/pulp/exports/Test_Organization/Test CV/1.0/2022-08-03T00-17-11-00-00/metadata.json`

with the space

Expected path
`/var/lib/pulp/exports/Test_Organization/Test_CV/1.0/2022-08-03T00-17-11-00-00/metadata.json` with no space

Comment 1 Partha Aji 2022-08-25 00:23:18 UTC
Connecting redmine issue https://projects.theforeman.org/issues/35410 from this bug

Comment 2 Bryan Kearney 2022-08-25 04:05:21 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/35410 has been resolved.

Comment 4 Chris Roberts 2022-10-03 18:52:53 UTC
Verified:

Created a content view called test space and exported it, output shows a _ where the space was:

[root@satpreview ~]# hammer content-view version list
---|-------------------------------|---------|-------------|-----------------------
ID | NAME                          | VERSION | DESCRIPTION | LIFECYCLE ENVIRONMENTS
---|-------------------------------|---------|-------------|-----------------------
11 | Import-repo-534 2.0           | 2.0     |             | Library               
12 | test space 1.0                | 1.0     |             | Library               
9  | Default Organization View 1.0 | 1.0     |             | Library               
6  | Default Organization View 1.0 | 1.0     |             | Library               
5  | alazik-testing 1.0            | 1.0     |             | Library               
4  | RHEL8 1.0                     | 1.0     |             | Library               
3  | RHEL7 1.0                     | 1.0     |             | Library               
2  | Default Organization View 1.0 | 1.0     |             | Library               
1  | Default Organization View 1.0 | 1.0     |             | Library               
---|-------------------------------|---------|-------------|-----------------------
[root@satpreview ~]# hammer content-export complete version --id 12
[..................................................................................................................................................................................] [100%]
Generated /var/lib/pulp/exports/Default_Organization/test_space/1.0/2022-10-03T14-51-23-04-00/metadata.json

Comment 8 errata-xmlrpc 2022-11-16 13:35:34 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