Bug 749126
Summary: | [config-sync] Plugin validation too restrictive | ||
---|---|---|---|
Product: | [Other] RHQ Project | Reporter: | Lukas Krejci <lkrejci> |
Component: | Core Server | Assignee: | Lukas Krejci <lkrejci> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Mike Foley <mfoley> |
Severity: | medium | Docs Contact: | |
Priority: | high | ||
Version: | 4.2 | CC: | ccrouch, hrupp, loleary |
Target Milestone: | --- | ||
Target Release: | RHQ 4.4.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-09-01 10:07:28 UTC | Type: | --- |
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: | 745494 |
Description
Lukas Krejci
2011-10-26 09:34:07 UTC
release_jon3.x: 7fbb3fcdadbec68b5fe1dc4b1fec66954fce9c88 master: f3f7a0535ce7f62bd1c0ddd85bd1d24a835fc446 [BZ 749126] - Loosening validation requirements on import. This commit is quite big due to the refactoring but does only a couple of simple things: 1) The SynchronizationManagerRemote.importAllSubsystems now returns an ImportReport which contains the notes from subsystem importers about "interesting" events during the import. This is used to report warnings or other info to the caller of the import. Namely the MetricTemplateImporter now reports all the metric templates from the export file that were not present in the target database (which basically means that source and target RHQ install had different plugins installed). 2) Import is lenient about unknown validator classes (this is to not choke on "old" import files that still may be perfectly valid). 3) The former ConsistencyValidator has been split into 2 separate concepts: ConsistencyValidator - persists its config into the export file, checks the consistency of the target RHQ install as a whole. EntityValidator - configured by the importer, does NOT persist anything into the export file, used to validate individual entities in the export file before the import begins. 4) Some new unit tests and a couple of simple changes in the code to support better testability. 5) DeployedAgentPluginsValidator was "decommissioned" but left in the codebase as an example implementation. Some more notes: As mentioned in the commit message, the remote API changed and the SynchronizationManager.importAllSubsystems() method now returns an ImportReport instance which contains a map of import notes per importer. The metric template importer fills this report with all the metric templates it found in the export file that don't exist in the database during the import. These metric templates can't be imported because there is no resource type in the target RHQ install that would declare them. Also with this fix, the export file no longer contains ANY "validator" elements because all the validations are done on the individual entity level. There are a couple of validation checks: * System Settings: 1) at most 1 entity present in the export file 2) SystemManagerRemote.validateSystemConfiguration() passes with the data from the export file * Metric Templates: 1) no duplicate entries present in the export file (i.e. no two metricTemplate elements in the export file that would have the same plugin, resource type and metric template name). Reset target for RHQ project. Bulk closing of items that are on_qa and in old RHQ releases, which are out for a long time and where the issue has not been re-opened since. |