Project

General

Profile

Bug #19453

katello-backup does not apply postgres group owner to the whole backup path

Added by Christine Fouant about 2 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
High
Category:
Backup & Restore
Target version:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1432013

Description of problem:
katello-backup does not apply postgres group owner to the whole backup path

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

How reproducible:
everytime

Steps to Reproduce:
1. make backup top level directory belonging to root group
  1. ls la /backup
    total 4
    drwxrwx--
    . 2 root root 6 Mar 14 10:17 .
    2. run o# katello-backup --skip-pulp-content --online-backup /backup/db-backup-2017-03-13/
    Starting backup: 2017-03-14 10:17:58 +0000
    Creating backup folder /backup/db-backup-2017-03-13/katello-backup-2017-03-14T10:17:58+00:00
    Redirecting to /bin/systemctl stop foreman-tasks.service
    Redirecting to /bin/systemctl stop httpd.service
    Redirecting to /bin/systemctl stop pulp_workers.service
    Redirecting to /bin/systemctl stop foreman-proxy.service
    Redirecting to /bin/systemctl stop pulp_streamer.service
    Redirecting to /bin/systemctl stop pulp_resource_manager.service
    Redirecting to /bin/systemctl stop pulp_celerybeat.service
    Redirecting to /bin/systemctl stop smart_proxy_dynflow_core.service
    Redirecting to /bin/systemctl stop tomcat.service
    Redirecting to /bin/systemctl stop squid.service
    Redirecting to /bin/systemctl stop qdrouterd.service
    Redirecting to /bin/systemctl stop qpidd.service
    Redirecting to /bin/systemctl stop postgresql.service
    Redirecting to /bin/systemctl stop mongod.service
    Backing up config files...
    tar: Removing leading `/' from member names
    Done.
    Backing up postgres db...
    -bash: /backup/db-backup-2017-03-13/katello-backup-2017-03-14T10:17:58+00:00/foreman.dump: Permission denied
    -bash: /backup/db-backup-2017-03-13/katello-backup-2017-03-14T10:17:58+00:00/candlepin.dump: Permission denied
    Done.
    Backing up mongo db...
    couldn't connect to [localhost] couldn't connect to server localhost:27017 (127.0.0.1), connection attempt failed
    Done.
    • BACKUP Complete, contents can be found in: /backup/db-backup-2017-03-13/katello-backup-2017-03-14T10:17:58+00:00 **
      nline backup
Actual results:
Top level and intermediate directory belongs to root so postgres user can't dump database
  1. ls lRa /backup
    /backup:
    total 4
    drwxrwx--
    . 3 root root 33 Mar 14 10:17 .
    dr-xr-xr-x. 18 root root 4096 Mar 13 13:30 ..
    drwxr-xr-x. 3 root root 53 Mar 14 10:17 db-backup-2017-03-13

/backup/db-backup-2017-03-13:
total 0
drwxr-xr-x. 3 root root 53 Mar 14 10:17 .
drwxrwx---. 3 root root 33 Mar 14 10:17 ..
drwxrwx---. 2 root postgres 51 Mar 14 10:17 katello-backup-2017-03-14T10:17:58+00:00

Expected results:
postgres group should be propagated from top to bottom if we wish to write postgres dumps:
`runuser - postgres -c "pg_dump -Fc foreman > #{@dir}/foreman.dump"`
`runuser - postgres -c "pg_dump -Fc candlepin > #{@dir}/candlepin.dump"
..or - write dumps to temporary directory and then copy

Additional info:

Associated revisions

Revision 0639c3cf (diff)
Added by Christine Fouant about 2 years ago

fixes #19453 - applies postgres group owner to whole backup path

History

#1 Updated by Justin Sherrill about 2 years ago

  • Legacy Backlogs Release (now unused) set to 211

#2 Updated by The Foreman Bot about 2 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello-packaging/pull/445 added

#3 Updated by Justin Sherrill about 2 years ago

  • Legacy Backlogs Release (now unused) changed from 211 to 228

#4 Updated by Christine Fouant about 2 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#5 Updated by Eric Helms about 2 years ago

  • Legacy Backlogs Release (now unused) changed from 228 to 211

#6 Updated by The Foreman Bot about 2 years ago

  • Pull request https://github.com/Katello/katello-packaging/pull/446 added

Also available in: Atom PDF