EFFECTUATE STATE CHANGE IN A HIERARCHY OF RESOURCES IN AN SDDC
Some embodiments provide a hierarchical data service (HDS) that manages many resource clusters that are in a resource cluster hierarchy. In some embodiments, each resource cluster has its own cluster manager, and the cluster managers are in a cluster manager hierarchy that mimics the hierarchy of the resource clusters. In some embodiments, both the resource cluster hierarchy and the cluster manager hierarchy are tree structures, e.g., a directed acyclic graph (DAG) structure that has one root node with multiple other nodes in a hierarchy, with each other node having only one parent node and one or more possible child nodes.
1 . A method of managing resources arranged in a hierarchy in at least one datacenter, the method comprising:
for a particular resource cluster:
receiving request to collect state from progeny clusters regarding a particular set of criteria associated with the resources;
distributing the request to a plurality of child clusters to distribute among the progeny clusters of the child clusters;
receiving state data responsive to the request distributed to child clusters; and
providing a subset of the state data to an ancestor cluster to analyze in order (i) to identify a state change to implement at a particular set of one or more resources in the hierarchy and (ii) to provide a command to effectuate the state change.
2 . The method of claim 1 further comprising:
for a particular resource cluster:
receiving the command to effectuate the state change; and
forwarding the command to a particular progeny cluster that has to process the command to effectuate the state change.
3 . The method of claim 2 , wherein forwarding the command comprises forwarding the command to a child resource cluster of the particular resource cluster for the child resource cluster to forward to the particular progeny resource cluster.
4 . The method of claim 1 further comprising:
for the particular resource cluster:
receiving the command to process for the particular resource cluster; and
processing the command to effectuate the state change at the particular resource cluster.
5 . The method of claim 1 , wherein providing the subset of the state data comprises
waiting a period of time to receive a plurality of sets of state data from a plurality of progeny clusters in response to the distributed request; and
selecting the subset of the state data from the received plurality of sets of state data.
6 . The method of claim 5 , wherein selecting the subset of the state data comprises selecting the subset of the state data that best matches a set of criteria provided with the request.
7 . The method of claim 5 , wherein selecting the subset of the state data comprises selecting the subset of the state data that represents a better set of values than other sets of state data provided in response to the request.
8 . The method of claim 7 further comprising
comparing each particular responsive set of state data with other responsive sets of state data to determine whether the particular responsive set of state data represents a better set of values than the other responsive sets of state data; and
selecting, as the subset of state values, a group of N responsive set of state data that represents the N best set of values, where N is an integer equal to 1 or greater.
9 . The method of claim 1 , wherein providing the subset of the state data comprises providing the first received set of state data that meets a criteria provided with the request.
10 . The method of claim 1 , wherein said receiving, distributing and providing operations are performed by a particular manager of the particular resource cluster, said particular manager communicating with managers of child resource clusters of the particular resource cluster and at least one parent manager of a parent resource cluster of the particular resource cluster, said managers arranged in a manager hierarchy.
11 . A non-transitory machine readable medium storing a program for a particular manager of a particular resource cluster, the particular manage part of a hierarchical management system for managing resources arranged in a hierarchy in at least one datacenter, the program comprising sets of instructions for:
receiving request to collect state from progeny clusters regarding a particular set of criteria associated with the resources;
distributing the request to a plurality of child clusters to distribute among the progeny clusters of the child clusters;
receiving state data responsive to the request distributed to child clusters; and
providing a subset of the state data to an ancestor cluster to analyze in order (i) to identify a state change to implement at a particular set of one or more resources in the hierarchy and (ii) to provide a command to effectuate the state change.
12 . The non-transitory machine readable medium of claim 11 , wherein the program further comprises a set of instructions for:
receiving the command to effectuate the state change; and
forwarding the command to a particular progeny cluster that has to process the command to effectuate the state change.
13 . The non-transitory machine readable medium of claim 12 , wherein the set of instructions for forwarding the command comprises a set of instructions for forwarding the command to a child resource cluster of the particular resource cluster for the child resource cluster to forward to the particular progeny resource cluster.
14 . The non-transitory machine readable medium of claim 11 , wherein the program further comprises a set of instructions for:
receiving the command to process for the particular resource cluster; and
processing the command to effectuate the state change at the particular resource cluster.
15 . The non-transitory machine readable medium of claim 11 , wherein the set of instructions for providing the subset of the state data comprises sets of instructions for
waiting a period of time to receive a plurality of sets of state data from a plurality of progeny clusters in response to the distributed request; and
selecting the subset of the state data from the received plurality of sets of state data.
16 . The non-transitory machine readable medium of claim 15 , wherein the set of instructions for selecting the subset of the state data comprises a set of instructions for selecting the subset of the state data that best matches a set of criteria provided with the request.
17 . The non-transitory machine readable medium of claim 15 , wherein the set of instructions for selecting the subset of the state data comprises a set of instructions for selecting the subset of the state data that represents a better set of values than other sets of state data provided in response to the request.
18 . The non-transitory machine readable medium of claim 17 , wherein the program further comprises sets of instructions for
comparing each particular responsive set of state data with other responsive sets of state data to determine whether the particular responsive set of state data represents a better set of values than the other responsive sets of state data; and
selecting, as the subset of state values, a group of N responsive set of state data that represents the N best set of values, where N is an integer equal to 1 or greater.
19 . The non-transitory machine readable medium of claim 11 , wherein the set of instructions for providing the subset of the state data comprises a set of instructions for providing the first received set of state data that meets a criteria provided with the request.
20 . The non-transitory machine readable medium of claim 11 , wherein said particular manager communicating with managers of child resource clusters of the particular resource cluster and at least one parent manager of a parent resource cluster of the particular resource cluster, said managers arranged in a manager hierarchy.
21 . The non-transitory machine readable medium of claim 20 , wherein said managers are machines executing on the datacenter, said machines being one of containers, Pods, virtual machines and standalone computers.