Affinity relationship

- The Affinity relationship defines that on start of resource A the same node is chosen where resource B is already running, if possible. If other location relationships are inhibiting this, resource A can also run on another node.
The Affinity relationship is very similar to the Collocated relationship. Therefore the Affinity relationship defines a soft location relationship whereas the Collocated relationship is a hard location relationship.
The Affinity relationship can be used together with the Condition attribute.
- Affinity/IfOnline
The relationship A ---> Affinity/IfOnline -----> B means that the location relationship may only be considered when resource B is in a online state. Otherwise the location relationship is ignored. IfOnline does not include states such as Pending Online, and Pending Offline.
- Affinity/IfOffline
The relationship A --->Affinity/IfOffline -----> B means that the location relationship may be only valid when resource B is in an Offline, Failed Offline or Unknown state.
- Affinity/IfNotOnline
The relationship A ---> Affinity/IfNotOnline -----> B means that the location relationship may only be valid, when resource B is not in an online state.
- Affinity/IfNotOffline
The relationship A ---> Affinity/IfNotOffline -----> B means that the location relationship may only be valid, when resource B is not in an Offline, Failed Offline or Unknown state.
- Affinity/IfIWasOnline
The relationship A ---> Affinity/IfIWasOnline -----> B means that the location relationship only takes effect, when resource B is in an Online state and resource A has been online before and then dropped to an offline state.
- Affinity/IfIWasNotOnline
The relationship A ---> Affinity/IfIWasNotOnline -----> B means that the location relationship only takes effect, when resource B is in an Online state and resource A has not been online before.