Providing specific policy configurations

Administrators can define several policies in the policy_config.json configuration file to be in effect for the cluster. LSF evaluates the policies one after another going through the list, so that all policies are valid before any demand or host requests are made. When the scope matches for several policies, each of the policies in effect has an AND relationship.

About this task

The scope of the policies is controlled in the "Consumer" component of the policy. The scope is determined by the values in the rcAccount, templateName and provider names. Refer to policy_config.json for more details.

In the following example, GlobalPolicyA1 applies to the whole cluster. Across all combined rcAccounts, templates and providers since the "all" keyword was used for all parameters of the scope. ProjectPolicyA2 applies only to ProjectB, jobs submitted to “admin” queue, across all combined templates and providers.

Example policies configuration in policy_config.json

{
  "Policies":
  [
    {
      "Name": "GlobalPolicyA1",
      "Consumer":
      {
        "rcAccount": ["all"],
        "templateName": ["all"],
        "provider": ["all"]
      },
      "MaxNumber": “100”,
      "StepValue": "5:20"
     },
{
	    “Name” : “ProjectPolicyA2”,
	    “Consumer”:
		{
		  “rcAccount”: [“ProjectB”],
		  “templateName”: [“all”],
		  “provider”: [“all”]
		},
		“MaxNumber”: “50”,
		“StepValue”: “10:10”
      }
  ]
}