Bug 972816

Summary: Deleted systems should be reported differently
Product: [Retired] Subscription Asset Manager Reporter: Vitaly Kuznetsov <vkuznets>
Component: SpliceAssignee: Splice Developers <splice-devel>
Status: CLOSED ERRATA QA Contact: mkovacik
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.3CC: cduryee, whayutin
Target Milestone: rc   
Target Release: 1.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-10-01 10:55:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 833466    

Description Vitaly Kuznetsov 2013-06-10 15:45:07 UTC
Description of problem:
Now the splice database contains a copy of all system checkins. When a system is deleted in spacewalk, the checkins remain in splice and will still be visible in all inactive reports. 
The best solution is to have a single report (instead of having Active/Inactive pair) with the following flags:

1) Active - system was active during the given time period.
2) Inactive - the system was inactive (== no checkins happened) during the given time period _AND_ it wasn't removed.
3) Deleted - the system was inactive (==no checkins happened) during the given time period _AND_ it was removed.

Comment 1 Chris Duryee 2013-06-10 15:48:36 UTC
I think #3 should be just "it was removed". It is possible for a system to have a checkin and be removed, if the removal happened soon after the last checkin.

Comment 2 wes hayutin 2013-06-11 03:02:56 UTC
Agreed.. a system can go from active directly to deleted.

Comment 3 Chris Duryee 2013-06-19 17:35:47 UTC
There are a few components that need changes to support this, but the new deleted_consumer candlepin API will be in 0.8.14 (cace30f)

Comment 4 Chris Duryee 2013-07-23 18:45:16 UTC
These versions should have the changes needed:

splice-server fe9ffc4 (0.138)
katello e5d1bd21
katello-cli 5fb67867
candlepin 97fd00f (0.8.18)
spacewalk-splice-tool 4dcb0bab1 (0.34)
splice-reports 5e550fe (0.0.5-36)

marking as modified

Comment 5 Bryan Kearney 2013-08-02 18:51:46 UTC
SNAP0 contains these bug fixes. Moving to ON_QA.

Comment 7 Vitaly Kuznetsov 2013-08-21 13:25:27 UTC
Verified with:
ruby193-rubygem-splice_reports-0.0.5-40
katello-headpin-all-1.4.3-8.el6sam_splice
katello-cli-1.4.3-7.el6sat
candlepin-0.8.20-1.el6sam
spacewalk-splice-tool-0.39-1.el6sam
splice-0.142-1.el6sam

Comment 9 errata-xmlrpc 2013-10-01 10:55:21 UTC
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.

http://rhn.redhat.com/errata/RHEA-2013-1390.html