Bug 972711

Summary: Data migrator allows to migrate data for wrong resources
Product: [Other] RHQ Project Reporter: Heiko W. Rupp <hrupp>
Component: MonitoringAssignee: Nobody <nobody>
Status: NEW --- QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.8CC: hrupp
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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:

Description Heiko W. Rupp 2013-06-10 12:54:41 UTC
I have a 4.7 server setup and then updated to 4.8.

Then I've removed the platform and re-imported it, so that
the old resources are gone.

Now when I run the migrator, this just adds all the old metric to C*

Where I see a potential issue is that e.g. the 4.7 DB has a resource id
range of 10000-10100 and the new import has a range from 10200-10300

Now the migrator adds data for 10000-10100 for which no schedule exists anymore,
which may fill the database and put load on the system for nothing.

Situation gets worse if the data to be migrated e.g is from yet another RHQ server that has resources in the id-range of 10000-10250, where now the new
schedule ids 10200-10250 get metric values added that do not belong to this new
resource, but to a different one - here the user will get bogus results.

The data migrator should perhaps try to validate the schedule ids and abort if the target install does not have the provided ids.