Bug 1327442
| Summary: | Satellite 6.2 Beta: capsule-remove doesn't remove foreman-installer configs, which causes failure of next capsule install | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Pradeep Kumar Surisetty <psuriset> |
| Component: | Capsule | Assignee: | Chris Roberts <chrobert> |
| Status: | CLOSED ERRATA | QA Contact: | Sanket Jagtap <sjagtap> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 6.2.0 | CC: | bbuckingham, chrobert, cwelton, dlezzoum, dnagarat, kbidarka, kshirsal, mmccune, sthirugn, xdmoon |
| Target Milestone: | Unspecified | Keywords: | Triaged |
| Target Release: | Unused | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | http://projects.theforeman.org/issues/14906 | ||
| Whiteboard: | |||
| Fixed In Version: | katello-installer-base-3.0.0.22-1 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-07-27 11:12:24 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: | |||
| Bug Depends On: | 1350897 | ||
| Bug Blocks: | 1115190 | ||
|
Description
Pradeep Kumar Surisetty
2016-04-15 07:38:39 UTC
Description of problem:
capsule-remove does not delete old certificates.
Version-Release number of selected component (if applicable):
- Red Hat Satellite v 6.1.7
- capsule-installer-2.3.24-1.el7sat.noarch
Issue:
capsule-remove does not delete old certificate rpms. In katello-remove script, "/var/www/html/pub/katello-ca*.rpm" is removed, but it's missing in capsule-remove. That is why we have multiple versions of katello-ca-consumer.
Confirmed by checking and comparing the files from "/usr/share/capsule-installer/bin/capsule-remove" && "/usr/share/katello/script/katello-remove" we can see that for 'CERT_FILES' section is missing to mention for removal of "/var/www/html/pub/katello-ca*.rpm" whereas katello-remove has it scripted.
=============================
Capsule (capsule-remove) file
=============================
[root@dhcp9-147 ~]# cat /usr/share/capsule-installer/bin/capsule-remove
#!/bin/bash
echo ""
echo "WARNING: This script will erase many packages and config files."
echo "Important packages such as the following will be removed:"
echo ""
echo " * httpd (apache)"
echo " * mongodb"
echo " * tomcat"
echo " * puppet"
echo " * ruby"
echo " * rubygems"
echo " * All Katello and Foreman Packages"
...
CERT_FILES=(
/etc/pki/pulp/
/etc/pki/katello
/root/ssl-build
)
===============================
Satellite (katello-remove) file
===============================
[root@dhcp3-80 ~]# cat /usr/share/katello/script/katello-remove
#!/bin/bash
echo ""
echo "WARNING: This script will erase many packages and config files."
echo "Important packages such as the following will be removed:"
echo ""
echo " * elasticsearch"
echo " * httpd (apache)"
echo " * mongodb"
echo " * tomcat6"
echo " * puppet"
echo " * ruby"
echo " * rubygems"
echo " * All Katello and Foreman Packages"
......
...
CERT_FILES=(
/etc/pki/pulp/
/etc/pki/content/*
/etc/pki/katello
/root/ssl-build
/etc/pki/tls/certs/katello-node.crt
/etc/pki/tls/private/katello-node.key
/etc/pki/tls/certs/pulp_consumers_ca.crt
/etc/pki/tls/certs/pulp_ssl_cert.crt
/var/www/html/pub/katello-ca*.rpm
)
Expected results:
capsule-remove should delete old certificates from /var/www/html/pub/.
*** Bug 1315159 has been marked as a duplicate of this bug. *** Moving to POST since upstream bug http://projects.theforeman.org/issues/14906 has been closed *** Bug 1336270 has been marked as a duplicate of this bug. *** Build :satellite 6.2 Snap 14.1
cat /usr/share/foreman-installer-katello/bin/capsule-remove
So,the capsule-remove script has
CERT_FILES=(
/etc/pki/pulp/
/etc/pki/katello
/root/ssl-build
/var/www/html/pub/katello-ca*.rpm
)
The output of command:
....
....
Complete!
Cleaning up configuration files
Cleaning up log files
Cleaning up Certs
Now , on trying to install Capsule again
satellite-installer --scenario capsule --parent-fqdn "sjagtap-sat6.satellite.lab.eng.rdu2.redhat.com" --register-in-foreman "true" --foreman-base-url "https://sjagtap-sat6.satellite.lab.eng.rdu2.redhat.com" --trusted-hosts "sjagtap-sat6.satellite.lab.eng.rdu2.redhat.com" --trusted-hosts "sjagtap-capsule.satellite.lab.eng.rdu2.redhat.com" --oauth-consumer-key "ex3aFNpdYfrR5WXD87BEWEPqadiV9v7Z" --oauth-consumer-secret "UnNrnDWP6RMbM7a9ppcnfPHJzvuxaTWE" --pulp-oauth-secret "UnNrnDWP6RMbM7a9ppcnfPHJzvuxaTWE" --certs-tar "/root/sjagtap-capsule.satellite.lab.eng.rdu2.redhat.com-certs.tar"
Manifest foreman_proxy_plugin_openscap/manifests/init.pp was not found in /usr/share/katello-installer-base/modules, /usr/share/foreman-installer/modules
/usr/share/gems/gems/kafo-0.7.3/lib/kafo/puppet_module.rb:29:in `join': no implicit conversion of nil into String (TypeError)
from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/puppet_module.rb:29:in `initialize'
from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/configuration.rb:89:in `new'
from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/configuration.rb:89:in `block in modules'
from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/configuration.rb:89:in `map'
from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/configuration.rb:89:in `modules'
from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/configuration.rb:185:in `params'
from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/configuration.rb:194:in `preset_defaults_from_puppet'
from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/kafo_configure.rb:249:in `set_parameters'
from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/kafo_configure.rb:102:in `initialize'
from /usr/share/gems/gems/clamp-0.6.2/lib/clamp/command.rb:125:in `new'
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>'
So, I have to use satellite-installer --scenario capsule as capsule-installer is deprecated.
Is this the correct way for verification?
This does indeed appear to fail :(. I got the following on snap 17 as well. Manifest foreman_proxy_plugin_openscap/manifests/init.pp was not found in /usr/share/katello-installer-base/modules, /usr/share/foreman-installer/modules /usr/share/gems/gems/kafo-0.7.3/lib/kafo/puppet_module.rb:29:in `join': no implicit conversion of nil into String (TypeError) from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/puppet_module.rb:29:in `initialize' from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/configuration.rb:89:in `new' from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/configuration.rb:89:in `block in modules' from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/configuration.rb:89:in `map' from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/configuration.rb:89:in `modules' from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/configuration.rb:185:in `params' from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/configuration.rb:194:in `preset_defaults_from_puppet' from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/kafo_configure.rb:249:in `set_parameters' from /usr/share/gems/gems/kafo-0.7.3/lib/kafo/kafo_configure.rb:102:in `initialize' from /usr/share/gems/gems/clamp-0.6.2/lib/clamp/command.rb:125:in `new' 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>' Although - it is possible the above 2 comments should be in a new bug. To be discussed offline. Moving this back to ONQA, with the recognition that it cannot be verified until bug #1350897 is fixed. Build: Satellite 6.2 snap 19.1 bug #1350897 is Fixed and Verified Capsule-remove was successfully. Capsule was reinstalled successfully without any issues. 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 qe_test_coverage PR: https://github.com/SatelliteQE/robottelo/pull/5388 |