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 1291611

Summary: installer sometimes links katello-ca-consumer latest to older RPM version
Product: Red Hat Satellite Reporter: Pavel Moravec <pmoravec>
Component: InstallationAssignee: Ivan Necas <inecas>
Status: CLOSED ERRATA QA Contact: Sanket Jagtap <sjagtap>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.1.4CC: bbuckingham, chrobert, cwelton, ehelms, kbidarka, oshtaier
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: katello-installer-base-3.0.0.34-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 11:13:22 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 Pavel Moravec 2015-12-15 09:32:41 UTC
Description of problem:
(seen on my environment)

Having capsule with katello-ca-consumer-${FQDN}-1.0-9.[noarch|src].rpm and forcing capsule-installer to generate new version of the RPMs, katello-ca-consumer-latest.noarch.rpm still pointed 1.0-9 and not to the generated 1.0-10 RPM.

The reason is (inecas++) katello_ssl_tool.rb#L36 orders katello-ca-consumer _lexicographically_ and not _numerically_, causing 10 < 9.

This implies client hosts registered to the capsule would get obsolete CAs and wont be able to e.g. register to the capsule.

(I havent seen it on Satellite yet whereas I know instances of Satellite where katello-consumer-latest pointed to version e.g. 1.0-25 so the problem might not be such general as it seems)


Version-Release number of selected component (if applicable):
Sat 6.1.4
capsule-installer-2.3.20-1.el7sat.noarch


How reproducible:
100% (expected)


Steps to Reproduce:
1. On capsule, artificially update CAs (e.g. by repetitive removing /var/www/html/pub/katello-server-ca.crt and re-running capsule-installer) such that /var/www/html/pub/katello-ca-consumer-latest.noarch.rpm points to 1.0-9 version.
2. Run the same once again such that katello-ca-consumer 1.0-10 is created
3. Check where /var/www/html/pub/katello-ca-consumer-latest.noarch.rpm points to.


Actual results:
It still points to 1.0-9


Expected results:
Needs to point to 1.0-10


Additional info:

Comment 3 Bryan Kearney 2016-05-18 00:17:00 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/12266 has been closed

Comment 4 Sanket Jagtap 2016-05-30 11:26:39 UTC
Build : satellite 6.2 snap 13.1

It seems --certs-update-server-ca doesn't work with new foreman-installer.

foreman-installer --scenario capsule --certs-update-server-ca
--certs-update-server-ca needs to be used with katello
/usr/share/gems/gems/kafo-0.7.3/lib/kafo/hook_context.rb:71:in `exit': private method `exit' called for #<Kafo::KafoConfigure:0x00000002925048> (NoMethodError)
	from /usr/share/katello-installer-base/hooks/pre/20-certs_update.rb:9:in `error'
	from /usr/share/katello-installer-base/hooks/pre/20-certs_update.rb:28:in `block (4 levels) in load'
	from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/hooking.rb:34:in `instance_eval'
	from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/hooking.rb:34:in `block (4 levels) in load'
	from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/hook_context.rb:13:in `instance_exec'
	from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/hook_context.rb:13:in `execute'
	from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/hooking.rb:51:in `block in execute'
	from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/hooking.rb:49:in `each'
	from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/hooking.rb:49:in `execute'
	from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/kafo_configure.rb:373:in `run_installation'
	from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/kafo_configure.rb:149:in `execute'
	from /usr/share/gems/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
	from /usr/share/gems/gems/clamp-0.6.2/lib/clamp/command.rb:125:in `run'
	from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/kafo_configure.rb:156:in `run'
	from /usr/sbin/foreman-installer:12:in `<main>'

Comment 5 Sanket Jagtap 2016-05-30 11:41:02 UTC
satellite-installer --scenario capsule --certs-update-server-ca
--certs-update-server-ca needs to be used with katello
/usr/share/gems/gems/kafo-0.7.3/lib/kafo/hook_context.rb:71:in `exit': private method `exit' called for #<Kafo::KafoConfigure:0x00000001078f90> (NoMethodError)
	from /usr/share/katello-installer-base/hooks/pre/20-certs_update.rb:9:in `error'
	from /usr/share/katello-installer-base/hooks/pre/20-certs_update.rb:28:in `block (4 levels) in load'
	from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/hooking.rb:34:in `instance_eval'
	from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/hooking.rb:34:in `block (4 levels) in load'
	from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/hook_context.rb:13:in `instance_exec'
	from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/hook_context.rb:13:in `execute'
	from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/hooking.rb:51:in `block in execute'
	from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/hooking.rb:49:in `each'
	from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/hooking.rb:49:in `execute'
	from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/kafo_configure.rb:373:in `run_installation'
	from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/kafo_configure.rb:149:in `execute'
	from /usr/share/gems/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
	from /usr/share/gems/gems/clamp-0.6.2/lib/clamp/command.rb:125:in `run'
	from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/kafo_configure.rb:156:in `run'
	from /usr/sbin/satellite-installer:12:in `<main>'

Comment 6 Bryan Kearney 2016-05-30 12:11:28 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/12266 has been closed

Comment 7 Sanket Jagtap 2016-06-08 11:10:52 UTC
Still the issue remains

Build :Satellite 6.2 Snap 14.1

rpm -qa | grep satellite 
satellite-installer-6.2.0.7-1.el7sat.noarch
sjagtap-capsule.xyz.com-puppet-client-1.0-1.noarch
sjagtap-capsule.xyz.com-qpid-client-cert-1.0-1.noarch
satellite-capsule-6.2.0-14.2.el7sat.noarch
sjagtap-capsule.xyz.com-qpid-router-client-1.0-1.noarch
sjagtap-capsule.xyz.com-qpid-broker-1.0-1.noarch
sjagtap-capsule.xyz.com-foreman-proxy-client-1.0-1.noarch
katello-ca-consumer-sjagtap-sat6.xyz.com-1.0-1.noarch
sjagtap-capsule.xyz.com-qpid-router-server-1.0-1.noarch
sjagtap-capsule.xyz.com-apache-1.0-1.noarch
sjagtap-capsule.xyz.com-foreman-proxy-1.0-2.noarch
[root@sjagtap-capsule pub]# satellite-installer --scenario capsule --certs-update-server-ca
--certs-update-server-ca needs to be used with katello
/usr/share/gems/gems/kafo-0.7.3/lib/kafo/hook_context.rb:71:in `exit': private method `exit' called for #<Kafo::KafoConfigure:0x00000002900e00> (NoMethodError)
	from /usr/share/katello-installer-base/hooks/pre/20-certs_update.rb:9:in `error'
	from /usr/share/katello-installer-base/hooks/pre/20-certs_update.rb:28:in `block (4 levels) in load'
	from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/hooking.rb:34:in `instance_eval'
	from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/hooking.rb:34:in `block (4 levels) in load'
	from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/hook_context.rb:13:in `instance_exec'
	from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/hook_context.rb:13:in `execute'
	from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/hooking.rb:51:in `block in execute'
	from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/hooking.rb:49:in `each'
	from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/hooking.rb:49:in `execute'
	from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/kafo_configure.rb:373:in `run_installation'
	from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/kafo_configure.rb:149:in `execute'
	from /usr/share/gems/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
	from /usr/share/gems/gems/clamp-0.6.2/lib/clamp/command.rb:125:in `run'
	from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/kafo_configure.rb:156:in `run'
	from /usr/sbin/satellite-installer:12:in `<main>'

Comment 8 Ivan Necas 2016-06-08 19:23:13 UTC
As per https://access.redhat.com/documentation/en/red-hat-satellite/6.2-beta/installation-guide/chapter-3-installing-satellite-server, the --certs-update-server-ca is meant to run on satellite, not on capsule, so the error is not relevant to the bug. Putting back ON_QA

Comment 9 Sanket Jagtap 2016-06-21 08:42:33 UTC
Build:Satellite 6.2 snap 16.0

Verified , newer rpms like katello-ca-consumer 1.0-10 linked to katello-consumer-latest on capsule.

Comment 12 Bryan Kearney 2016-07-27 11:13:22 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/RHBA-2016:1501