Bug 1295670 - katello-backup trying to store non-existing config files and dirs
katello-backup trying to store non-existing config files and dirs
Status: CLOSED DUPLICATE of bug 1316567
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Backup & Restore (Show other bugs)
6.1.5
x86_64 Linux
low Severity low (vote)
: Unspecified
: --
Assigned To: Christine Fouant
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-05 02:58 EST by Pavel Moravec
Modified: 2017-04-25 12:19 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-03-29 16:30:27 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2112251 None None None 2016-01-05 06:59 EST

  None (edit)
Description Pavel Moravec 2016-01-05 02:58:46 EST
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 16:30:27 EDT

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