Bug 1315159 - capsule-remove does not delete old certificates.
Summary: capsule-remove does not delete old certificates.
Keywords:
Status: CLOSED DUPLICATE of bug 1327442
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Capsule
Version: 6.1.7
Hardware: All
OS: Linux
medium
medium
Target Milestone: Unspecified
Assignee: Chris Roberts
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-07 06:00 UTC by Kamudini Gazdikova
Modified: 2017-04-25 16:17 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-02 22:01:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Kamudini Gazdikova 2016-03-07 06:00:41 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/.




Additional info:

Comment 4 Chris Roberts 2016-05-02 22:01:28 UTC
Closing this bug as BZ 1327442 is a changeup of configs etc and putting that all into 1 PR so merging this BZ with 1327442 for upstream sanity.

*** This bug has been marked as a duplicate of bug 1327442 ***


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