Hi,
mich würde grundsätzlich mal interessieren ob das was ich vorhabe, mit pacemaker umsetzbar ist. Virtuelle IP funktioniert für mich schon mal, ist soweit auch kein Hexenwerk.
Was ich jetzt allerdings vorhabe, zum einen simpel checken ob ein Serivce läuft und falls nicht die VIP auf die Node verschieben, auf der der Service läuft. Zum anderen alle n Sekunden ein Script ausführen und solange es exit 0 liefert ist alles OK und vIP verbleibt auf dem Host, im Fehlerfall wird die VIP auf Host2 verschoben.
Was auch nicht so ganz will sind constraints. Hier mal am Beispiel MySQL
1 | pcs constraint colocation add ip_mysql p_mysql role=Started |
Liefert immer nur folgende Ausgabe:
Usage: pcs constraint [constraints]... colocation add [<role>] <source resource id> with [<role>] <target resource id> [score] [options] [id=constraint-id] Request <source resource> to run on the same node where pacemaker has determined <target resource> should run. Positive values of score mean the resources should be run on the same node, negative values mean the resources should not be run on the same node. Specifying 'INFINITY' (or '-INFINITY') for the score forces <source resource> to run (or not run) with <target resource> (score defaults to "INFINITY"). A role can be: 'Master', 'Slave', 'Started', 'Stopped' (if no role is specified, it defaults to 'Started').
Nach meinem Verständnis hätte das ja die VIP in Abhängigkeit zum MySQL Service bringen sollen. Generell interessiert mich dann noch, wie man eine IP immer auf den Host legt, der Service X aktiv am laufen hat.
Danke schon mal.