Bug 1499326

Summary: After running katello-certs-check, capsule-certs-generate doesn't put the hostname in the filename for what command to run
Product: Red Hat Satellite Reporter: Peter Gervase <pgervase>
Component: CertificatesAssignee: Chris Roberts <chrobert>
Status: CLOSED NEXTRELEASE QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2.12CC: bbuckingham, chrobert
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-09 13:17:04 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 Peter Gervase 2017-10-06 18:35:27 UTC
Description of problem:
After you run the katello-certs-check cmd, you are given commands to run to the capsule-certs-generate command with all of its options (See bugs 1499323 and 1499316)
The output of the “capsule-certs-generate” command’s --capsule-certs-tar line, it does not provide the correct value for this option.
When you use the default certs from Satellite the “capsule-certs-generate” command’s --capsule-certs-tar line looks like:
                >                     --capsule-certs-tar                           "~/mycapsule.mydomain.com-certs.tar"

But when you are using your own custom certs, that line looks like:
                                    --capsule-certs-tar                           "~/-certs.tar"

Version-Release number of selected component (if applicable):
foreman-installer-katello-3.0.0.96-1.el7sat.noarch

How reproducible:
100%

Steps to Reproduce:
1. Run katello-certs-check
2. Run capsule-certs-generate with custom certs
3.

Actual results:
Output like
--capsule-certs-tar                           "~/-certs.tar"

Expected results:
--capsule-certs-tar                           "~/mycapsule.mydomain.com-certs.tar"

Additional info:

Comment 2 Chris Roberts 2017-10-31 15:48:02 UTC
Fixed upstream/6.3

To use them inside an EXISTING $FOREMAN_PROXY, run this command INSTEAD:

    foreman-proxy-certs-generate --foreman-proxy-fqdn "$FOREMAN_PROXY"\
                                 --certs-tar  "~/$FOREMAN_PROXY-certs.tar"\
                                 --server-cert "/etc/pki/katello/certs/katello-apache.crt"\
                                 --server-cert-req "/etc/pki/katello/certs/katello-default-ca.crt"\
                                 --server-key "/etc/pki/katello/private/katello-apache.key"\
                                 --server-ca-cert "/etc/pki/katello/certs/katello-default-ca.crt"\
                                 --certs-update-server