Bug 1391830 - add more info on the post install about location of where to scp certs tar
Summary: add more info on the post install about location of where to scp certs tar
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Installer
Version: 6.2.2
Hardware: x86_64
OS: Linux
medium
medium vote
Target Milestone: Unspecified
Assignee: Chris Roberts
QA Contact: Evgeni Golov
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-04 07:41 UTC by Chris Roberts
Modified: 2019-09-25 21:05 UTC (History)
4 users (show)

Fixed In Version: katello-3.4.5
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 16:51:07 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 17214 0 None None None 2016-11-04 08:03:23 UTC

Description Chris Roberts 2016-11-04 07:41:01 UTC
In the following line we just tell the customer to scp the file over to the capsule fqdn:

https://github.com/Katello/katello-installer/blob/master/hooks/post/10-post_install.rb#L64

But we dont tell them where, below the installer for the capsule assumes the user put the tar in the correct location, if not the installer on the capsule will fail. 

We should add where to scp the file to and what location it needs to be in

Comment 2 Chris Roberts 2016-11-04 07:50:46 UTC
http://projects.theforeman.org/issues/17214

Comment 3 Bryan Kearney 2016-11-22 15:07:16 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/17214 has been resolved.

Comment 4 Evgeni Golov 2017-08-09 11:48:39 UTC
FAILED_QA

Version Tested:
Satellite-6.3 Snap 10
foreman-installer-katello-3.4.4-1.el7sat.noarch
satellite-installer-6.3.0.3-1.beta.el7sat.noarch
katello-installer-base-3.4.4-1.el7sat.noarch
foreman-installer-1.15.2-1.el7sat.noarch

After satellite-installer --scenario satellite the text is OK:
  Success!
  * Katello is running at https://sat63-qa-rhel7-puppet4.kangae.example.com
      Initial credentials are admin / changeme
  * To install an additional Foreman proxy on separate machine continue by running:

      foreman-proxy-certs-generate --foreman-proxy-fqdn "$FOREMAN_PROXY" --certs-tar "/root/$FOREMAN_PROXY-certs.tar"

And then generating the certs is missing the new information in step "2. Copy":
[root@sat63-qa-rhel7-puppet4 ~]# export FOREMAN_PROXY=proxy.kangae.example.com
[root@sat63-qa-rhel7-puppet4 ~]# foreman-proxy-certs-generate --foreman-proxy-fqdn "$FOREMAN_PROXY" --certs-tar "/root/$FOREMAN_PROXY-certs.tar"
Installing             Done
  Success!

  To finish the installation, follow these steps:

  If you do not have the smartproxy registered to the Katello instance, then please do the following:

  1. yum -y localinstall http://sat63-qa-rhel7-puppet4.kangae.example.com/pub/katello-ca-consumer-latest.noarch.rpm
  2. subscription-manager register --org "Default_Organization"

  Once this is completed run the steps below to start the smartproxy installation:

  1. Ensure that the foreman-installer-katello package is installed on the system.
  2. Copy /root/proxy.kangae.example.com-certs.tar to the system proxy.kangae.example.com
  3. Run the following commands on the Foreman proxy (possibly with the customized
     parameters, see satellite-installer --scenario foreman-proxy-content --help and
     documentation for more info on setting up additional services):

  satellite-installer --scenario foreman-proxy-content\
                    --foreman-proxy-content-parent-fqdn           "sat63-qa-rhel7-puppet4.kangae.example.com"\
                    --foreman-proxy-register-in-foreman           "true"\
                    --foreman-proxy-foreman-base-url              "https://sat63-qa-rhel7-puppet4.kangae.example.com"\
                    --foreman-proxy-trusted-hosts                 "sat63-qa-rhel7-puppet4.kangae.example.com"\
                    --foreman-proxy-trusted-hosts                 "proxy.kangae.example.com"\
                    --foreman-proxy-oauth-consumer-key            "tKHTSEdf9eU6L66YE3UMqdFanVcmcy6A"\
                    --foreman-proxy-oauth-consumer-secret         "fbB35ZQNHBkPg2aGdb242cRfNv5uE994"\
                    --foreman-proxy-content-pulp-oauth-secret     "fWxAi34rrV6B6ur4LkwXrYU2oisZkiLp"\
                    --foreman-proxy-content-certs-tar             "/root/proxy.kangae.example.com-certs.tar"\
                    --puppet-server-foreman-url                   "https://sat63-qa-rhel7-puppet4.kangae.example.com"
  The full log is at /var/log/foreman-proxy-certs-generate.log

The offending commit which has broken this is https://github.com/Katello/katello-installer/commit/73140936fba3992482c72635801d9d99875cc6da

Comment 5 Eric Helms 2017-08-10 00:02:37 UTC
Evgeni,

Apologies but I don't understand your failure output and why this fails. Can you expand a bit further please what exactly is failing?

Comment 6 Evgeni Golov 2017-08-10 07:20:35 UTC
Eric, sure.

in https://github.com/Katello/katello-installer/pull/423/files we changed 3 lines:

-  * To install additional capsule on separate machine continue by running:
+  * To install an additional capsule on a separate machine run the following command:

-      capsule-certs-generate --capsule-fqdn "<%= color('$CAPSULE', :info) %>" --certs-tar "<%= color('~/$CAPSULE-certs.tar', :info) %>"
+      capsule-certs-generate --capsule-fqdn "<%= color('$CAPSULE', :info) %>" --certs-tar "<%= color('/root/$CAPSULE-certs.tar', :info) %>"

-  2. Copy <%= color("#{certs_tar}", :info) %> to the system <%= color("#{capsule_fqdn}", :info) %>
+  2. Copy the following file <%= color("#{certs_tar}", :info) %> to the system <%= color("#{capsule_fqdn}", :info) %> at the following location <%= color("#{File.join('/root', File.basename(certs_tar))}", :info) %>

The first two are changes to the text we output after a successful Satellite installation, and as you can see in my paste, the changes (adding an/a in the first line, /root/ in the second) are there:

  * To install an additional Foreman proxy on separate machine continue by running:

      foreman-proxy-certs-generate --foreman-proxy-fqdn "$FOREMAN_PROXY" --certs-tar "/root/$FOREMAN_PROXY-certs.tar"

However, the third (and IMHO the most important) change to the text after the certs were generated is not there:

  2. Copy /root/proxy.kangae.example.com-certs.tar to the system proxy.kangae.example.com

The text *should* read:

  2. Copy the following file /root/proxy.kangae.example.com-certs.tar to the system proxy.kangae.example.com at the following location /root/proxy.kangae.example.com-certs.tar

Comment 7 Chris Roberts 2017-08-10 17:31:35 UTC
made an updated PR to update the path.

Comment 8 Evgeni Golov 2017-09-06 09:27:54 UTC
VERIFIED

Tested Version:
Satellite 6.3 Snap 14
foreman-installer-katello-3.4.5-1.el7sat.noarch
satellite-installer-6.3.0.4-1.beta.el7sat.noarch

[root@sat63-qa-rhel7 ~]# FOREMAN_PROXY=lala.kangae.example.com
[root@sat63-qa-rhel7 ~]# foreman-proxy-certs-generate --foreman-proxy-fqdn "$FOREMAN_PROXY" --certs-tar "/root/$FOREMAN_PROXY-certs.tar"
Installing             Done                                               [100%] [...........................................................................................................................................................................................................................................]
  Success!

  To finish the installation, follow these steps:

  If you do not have the smartproxy registered to the Katello instance, then please do the following:

  1. yum -y localinstall http://sat63-qa-rhel7.kangae.example.com/pub/katello-ca-consumer-latest.noarch.rpm
  2. subscription-manager register --org "Default_Organization"

  Once this is completed run the steps below to start the smartproxy installation:

  1. Ensure that the foreman-installer-katello package is installed on the system.
  2. Copy the following file /root/lala.kangae.example.com-certs.tar to the system lala.kangae.example.com at the following location /root/lala.kangae.example.com-certs.tar
  scp /root/lala.kangae.example.com-certs.tar root.example.com:/root/lala.kangae.example.com-certs.tar
  3. Run the following commands on the Foreman proxy (possibly with the customized
     parameters, see satellite-installer --scenario foreman-proxy-content --help and
     documentation for more info on setting up additional services):

  satellite-installer --scenario foreman-proxy-content\
                    --foreman-proxy-content-parent-fqdn           "sat63-qa-rhel7.kangae.example.com"\
                    --foreman-proxy-register-in-foreman           "true"\
                    --foreman-proxy-foreman-base-url              "https://sat63-qa-rhel7.kangae.example.com"\
                    --foreman-proxy-trusted-hosts                 "sat63-qa-rhel7.kangae.example.com"\
                    --foreman-proxy-trusted-hosts                 "lala.kangae.example.com"\
                    --foreman-proxy-oauth-consumer-key            "5cNWjh8qJ92jZNiUBTybvR2r7rfc8JSq"\
                    --foreman-proxy-oauth-consumer-secret         "K23dnowPq5KXMsRv9nZx2oBdLquK3nXf"\
                    --foreman-proxy-content-pulp-oauth-secret     "D3NPtiEKCn2j2R9JwfVGizEAhzzeEfGp"\
                    --foreman-proxy-content-certs-tar             "/root/lala.kangae.example.com-certs.tar"\
                    --puppet-server-foreman-url                   "https://sat63-qa-rhel7.kangae.example.com"
  The full log is at /var/log/foreman-proxy-certs-generate.log

Comment 9 Satellite Program 2018-02-21 16:51:07 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-2018:0336


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