Description of problem: 1) install capsule and register with satellite 2) Remove it with capsule-remove 3) Try capsule-install again on same node It fails as it hasn't deleted old /etc/foreman-installer configs Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1) install capsule and register with satellite 2) Remove it with capsule-remove 3) Try capsule-install again on same node Actual results: capsule install failure Expected results: successful capsule install Additional info:
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