Red Hat Bugzilla – Bug 1295574
Cloud or Infarstructure provider replicated from another region won't be deleted after that region's vmdb crash
Last modified: 2018-01-19 16:29:47 EST
Title: Cloud or Infrastructure provider replicated from a non master zone won't be deleted after the crash of that zone.
Describe the issue:
In a multi-regions environment (minimum 2 evm appliances), when you activate database replication from one region (let's say region 1) to the master region (let's say region 99) you'll see all info from region 1 appearing in region 99.
If region 1 (especially the vmdb) crashes and you don't rebuild it the same way (I guess), same IP, same fqdn for example, you won't be able to delete the provider(s) from crashed region unless you have a working appliance in that region. If you want do delete it from inside Region 99, this message will popup:
"The selected Provider is not in the current region".
Also there is no indicator that region 1 is not available anymore. Region 99 still thinks region 1 is
Suggestions for improvement:
1/ One should be able to force-delete a provider from a crashed region. If it's too dangerous (because you could crash a working environment), document a procedure to delete it properly and manually from the master VMDB.
2/ The Master VMDB should know the state of the other DBs synchronized on it.
-- Title: Cloud or Infrastructure provider replicated from a non master zone won't be deleted after the crash of that zone.
++ Title: Cloud or Infarstructure provider replicated from another region won't be deleted after that region's vmdb crash
This will add a rake task that can be run to remove a selected region's data from a local database.
It can be run as `rake evm:dbsync:destroy_local_region <region_number>`
It will also refuse to destroy the region of the database it is currently running on.
New commit detected on ManageIQ/manageiq/master:
Author: Nick Carboni <email@example.com>
AuthorDate: Mon Feb 29 11:39:00 2016 -0500
Commit: Nick Carboni <firstname.lastname@example.org>
CommitDate: Mon Feb 29 11:39:00 2016 -0500
Create a task which will remove another region's data from the local database
If a user has replication configured and removes a regional database,
that region's data will be "stuck" in the master database.
The new task evm:dbsync:destroy_local_region takes a region number and
uses the same logic as destroy_remote_region to remove the data, but locally.
app/models/miq_region.rb | 16 ++++++++++++++++
app/models/miq_region_remote.rb | 16 +---------------
lib/tasks/evm_dbsync.rake | 15 +++++++++++++++
3 files changed, 32 insertions(+), 15 deletions(-)
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.