Configuring a disambiguation rule to handle multiple placement advisors
If multiple placement providers are registered as targets, you can configure the disambiguation rules that identify the placement provider that handles the call. You can use platform-specific or provider-specific data used in PlacementAdvice
calls to determine the placement provider. The provider Registry returns the GUID of the provider and the call is dispatched to that provider.
In BMC Cloud Lifecycle Management, multiple placement providers support the same operation. When multiple Placement Providers are registered and they provide PlacementAdvice
operation for the same objects, BMC Cloud Lifecycle Management is not able to forward the request as multiple Placement Providers support the requested PlacementAdvice
operation.
Multiple Placement Providers are present in CLM setups which has a heterogeneous infrastructure. During provisioning, depending on the type of target infrastructure (or certain disambiguation criteria), the requested Placement Advice operation is handled by a specific Placement Provider.
Disambiguation Engine uses disambiguation-rules as criteria for selecting between multiple providers. Disambiguation rules are configured in advice-provider-mapping.json.
Before you begin
To trigger Placement Advice Disambiguation,ensure that the following conditions are met:
- The Placement Advice requested is provided by two Providers (Provider Instances) that are registered with BMC Cloud Lifecycle Management.
- The related 'PeerHint' property is set to false in the providers.json file. This ensures that placement advice calls are not handled by the Resource Manager.
Configuring a disambiguation rule
The following example shows how to configure the disambiguation rule.
[{
"cloudClass": "com.bmc.cloud.model.beans.ComputePoolPlacementAdvice",
"operation": "create",
"ruleId": "9c778b7e-2aca-4cc9-b15d-7ce92f590fa5",
"paramCompareOperator": "EQUALS",
"csmRequestParameterName": "installableResource",
"csmRequestParameterClass": "com.bmc.cloud.model.beans.InstallableResource",
"compareParameterName": "categorizationTier3",
"compareParameterClass": "java.lang.String",
"paramValueToProviderDefMapping": [{
"value": "BladeLogic",
"providerDefinition": "13a7582e-2143-4add-80dc-dfd08647c266"
},
{
"value": "CiscoHCS",
"providerDefinition": "446e0b35-b987-4a93-8605-63c3b3f2b986"
}]
}]
Review the following parameters and descriptions:
Parameter | Description |
---|---|
cloudClass | Fully qualified name of the Placement Advice class for which the disambiguation rules are configured For example: "com.bmc.cloud.model.beans.ComputePoolPlacementAdvice" The following classes are supported: |
operation | Name of the operation which is executed on the Placement Advice class. Only the create operation is currently supported. |
ruleID | Unique guid assigned to this disambiguation rule. Currently, this parameter is for representation purposes only and has no internal usage. |
paramCompareOperator | Operator used for rule evaluation (comparison of values):
|
csmRequestParameterName | Name of the parameter object in the csmRequest. This property will be used in the disambiguation rule. |
csmRequestParameterClass | The class of the parameter in the CSM request, property of which will be used for disambiguation. |
compareParameterName | Name of the property of the object in the csmRequest referred to by csmRequestParameterName |
compareParameterClass | The class of property or attribute in the requestParameter, which is used for disambiguation. Currently, the following types are supported:
Class of the property of the object in the csmRequest referred to by csmRequestParameterName. This class information helps invoke the right comparison operation on the property used for comparison. |
paramValueToProviderDefMapping | List of mapping entries. Each mapping includes the following properties:
|
Notes
- Click advice-provider-mapping.json for a sample configuration file that shows how to register two providers that support the same placement advice.
- For any placement advice call, you can configure only one disambiguation rule.
- Each disambiguation rule can have multiple mappings, once an expression evaluates to true and the target provider-definition is identified; remaining expressions are not evaluated (first match is returned).
- Provider disambiguation is triggered only if multiple providers are registered which provide the same provided-operation and the associated ‘PeerHint’ attribute with the placement advice is set to ‘false’ in the providers.json file.
- If the placement advice is not handled by Resource Management (RM) provider, you should set either or both of the following PeerHint properties to false in the providers.json file.
UsePeerHintForVCVRPVHPlacement
– For Virtual Cluster, Virtual Resource Pool, or Virtual HostUsePeerHintForVDSPlacement
– For Virtual Datastore
- If invalid provider-definitions are configured in the advice-provider-mapping.json file, no validation is performed. Disambiguation, if it is triggered, resolves to null.
- If there is no provider-instance registered for provider-definition configured in the advice-provider-mapping.json file, no validation is performed. If disambiguation is triggered, it resolves to null.
- No semantic validation is performed for entries in the advice-provider-mapping.json file. If entries have incorrect values or datatypes, the related errors occur during rule evaluation .
- If no advice-provider-mapping.json file is present and the conditions for triggering disambiguation are met, disambiguation resolves to the null provider with an error. The missing .json file does not stop disambiguation flow.
Comments
Log in or register to comment.