Linux-HA Logo

Contents

  1. Node Attributes
  2. Resource Attributes

Node Attributes

Consider the following typical nodes section.

If I have a resource and I want it to only run on nodes 1 and 2, I could write a rule like this:

And if I had another resource I could do the same.

But what if there were many resources like this? And others that could only run on node 3 and 4? And what would happen if c001n05 was added and or replaced c001n01? What if there were dozens of nodes?

Clearly the result is a very hard to maintain cluster. Enter node attributes. What if instead, the nodes section looked like this:

Then our constraints could be re-written as:

Then nodes could be moved between groups, added or removed without requiring updates to the rest of the configuration. One just needs to be sure the node has the right attributes.

Of course cluster_group is a completely made up name and you can use any name you like. You can even have nodes be part of multiple "groups".

Which allows you to write all sort of crazy constraints:

or

Indeed you could even have a process running on each machine (perhaps a ResourceAgent[1] ;) ) that updated any/some/all of these attributes in the CIB as required. Making this easier is likely to be a feature in a future release.

Resource Attributes


References

[1]http://www.linux-ha.org/ResourceAgent


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