Bug 1540686 - [Regression] Backup/restore failing on appliances using pglogical
Summary: [Regression] Backup/restore failing on appliances using pglogical
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance
Version: 5.9.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.10.0
Assignee: Nick Carboni
QA Contact: luke couzens
URL:
Whiteboard: black:appliance
: 1559451 (view as bug list)
Depends On:
Blocks: 1553903
TreeView+ depends on / blocked
 
Reported: 2018-01-31 18:30 UTC by luke couzens
Modified: 2021-03-17 16:36 UTC (History)
5 users (show)

Fixed In Version: 5.10.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1553903 (view as bug list)
Environment:
Last Closed: 2019-02-11 13:58:40 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description luke couzens 2018-01-31 18:30:01 UTC
Description of problem:Backup/restore failing on appliances using pglogical


Version-Release number of selected component (if applicable):5.9.0.19


How reproducible:100%


Steps to Reproduce:
1.configure appliances
2.setup pglogical replication
3.create backup using pg_dump or webui nfs/smb backups
4.stop evm on global region
5.dropdb
6.createdb
7.try to restore backup through appliance_console

Actual results:
subscriptions still active preventing restore

Expected results:
restore to continue ignoring replicated subscriptions

Additional info:
This bug was raised before and fixed here 1393049

The current problem is due to a fix from another bug for pg_basebackup here 1536227

This change means we check for connections before allowing the restore to start, before this we allowed the pglogical subscription connections to be dropped during the restore processes but this is now not possible.

Comment 7 CFME Bot 2018-02-28 16:26:39 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/898b63d6aa274ef7d472e391329b366d8f057908

commit 898b63d6aa274ef7d472e391329b366d8f057908
Author:     Nick Carboni <ncarboni>
AuthorDate: Fri Feb 2 10:11:30 2018 -0500
Commit:     Nick Carboni <ncarboni>
CommitDate: Mon Feb 12 14:20:45 2018 -0500

    Check for restore error cases in EvmDatabaseOps
    
    This allows us to do more of the processing using existing code
    rather than the current implementation which does the checks in
    different places/repos and does a lot of shelling out to psql
    rather than using a real database connection.
    
    This also makes the error cases more explicit which fixes an issue
    where a user could not restore a pg_dump backup when pglogical was
    running.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1540686

 lib/evm_database_ops.rb | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

Comment 8 CFME Bot 2018-02-28 16:28:47 UTC
New commit detected on ManageIQ/manageiq-gems-pending/master:
https://github.com/ManageIQ/manageiq-gems-pending/commit/d8c0f087105ac5a271f1813029e36f2e97758ba9

commit d8c0f087105ac5a271f1813029e36f2e97758ba9
Author:     Nick Carboni <ncarboni>
AuthorDate: Thu Feb 1 18:03:20 2018 -0500
Commit:     Nick Carboni <ncarboni>
CommitDate: Thu Feb 1 18:03:20 2018 -0500

    Dont mess with pglogical from PostgresAdmin
    
    We will handle this in the main app rake task before we even get
    to this class to do the restore.
    
    This will be cleaner as we can use all the tooling we have built
    up around the extension there rather than shelling out to psql
    from here
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1540686

 lib/gems/pending/util/postgres_admin.rb | 32 --------------------------------
 1 file changed, 32 deletions(-)

Comment 9 CFME Bot 2018-02-28 16:40:37 UTC
New commit detected on ManageIQ/manageiq-appliance_console/master:
https://github.com/ManageIQ/manageiq-appliance_console/commit/c7a06452334d3d476ef57a7c811d1909e23ad261

commit c7a06452334d3d476ef57a7c811d1909e23ad261
Author:     Nick Carboni <ncarboni>
AuthorDate: Thu Feb 1 18:01:39 2018 -0500
Commit:     Nick Carboni <ncarboni>
CommitDate: Thu Feb 1 18:01:39 2018 -0500

    Remove database restore connection checking
    
    This is going to be done in the app rake task code
    before the restore gets run.
    
    This allows us to use the AR model we have around pg_stat_activity
    to check the connections rather than shelling out to a rake task
    from here
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1540686

 bin/appliance_console | 8 --------
 1 file changed, 8 deletions(-)

Comment 10 Nick Carboni 2018-02-28 18:34:36 UTC
This is just waiting on a new version of the console to be released. Then the changes will be complete when we can update the version we use on the appliance.

Comment 12 CFME Bot 2018-03-09 19:51:52 UTC
New commit detected on ManageIQ/manageiq-appliance/master:

https://github.com/ManageIQ/manageiq-appliance/commit/12569df44a11cca89d177a45b91d8b71491b2e3d
commit 12569df44a11cca89d177a45b91d8b71491b2e3d
Author:     Nick Carboni <ncarboni>
AuthorDate: Fri Mar  9 14:32:28 2018 -0500
Commit:     Nick Carboni <ncarboni>
CommitDate: Fri Mar  9 14:32:28 2018 -0500

    Use version 2 of appliance console

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1540686

 manageiq-appliance-dependencies.rb | 4 +-
 1 file changed, 2 insertions(+), 2 deletions(-)

Comment 14 luke couzens 2018-06-20 10:47:43 UTC
Verified in 5.10

Comment 15 luke couzens 2018-08-06 09:31:28 UTC
*** Bug 1559451 has been marked as a duplicate of this bug. ***

Comment 16 CFME Bot 2021-03-17 16:36:26 UTC
New commit detected on ManageIQ/manageiq-appliance_console/master:

https://github.com/ManageIQ/manageiq-appliance_console/commit/6bedfebbe83aa6c114d434619bbf38c707d29822
commit 6bedfebbe83aa6c114d434619bbf38c707d29822
Author:     Nick Carboni <ncarboni>
AuthorDate: Thu Feb  1 23:03:20 2018 +0000
Commit:     Nick LaMuro <nicklamuro>
CommitDate: Tue Mar 16 19:25:16 2021 +0000

    Dont mess with pglogical from PostgresAdmin

    We will handle this in the main app rake task before we even get
    to this class to do the restore.

    This will be cleaner as we can use all the tooling we have built
    up around the extension there rather than shelling out to psql
    from here

    https://bugzilla.redhat.com/show_bug.cgi?id=1540686


    (transferred from ManageIQ/manageiq-gems-pending@d8c0f087105ac5a271f1813029e36f2e97758ba9)
 lib/manageiq/appliance_console/postgres_admin.rb | 32 -
 1 file changed, 32 deletions(-)


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