Linux-HA Logo

Advanced Resource Management

In VersionOne[1] the definition, placement and relationship between resources was intertwined. It was also centered around independent groups with fixed start/stop orders.

To illustrate the differences, an example VersionOne[1] configuration is listed below. Here each line defines a group. The first group prefers to run on paul and contains an IP address and an Apache WebServer[2], where the IP address is always started before Apache. The second prefers to run on silas and is an IP address and a DNS NameServer[3], where the IP address is started before named and named before dhcpd.

paul   1.2.3.4  apache::/apache1dir/httpd.cf
silas   1.2.3.5  named dhcpd

There are primarily 3 problems with this:

  1. there is no way to specify that you'd like named to start before apache without requiring them to always run on the same node.

  2. it assumes that all resources can run on all nodes. Something that becomes less and less likely as the cluster grows larger.
  3. by tying location and ordering together, we miss the opportunities for parallelism in the startup/recovery sequence. Thus increasing failover time.

By breaking up the definition, placement and inter-resource dependancies administrators can more accurately model their environment. Thus the above configuration would be:

  1. Resource Definition
    1. define resource: 1.2.3.4

    2. define resource: 1.2.3.5

    3. define resource: apache::/apache1dir/httpd.cf

    4. define resource: named

    5. define resource: dhcpd

  2. Resource Placement
    1. named can run anywhere but prefers silas

    2. apache::/apache1dir/httpd.cf} can run anywhere but prefers paul

    3. {1.2.3.4} can run anywhere

    4. {1.2.3.5} can run anywhere

    5. {dhcpd} can run anywhere

  3. Inter-Resource Dependancies (Placement)
    1. Run 1.2.3.4 with apache::/apache1dir/httpd.cf

    2. Run 1.2.3.5 with named

    3. Run dhcpd with named

  4. Inter-Resource Dependancies (Ordering)
    1. Start 1.2.3.4 before apache::/apache1dir/httpd.cf

    2. Start 1.2.3.5 before named

    3. Start dhcpd after named

Thus separated, we can start modifying things. For instance we can recognize that dhcpd doesn't need named to be running and therefore rule 4c is not required.

We could also add a third node called bob that cant run named. In such a case, we would amend 2a to read: named can run anywhere except bob and prefers silas.

A secondary named service may be required which can't run on the same node as the primary. For this we would add:

We may also have a program collecting web stats that can run on anywhere in the cluster (independent of where apache is). We would add:

As you can see, more flexibility comes at the cost of greater configuration complexity.

To alleviate some of this complexity, VersionTwo[4] supports a number of types of resources. Until now we have been dealing with the simplest type called primitives but the complete list is:

Re-expressing the configuration using groups yields a configuration with the best of both worlds.

  1. Resource Definition
    1. define group: group1

      1. define resource: 1.2.3.4

      2. define resource: apache::/apache1dir/httpd.cf

    2. define group: group2

      1. define resource: 1.2.3.5

      2. define resource: named

    3. define resource: dhcpd

  2. Resource Placement
    1. group1 can run anywhere but prefers silas

    2. group2 can run anywhere but prefers paul

    3. dhcpd can run anywhere

  3. Inter-Resource Dependancies (Placement)
    1. Run dhcpd with group2

  4. Inter-Resource Dependancies (Ordering)
    1. Start dhcpd after 1.2.3.4


References

[1]http://www.linux-ha.org/VersionOne
[2]http://www.linux-ha.org/WebServer
[3]http://www.linux-ha.org/NameServer
[4]http://www.linux-ha.org/VersionTwo


This information provided courtesy of the Linux-HA project at http://linux-ha.org/