Bug 1500732

Summary: Tilde ~ symbol in --capsule-fqdn param value in capsule-certs-generate tool causes error. Regression.
Product: Red Hat Satellite Reporter: Lukáš Hellebrandt <lhellebr>
Component: Foreman ProxyAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact: Katello QA List <katello-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.3.0CC: ddolguik, nkathole
Target Milestone: UnspecifiedKeywords: Regression
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-10-11 11:59:24 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 Lukáš Hellebrandt 2017-10-11 11:48:18 UTC
Description of problem:
The Sat6.2 Installation Guide [1] in section "4.6.1. Configuring Capsule Server with a Default Server Certificate", part 1, advises to run:

# capsule-certs-generate \
--capsule-fqdn "mycapsule.example.com" \
--certs-tar "~/mycapsule.example.com-certs.tar"

In 6.3, you have to use --foreman-proxy-fqd instead of --capsule-fqdn (bug 1500671) which is unrelated to this bug. So let's fix it:

# capsule-certs-generate \
--foreman-proxy-fqdn "<FQDN>" \
--certs-tar "~/whatever-certs.tar"

However, using the tilde ~ symbol causes the following error:

"""
Parameter certs-tar invalid: ~/whatever-certs.tar is not one of regexes matching /^(([a-zA-Z]:[\\\/Error during configuration, exiting
"""

However, in 6.2 (tested with foreman-installer-katello-3.0.0.65-1), the tilde is expanded properly and the tool continues correctly -> this is regression.

Nope: the error message being displayed incorrectly is bug 1500676.

How reproducible:
Deterministic

Steps to Reproduce:
1. # capsule-certs-generate \
--foreman-proxy-fqdn "<FQDN>" \
--certs-tar "~/whatever-certs.tar"

Actual results:
Error

Expected results:
Correctly expanded path used and the tool run continues

Additional info:
[1] https://access.redhat.com/documentation/en-us/red_hat_satellite/6.2/html/installation_guide/installing_capsule_server

Comment 1 Nikhil Kathole 2017-10-11 11:53:19 UTC
Looks like similar issue:

https://bugzilla.redhat.com/show_bug.cgi?id=1466688

Comment 2 Lukáš Hellebrandt 2017-10-11 11:59:24 UTC
^ That's correct. Even the "tilde case" is mentioned in the comments, thus, I am closing this BZ as a duplicate.

*** This bug has been marked as a duplicate of bug 1466688 ***