Bug 1295670 - katello-backup trying to store non-existing config files and dirs
Summary: katello-backup trying to store non-existing config files and dirs
Keywords:
Status: CLOSED DUPLICATE of bug 1316567
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Backup & Restore
Version: 6.1.5
Hardware: x86_64
OS: Linux
low
low
Target Milestone: Unspecified
Assignee: Christine Fouant
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-05 07:58 UTC by Pavel Moravec
Modified: 2019-11-14 07:17 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-29 20:30:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2112251 0 None None None 2016-01-05 11:59:33 UTC

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 ***


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