4.4 Policy Management

Policies are XML-based files that aggregate the resource facts and constraints that are used to control resources.

Policies are used to enforce quotas, job queuing, resource restrictions, permissions, etc. They can be associated with various grid objects (jobs, users, resources, etc.). The policy example below shows a constraint that limits the number of running jobs to a defined value, while exempting certain users from this limit. Jobs started that exceed the limit are queued until the running jobs count decreases and the constraint passes:

<policy>
    <constraint type="start" reason="too busy">
        <or>
            <lt fact="job.instances.active" value="5" />
            <eq fact="user.name" value="canary" />
        </or>
    </constraint>
</policy>

Policies can be based on goals, entitlements, quotas, and other factors, all of which are controlled by jobs.

Figure 4-5 Policy Types and Examples

For more information about policies, see Section 7.7, Working with Facts and Constraints.