5.290 Data Consolidation

At times, plugins can report differing or even contradictory data for nodes, virtual machines, and jobs. This is called a data "collision". The act of resolving these collisions is called "Consolidation." Plugins also have the concept of "precedence," where the plugins with the lowest precedence value are considered more authoritative than the greater precedence values plugins. For example, a plugin with a precedence value of 1 has a higher precedence and is considered more authoritative than a plugin with a precedence value of 5. If no precedence is provided when creating plugins, the plugin is automatically assigned to the lowest precedence, or 1 greater than the highest precedence value. The precedence value may not be less than 1.

When data from one plugin "collides" with another, the data from the highest precedence plugin will be considered the authoritative source for information. If multiple sets of data (reports) are provided by the same plugin, the latest set of data will take precedence. Additionally, MWS supports the concept of treating node and virtual machine data with state information optimistically, pessimistically, or neither. This is configured using the plugins.stateConsolidationPolicy configuration property in the MWS configuration file. If this property is set to optimistic and any plugin reports the state for a node or VM as "Up," the consolidated state will be "Up." Inversely, if the property is set to pessimistic and any plugin reports the state as "Down," the consolidated state will be "Down." If it is set to null (neither), consolidation will occur for the state field just as with any other field, with higher precedence and later reports being considered authoritative.

When MWS is upgraded to a version that supports plugin precedence from an older version, existing plugins will not have the precedence field set. The administrator should assign precedence to each plugin manually through the API (see Modifying Plugins) or through the user interface (see Modifying a Plugin) to ensure that the consolidation will occur as expected. By default, data from a plugin without a precedence defaults to a precedence of 1, or the highest precedence.

Consolidation examples

Suppose two plugins exist, pluginA and pluginB. Plugin "A" has a precedence of 1, and plugin "B" has a precedence of 2, meaning that plugin "A" is more authoritative. These plugins both report data for a node with an ID of node1. However, each reports a different node power state. Plugin "A" reports the power as ON, while plugin "B" reports the power as OFF. The data collision that occurs due to these two contradictory reports is resolved by the precedence of the plugins. Since plugin A has a higher precedence (lower number), it is considered authoritative and the node will be reported as ON.

Now suppose that the plugins also report differing node state for node1. In this case, the node state would depend on the plugins.stateConsolidationPolicy property. The different combinations of report values compared to the state consolidation policy and the final reported state are shown in the table below.

Plugin "A" node state Plugin "B" node state State consolidation policy Consolidated node state
ON OFF null (neither) ON
OFF ON null (neither) OFF
ON OFF optimistic ON
OFF ON optimistic ON
ON OFF pessimistic OFF
OFF ON pessimistic OFF

In general, it is recommended that no two plugins report the same resource or that they report different properties of the same resource. For example, if plugin "A" only modified the power state and plugin "B" only modified the available disk resource, these two plugins would work in harmony to provide a consistent view of the node resource.

For more information, see Reporting State Data and Resource Manager Queries.

Related Topics 

© 2016 Adaptive Computing