Bug 1498452 - after removing a zone, messages related to the zone linger in the database
Summary: after removing a zone, messages related to the zone linger in the database
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance
Version: 5.8.0
Hardware: All
OS: All
high
low
Target Milestone: GA
: 5.10.0
Assignee: Brandon Dunne
QA Contact: Tasos Papaioannou
URL:
Whiteboard:
Depends On:
Blocks: 1572700 1608844 1608849
TreeView+ depends on / blocked
 
Reported: 2017-10-04 11:25 UTC by Felix Dewaleyne
Modified: 2021-06-10 13:11 UTC (History)
11 users (show)

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


Attachments (Terms of Use)

Description Felix Dewaleyne 2017-10-04 11:25:13 UTC
Description of problem:
after removing a zone, messages related to the zone linger in the database

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

How reproducible:
waiting for steps 

Steps to Reproduce:
1.
2.
3.

Actual results:
# grep 'count for state=\["ready"\]' log/evm.log | tail -n1
[----] I, [2017-10-04T13:47:23.728614 #28145:8f3130]  INFO -- : Q-task_id([log_status]) MIQ(MiqServer.log_system_status) [EVM Server (25471)] MiqQueue count for state=["ready"] by zone and role: {"OLDZONE"=>{nil=>2, "smartstate"=>1}, "default"=>{nil=>5, "ems_inventory"=>1, "smartstate"=>1, "ems_metrics_processor"=>133}}
[root@srv-os-cfme08 vmdb]#

Expected results:
the messages are deleted as part of the removal of the zone

Additional info:
- waiting for additional information on how the zone and its contents were removed. 
- we need also a cleanup step.

Comment 2 Felix Dewaleyne 2017-10-06 08:45:53 UTC
Steps to reproduce from the customer :

1. From ABC provider settings I set zone to "default".
2. From app02 appliance (automation, event, provider operation, provider inventory roles) settings I set zone to "default"
3. From zone ABC settings I removed zone.

note : don't know yet if a provider was in the zone ABC prior to removal but it is likely

Comment 3 Felix Dewaleyne 2017-10-06 13:48:28 UTC
customer did confirm a provider was in the zone ABC and moved to the default zone as well before deletion.

Comment 4 Chris Arcand 2017-10-18 14:18:56 UTC
I'm confused - it looks like you're just grepping the log, which would have messages related to the zone from before you deleted it still present. Logs aren't (and shouldn't be) retrospectively updated.

Comment 5 Chris Arcand 2017-10-18 14:21:25 UTC
(In reply to Chris Arcand from comment #4)
> I'm confused - it looks like you're just grepping the log, which would have
> messages related to the zone from before you deleted it still present. Logs
> aren't (and shouldn't be) retrospectively updated.

Ahh nevermind, I see it's referring to a queue count referencing that zone.

Comment 11 CFME Bot 2018-05-04 16:22:13 UTC
New commit detected on ManageIQ/manageiq/master:

https://github.com/ManageIQ/manageiq/commit/09789ceb5a8a56ff12e9062775e01e0ff66347b2
commit 09789ceb5a8a56ff12e9062775e01e0ff66347b2
Author:     Brandon Dunne <brandondunne>
AuthorDate: Tue May  1 17:05:45 2018 -0400
Commit:     Brandon Dunne <brandondunne>
CommitDate: Tue May  1 17:05:45 2018 -0400

    Clean up queued items on Zone#destroy

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

 app/models/zone.rb | 1 +
 spec/models/zone_spec.rb | 8 +
 2 files changed, 9 insertions(+)

Comment 12 Tasos Papaioannou 2018-07-11 15:22:39 UTC
Verified on 5.10.0.3.


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