Patent ID: 8918490

Claim:
An apparatus for configuring resources in a cluster, comprising: a transceiver for sending and receiving information over a network; at least one processor operable to perform actions comprising: receiving a first declaration of a first dependency relationship between a dependent resource in a first resource group and a dependee resource in a second resource group, wherein the first resource group is a first plurality of resources comprising the dependent resource, wherein the second resource group is a second plurality of resources comprising the dependee resource; determining a candidate node on which to activate the first resource group, wherein the candidate node is specified by a property of the first resource group; satisfying the first dependency relationship for the dependent resource, if an instance of the dependee resource is executing on a second node in the cluster as specified by a locality based qualifier for the first dependency relationship, wherein the second node is not the candidate node, and wherein the first dependency relationship requires that the dependee resource is executing prior to the dependent resource executing; bringing the dependent resource online on the candidate node only when all dependency relationships for the dependent resource are satisfied; detecting, after bringing the dependent resource online on the candidate node and while the dependent resource is executing, a restart of the dependee resource; identifying, in response to the restart, an online restart dependency relationship between the dependent resource and the dependee resource; and triggering, in response to the restart of the dependee resource and while the dependent resource is executing, a restart of the dependent resource as required by the online restart dependency relationship; receiving a second declaration of a second dependency relationship between the second resource group and a third resource group, wherein the second dependency relationship is a strong positive affinity relationship requiring the second resource group and the third resource group to execute on a same node; identifying, after bringing the dependent resource online on the candidate node, a failover of the third resource group from the second node to a third node; relocating, in response to the failover, the second resource group to the third node as required by the strong positive affinity relationship between the second resource group and the third resource group; and performing the restart of the dependee resource based on relocating the second resource group to the third node.