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 1295670

Summary: katello-backup trying to store non-existing config files and dirs
Product: Red Hat Satellite Reporter: Pavel Moravec <pmoravec>
Component: Backup & RestoreAssignee: Christine Fouant <cfouant>
Status: CLOSED DUPLICATE QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: 6.1.5CC: kshirsal, riehecky
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-29 20:30:27 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 2016-01-05 07:58:46 UTC
Description of problem:
katello-backup script attempts to store nonexisting config files and directories. Per the script:

CONFIGS=(
    /etc/candlepin
    /etc/elasticsearch
    /etc/foreman
    /etc/foreman-proxy
    /etc/gutterball
    /etc/hammer
    /etc/httpd
    /etc/katello
    /etc/katello-installer
    /etc/pki/content
    /etc/pki/katello
    /etc/pki/katello-certs-tools
    /etc/pki/pulp
    /etc/pki/tls/certs/katello-node.crt
    /etc/pki/tls/certs/pulp_consumers_ca.crt
    /etc/pki/tls/certs/pulp_ssl_cert.crt
    /etc/pki/tls/private/katello-node.key
    /etc/pulp
    /etc/puppet
    /etc/qpid
    /etc/qpid-dispatch
    /etc/sysconfig/elasticsearch
    /etc/sysconfig/tomcat*
    /etc/tomcat*
    /root/ssl-build
    /var/lib/foreman
    /var/lib/katello
    /var/lib/candlepin
    /var/www/html/pub
)

But these files/directories are not present on usual Sat6 installation:

 /etc/pki/content
 /etc/pki/tls/certs/katello-node.crt
 /etc/pki/tls/certs/pulp_consumers_ca.crt
 /etc/pki/tls/certs/pulp_ssl_cert.crt
 /etc/pki/tls/private/katello-node.key
 /var/lib/katello

Commenting individual files/dirs:

- /etc/pki/content: not present, possible relevant /etc/pki/pulp/content is collected
- /etc/pki/tls/certs/katello-node.crt: not present, never mentioned
- /etc/pki/tls/certs/pulp_consumers_ca.crt: not present, never mentioned
- /etc/pki/tls/certs/pulp_ssl_cert.crt: not present, never mentioned
- /etc/pki/tls/private/katello-node.key: not present, never mentioned
- /var/lib/katello: not present, mentioned in katello.erb installer under a comment

Also katello-remove script attempts to remove those files/dirs, also worth removing them from this script as well.


Version-Release number of selected component (if applicable):
katello-common-2.2.0.16-1.el7sat.noarch


How reproducible:
100%


Steps to Reproduce:
1. mkdir /tmp/tmp
2. katello-backup /tmp/tmp > /dev/null
3. grep -e /etc/pki/content -e /etc/pki/tls/certs/katello-node.crt -e /etc/pki/tls/certs/pulp_consumers_ca.crt -e /etc/pki/tls/certs/pulp_ssl_cert.crt -e /etc/pki/tls/private/katello-node.key -e /var/lib/katello $(which katello-backup) 


Actual results:
2.
..
Redirecting to /bin/systemctl stop  postgresql.service
tar: Removing leading `/' from member names
tar: /etc/pki/content: Cannot stat: No such file or directory
tar: /etc/pki/tls/certs/katello-node.crt: Cannot stat: No such file or directory
tar: /etc/pki/tls/certs/pulp_consumers_ca.crt: Cannot stat: No such file or directory
tar: /etc/pki/tls/certs/pulp_ssl_cert.crt: Cannot stat: No such file or directory
tar: /etc/pki/tls/private/katello-node.key: Cannot stat: No such file or directory
tar: /var/lib/katello: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
tar: Removing leading `/' from member names
..

3. The grep in katello-remove finds all 6 files/dirs not existing


Expected results:
2. No such "Cannot stat:" errors.
3. grep output should be empty


Additional info:

Comment 2 Christine Fouant 2016-03-29 20:30:27 UTC

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