Bug 1552231 - Appliances Missing from Global Region are showing a Zone ID of a Local Region
Summary: Appliances Missing from Global Region are showing a Zone ID of a Local Region
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance
Version: 5.6.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.10.0
Assignee: Gregg Tanzillo
QA Contact: Tasos Papaioannou
URL:
Whiteboard:
Depends On:
Blocks: 1566568
TreeView+ depends on / blocked
 
Reported: 2018-03-06 18:38 UTC by myoder
Modified: 2021-12-10 15:45 UTC (History)
6 users (show)

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


Attachments (Terms of Use)

Comment 3 Gregg Tanzillo 2018-03-07 14:20:47 UTC
I was able to access the global Db loaded on the appliance at 10.13.145.99 

vmdb_production=# select id, zone_id, vm_id, name from miq_servers;
       id        |     zone_id     |      vm_id      |      name      
-----------------+-----------------+-----------------+----------------
 702000000000007 | 702000000000013 |                 | itmcf4rlezwk01
 999000000000012 | 999000000000051 | 702000000000983 | itmcf4gcn07
 509000000000004 | 509000000000078 |                 | itmcfrqawk02
 509000000000009 | 509000000000081 |                 | itmcfrqsswk01
 509000000000006 | 509000000000080 |                 | itmcfrqewk01
 702000000000002 | 702000000000003 | 702000000000029 | itmcfrlui01
 509000000000003 | 509000000000077 |                 | itmcfrqawk01
 702000000000004 | 702000000000007 | 702000000000442 | itmcfrqfwk01
 509000000000012 | 509000000000086 |                 | itmcf4rqezwk01
 509000000000005 | 509000000000005 |                 | itmcfrqcwk01
 702000000000005 | 702000000000012 | 702000000000649 | itmcfrlsswk01
 702000000000003 | 702000000000005 | 702000000000452 | itmcfrlawk01
 509000000000002 | 509000000000003 |                 | itmcfrqui01
 999000000000008 | 999000000000052 | 702000000000661 | itmcfgcn04
 999000000000011 | 999000000000050 | 702000000000980 | itmcf4gcn06
 999000000000002 | 999000000000002 | 702000000000133 | itmcfgui01
 999000000000003 | 999000000000002 | 702000000000023 | itmcfgui02
 999000000000005 | 509000000000080 | 702000000000638 | itmcfgcn01
 509000000000007 | 509000000000003 |                 | itmcfrqui02
 999000000000007 | 509000000000081 | 702000000000660 | itmcfgcn02
 999000000000010 | 999000000000049 | 702000000000648 | itmcfgcn05
 999000000000013 | 509000000000077 |                 | EVM
(22 rows)

You can see that there are appliances (3 of them) in the 999 region that reference a zone in regions 509 and 702. There are also references to vms in those other regions. I don't know how this could have happened. Replication should never update rows with ids in the global region.

Also, for some reason, I was not able to access the configuration page from the Ui on the global appliance. It seems that the option is missing. That does not seem related to this problem but I can't rule it out. 

Yoder - can you ask the customer if they are able to access the configuration through the Ui in the global region?

I'm not sue we'll be able to determine the cause of this. Absent of that, I can provide some console commands to fix the affected server rows in the global region. Let me know if that is the direction you want to go.

Comment 7 CFME Bot 2018-03-08 19:36:13 UTC
New commit detected on ManageIQ/manageiq/master:

https://github.com/ManageIQ/manageiq/commit/be2a49a03888f94848a1537a7508be94c2a84f2e
commit be2a49a03888f94848a1537a7508be94c2a84f2e
Author:     Gregg Tanzillo <gtanzill>
AuthorDate: Wed Mar  7 15:53:14 2018 -0500
Commit:     Gregg Tanzillo <gtanzill>
CommitDate: Wed Mar  7 15:53:14 2018 -0500

    Scope the default zone to the current region

    This addresses the case where a new server is added to a DB containing multiple regions and the default
    zone from a remote region is assigned

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

 app/models/zone.rb | 2 +-
 spec/models/zone_spec.rb | 10 +
 2 files changed, 11 insertions(+), 1 deletion(-)

Comment 13 Tasos Papaioannou 2018-06-27 18:36:33 UTC
Verified on 5.10.0.2.


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