Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2052867

Summary: ensure capsule upgrade has the right certs available
Product: Red Hat Satellite Reporter: Evgeni Golov <egolov>
Component: Satellite MaintainAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED CURRENTRELEASE QA Contact: Satellite QE Team <sat-qe-bz-list>
Severity: high Docs Contact:
Priority: high    
Version: 6.11.0CC: ahumbe, apatel, aupadhye, egolov, ehelms, kgaikwad, lpramuk, satellite6-bugs, smallamp, vsedmik
Target Milestone: UnspecifiedKeywords: Triaged, UpgradeBlocker, Upgrades
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2049893 Environment:
Last Closed: 2023-09-06 00:33:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2049893    
Bug Blocks:    

Description Evgeni Golov 2022-02-10 08:36:59 UTC
With Sat 7.0, we change how certs are deployed internally in the installer.
And while his has no user visible impact from a functionality perspective, they do require to have an uptodate certs tarball when trying to upgrade a capsule from 6.10 to 7.0.

To ensure users actually have this, we propose to add a check to foreman maintains's "capsule upgrade" procedure, to ensure the new files are in place.

To check this, you can take the path to the certs tarball from the answers file and check that the following files are inside ($HOSTNAME is the fqdn of the capsule):
ssl-build/katello-default-ca.crt
ssl-build/katello-server-ca.crt
ssl-build/$HOSTNAME/$HOSTNAME-foreman-proxy-client.crt
ssl-build/$HOSTNAME/$HOSTNAME-foreman-proxy.key
ssl-build/$HOSTNAME/$HOSTNAME-foreman-proxy.crt
ssl-build/$HOSTNAME/$HOSTNAME-foreman-proxy-client.key
ssl-build/$HOSTNAME/$HOSTNAME-foreman-proxy-client.crt
ssl-build/$HOSTNAME/$HOSTNAME-apache.key
ssl-build/$HOSTNAME/$HOSTNAME-apache.crt
ssl-build/$HOSTNAME/$HOSTNAME-puppet-client.key
ssl-build/$HOSTNAME/$HOSTNAME-puppet-client.crt

If they are, no further action is needed, the installer will pick up the tarball and use the contents correctly.

If they are not, the user needs to be warned, as the upgrade will fail otherwise.

Below you find the original report which this BZ was created as a clone of.

+++ This bug was initially created as a clone of Bug #2049893 +++

Description of problem:
Capsule upgrade from 6.10.2 to 7.0 fails in Procedures::Installer::Upgrade


Version-Release number of selected component (if applicable):
original Sat/Cap - 6.10.2 snap 2
DF repos for upg - 7.0.0 snap 7


How reproducible:
always


Steps to Reproduce:
1. Have a blank SAT with registered external CAPSuple
2. Upgrade the Satellite to 7.0 (succeeds)
3. Try to upgrade the Capsule to 7.0
# satellite-maintain upgrade list-versions
# satellite-maintain upgrade check --target-version=7.0 --whitelist="repositories-validate,repositories-setup"
# satellite-maintain upgrade run --target-version=7.0 --whitelist="repositories-validate,repositories-setup"


Actual results:
Fails in Procedures::Installer::Upgrade step

2022-02-02 11:53:29 [NOTICE] [configure] Starting system configuration.
2022-02-02 11:53:42 [NOTICE] [configure] 250 configuration steps out of 1640 steps complete.
2022-02-02 11:53:50 [ERROR ] [configure] /Stage[main]/Certs::Ca/File[/etc/pki/katello/certs/katello-default-ca.crt]: Could not evaluate: Could not retrieve information from environment production source(s) file:///root/ssl-build/katello-default-ca.crt
2022-02-02 11:53:50 [ERROR ] [configure] /Stage[main]/Certs::Ca/File[/etc/pki/katello/certs/katello-server-ca.crt]: Could not evaluate: Could not retrieve information from environment production source(s) file:///root/ssl-build/katello-server-ca.crt
2022-02-02 11:53:50 [ERROR ] [configure] /Stage[main]/Certs::Foreman_proxy/Cert_key_bundle[/etc/pki/katello/private/dhcp-2-76.vms.sat.rdu2.redhat.com-foreman-proxy-client-bundle.pem]: Could not evaluate: No such file or directory @ rb_sysopen - /root/ssl-build/dhcp-2-76.vms.sat.rdu2.redhat.com/dhcp-2-76.vms.sat.rdu2.redhat.com-foreman-proxy-client.crt
2022-02-02 11:53:50 [ERROR ] [configure] /Stage[main]/Certs::Foreman_proxy/Certs::Keypair[dhcp-2-76.vms.sat.rdu2.redhat.com-foreman-proxy]/File[/etc/foreman-proxy/ssl_key.pem]: Could not evaluate: Could not retrieve information from environment production source(s) file:///root/ssl-build/dhcp-2-76.vms.sat.rdu2.redhat.com/dhcp-2-76.vms.sat.rdu2.redhat.com-foreman-proxy.key
2022-02-02 11:53:50 [ERROR ] [configure] /Stage[main]/Certs::Foreman_proxy/Certs::Keypair[dhcp-2-76.vms.sat.rdu2.redhat.com-foreman-proxy]/File[/etc/foreman-proxy/ssl_cert.pem]: Could not evaluate: Could not retrieve information from environment production source(s) file:///root/ssl-build/dhcp-2-76.vms.sat.rdu2.redhat.com/dhcp-2-76.vms.sat.rdu2.redhat.com-foreman-proxy.crt
2022-02-02 11:53:50 [ERROR ] [configure] /Stage[main]/Certs::Foreman_proxy/Certs::Keypair[dhcp-2-76.vms.sat.rdu2.redhat.com-foreman-proxy-client]/File[/etc/foreman-proxy/foreman_ssl_key.pem]: Could not evaluate: Could not retrieve information from environment production source(s) file:///root/ssl-build/dhcp-2-76.vms.sat.rdu2.redhat.com/dhcp-2-76.vms.sat.rdu2.redhat.com-foreman-proxy-client.key
2022-02-02 11:53:50 [ERROR ] [configure] /Stage[main]/Certs::Foreman_proxy/Certs::Keypair[dhcp-2-76.vms.sat.rdu2.redhat.com-foreman-proxy-client]/File[/etc/foreman-proxy/foreman_ssl_cert.pem]: Could not evaluate: Could not retrieve information from environment production source(s) file:///root/ssl-build/dhcp-2-76.vms.sat.rdu2.redhat.com/dhcp-2-76.vms.sat.rdu2.redhat.com-foreman-proxy-client.crt
2022-02-02 11:53:50 [ERROR ] [configure] /Stage[main]/Certs::Apache/Certs::Keypair[dhcp-2-76.vms.sat.rdu2.redhat.com-apache]/File[/etc/pki/katello/private/katello-apache.key]: Could not evaluate: Could not retrieve information from environment production source(s) file:///root/ssl-build/dhcp-2-76.vms.sat.rdu2.redhat.com/dhcp-2-76.vms.sat.rdu2.redhat.com-apache.key
2022-02-02 11:53:50 [ERROR ] [configure] /Stage[main]/Certs::Apache/Certs::Keypair[dhcp-2-76.vms.sat.rdu2.redhat.com-apache]/File[/etc/pki/katello/certs/katello-apache.crt]: Could not evaluate: Could not retrieve information from environment production source(s) file:///root/ssl-build/dhcp-2-76.vms.sat.rdu2.redhat.com/dhcp-2-76.vms.sat.rdu2.redhat.com-apache.crt
2022-02-02 11:53:54 [NOTICE] [configure] 500 configuration steps out of 1645 steps complete.
2022-02-02 11:53:54 [ERROR ] [configure] /Stage[main]/Certs::Puppet/Certs::Keypair[dhcp-2-76.vms.sat.rdu2.redhat.com-puppet-client]/File[/etc/pki/katello/puppet/puppet_client.key]: Could not evaluate: Could not retrieve information from environment production source(s) file:///root/ssl-build/dhcp-2-76.vms.sat.rdu2.redhat.com/dhcp-2-76.vms.sat.rdu2.redhat.com-puppet-client.key
2022-02-02 11:53:54 [ERROR ] [configure] /Stage[main]/Certs::Puppet/Certs::Keypair[dhcp-2-76.vms.sat.rdu2.redhat.com-puppet-client]/File[/etc/pki/katello/puppet/puppet_client.crt]: Could not evaluate: Could not retrieve information from environment production source(s) file:///root/ssl-build/dhcp-2-76.vms.sat.rdu2.redhat.com/dhcp-2-76.vms.sat.rdu2.redhat.com-puppet-client.crt
2022-02-02 11:53:55 [NOTICE] [configure] 750 configuration steps out of 1646 steps complete.
2022-02-02 11:53:56 [NOTICE] [configure] 1000 configuration steps out of 1653 steps complete.
2022-02-02 11:53:56 [NOTICE] [configure] 1250 configuration steps out of 1653 steps complete.
2022-02-02 11:53:57 [NOTICE] [configure] 1500 configuration steps out of 1653 steps complete.
2022-02-02 11:54:35 [NOTICE] [configure] System configuration has finished.

  There were errors detected during install.


Expected results:
No errors detected and successful upgrade

Comment 3 Sudhir Mallamprabhakara 2022-03-23 03:30:49 UTC
@Brad - @Evegeni - do we still need this BZ. Documentation is being addressed in the original Bug #2049893 using the JIRA story https://issues.redhat.com/browse/SAT-6404

Comment 4 Evgeni Golov 2022-03-23 07:09:28 UTC
This feature BZ is for the Foreman Maintain component, which *could* check that the user doesn't have the right certs and alert them.

If you think docs is enough, feel free to close it, but I think that's a nice UX Feature to have.

Comment 5 Brad Buckingham 2023-09-01 21:10:52 UTC
Upon review of our valid but aging backlog the Satellite Team has concluded that this Bugzilla does not meet the criteria for a resolution in the near term, and are planning to close in a month. This message may be a repeat of a previous update and the bug is again being considered to be closed. If you have any concerns about this, please contact your Red Hat Account team.  Thank you.