Bug 1291611 - installer sometimes links katello-ca-consumer latest to older RPM version
installer sometimes links katello-ca-consumer latest to older RPM version
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Installer (Show other bugs)
6.1.4
All Linux
unspecified Severity high (vote)
: GA
: --
Assigned To: Ivan Necas
Sanket Jagtap
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-15 04:32 EST by Pavel Moravec
Modified: 2018-01-13 05:23 EST (History)
6 users (show)

See Also:
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 07:13:22 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2089931 None None None Never
Foreman Issue Tracker 12266 None None None 2016-04-20 13:07 EDT

  None (edit)
Description Pavel Moravec 2015-12-15 04:32:41 EST
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-17 20:17:00 EDT
Moving to POST since upstream bug http://projects.theforeman.org/issues/12266 has been closed
Comment 4 Sanket Jagtap 2016-05-30 07:26:39 EDT
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 07:41:02 EDT
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 08:11:28 EDT
Moving to POST since upstream bug http://projects.theforeman.org/issues/12266 has been closed
Comment 7 Sanket Jagtap 2016-06-08 07:10:52 EDT
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 15:23:13 EDT
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 04:42:33 EDT
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 07:13:22 EDT
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

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