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.
https://github.com/ManageIQ/manageiq/pull/16942
https://github.com/ManageIQ/manageiq-gems-pending/pull/336
https://github.com/ManageIQ/manageiq-appliance_console/pull/31
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(+)
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(-)
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(-)
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.
https://github.com/ManageIQ/manageiq-appliance/pull/183
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(-)
Verified in 5.10
*** Bug 1559451 has been marked as a duplicate of this bug. ***
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(-)