Bug 1741481 - backup to local file using appliance console fails on permissions
Summary: backup to local file using appliance console fails on permissions
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance
Version: 5.11.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: GA
: 5.11.0
Assignee: Brandon Dunne
QA Contact: Jaroslav Henner
Red Hat CloudForms Documentation
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-08-15 09:27 UTC by Jaroslav Henner
Modified: 2019-08-16 14:02 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-16 12:43:03 UTC
Category: Bug
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jaroslav Henner 2019-08-15 09:27:37 UTC
Description of problem:
when trying to do db backup using appliance console, the command fails and there is this in the log:

Caused by:
AwesomeSpawn::CommandResultError: pg_basebackup --no-password -z --format t --wal-method fetch --pgdata - exit code: 1



Version-Release number of selected component (if applicable):
cfme-5.11.0.19-1.el8cf.x86_64


How reproducible:
2/2

Steps to Reproduce:
        interaction.send('ap')
        interaction.answer('Choose the advanced setting: ', '4')
        interaction.answer(resc('Choose the backup output file destination: |1| '), '1')
        interaction.answer(resc('Enter the location to save the backup file to: |/tmp/evm_db.backup| '), database_path)
 
Actual results:
appliance console command fails

Expected results:
backup created fine

Additional info:
echo 'local   replication all           peer map=usermap' >> /var/lib/pgsql/data/pg_hba.conf

fixes the problem

Comment 2 Jaroslav Henner 2019-08-15 09:29:01 UTC
This worked on last 5.10. Surely because there is:

[root@dhcp-8-198-40 ~]# rpm -q cfme
cfme-5.10.8.0-1.el7cf.x86_64

[root@dhcp-8-198-40 ~]# cat /var/opt/rh/rh-postgresql95/lib/pgsql/data/pg_hba.conf
# TYPE  DATABASE    USER  ADDRESS METHOD
local   all         all           peer map=usermap
local   replication all           peer map=usermap
hostssl all         all   all     md5
host    replication all   all     md5

Comment 3 Brandon Dunne 2019-08-15 21:08:59 UTC
I wasn't able to reproduce this on cfme-rhevm-5.11.0.19-1.x86_64.qcow2.  After running the database configuration I see the following and the database backup worked as expected.

[root@localhost vmdb]# cat /var/lib/pgsql/data/pg_hba.conf
# TYPE  DATABASE    USER  ADDRESS METHOD
local   all         all           peer map=usermap
local   replication all           peer map=usermap
hostssl all         all   all     md5
host    replication all   all     md5

Comment 4 Jaroslav Henner 2019-08-16 12:43:03 UTC
It turns out the file was altered by our test suite.


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