ich habe auf zwei Virtualbox-Instanzen ein Pacemaker-Cluster (Debian-Wheezy) installiert und einen Apache2.
Code: Alles auswählen
elwood:~ $ crm status
============
Last updated: Mon Feb 8 10:18:42 2016
Last change: Mon Feb 8 10:16:46 2016 via crm_attribute on elwood
Stack: openais
Current DC: jake - partition with quorum
Version: 1.1.7-ee0730e13d124c3d58f00016c3376a1de5323cff
2 Nodes configured, 2 expected votes
2 Resources configured.
============
Online: [ elwood jake ]
Service_IP (ocf::heartbeat:IPaddr2): Started elwood
apache2 (ocf::heartbeat:apache): Started elwood
Failed actions:
apache2_monitor_20000 (node=jake, call=7, rc=7, status=complete): not running
Dann stoppe ich jake:
Code: Alles auswählen
crm_standby -U jake -v true
Code: Alles auswählen
elwood:~ $ crm status
============
Last updated: Mon Feb 8 10:24:42 2016
Last change: Mon Feb 8 10:24:10 2016 via crm_attribute on elwood
Stack: openais
Current DC: jake - partition with quorum
Version: 1.1.7-ee0730e13d124c3d58f00016c3376a1de5323cff
2 Nodes configured, 2 expected votes
2 Resources configured.
============
Node jake: standby
Online: [ elwood ]
Service_IP (ocf::heartbeat:IPaddr2): Started elwood
apache2 (ocf::heartbeat:apache): Started elwood
Failed actions:
apache2_monitor_20000 (node=jake, call=7, rc=7, status=complete): not running
Jetzt mache jake wieder verfügbar:
Code: Alles auswählen
elwood:~ $ crm_standby -U jake -v false
elwood:~ $ crm status
============
Last updated: Mon Feb 8 10:26:21 2016
Last change: Mon Feb 8 10:24:10 2016 via crm_attribute on elwood
Stack: openais
Current DC: jake - partition with quorum
Version: 1.1.7-ee0730e13d124c3d58f00016c3376a1de5323cff
2 Nodes configured, 2 expected votes
2 Resources configured.
============
Online: [ elwood jake ]
Service_IP (ocf::heartbeat:IPaddr2): Started elwood
apache2 (ocf::heartbeat:apache): Started elwood
Failed actions:
apache2_monitor_20000 (node=jake, call=7, rc=7, status=complete): not running
Jetzt das ganze mit elwood, der ausfällt:
Code: Alles auswählen
elwood:~ $ crm_standby -U elwood -v true
elwood:~ $ crm status
============
Last updated: Mon Feb 8 10:28:14 2016
Last change: Mon Feb 8 10:28:10 2016 via crm_attribute on elwood
Stack: openais
Current DC: jake - partition with quorum
Version: 1.1.7-ee0730e13d124c3d58f00016c3376a1de5323cff
2 Nodes configured, 2 expected votes
2 Resources configured.
============
Node elwood: standby
Online: [ jake ]
Service_IP (ocf::heartbeat:IPaddr2): Started jake
apache2 (ocf::heartbeat:apache): Started jake
Failed actions:
apache2_monitor_20000 (node=jake, call=7, rc=7, status=complete): not running
Ich setze elwood wieder online:
Code: Alles auswählen
elwood:~ $ crm_standby -U elwood -v false
elwood:~ $ crm status
============
Last updated: Mon Feb 8 10:32:33 2016
Last change: Mon Feb 8 10:32:30 2016 via crm_attribute on elwood
Stack: openais
Current DC: jake - partition with quorum
Version: 1.1.7-ee0730e13d124c3d58f00016c3376a1de5323cff
2 Nodes configured, 2 expected votes
2 Resources configured.
============
Online: [ elwood jake ]
Service_IP (ocf::heartbeat:IPaddr2): Started elwood
apache2 (ocf::heartbeat:apache): Started jake
Failed actions:
apache2_monitor_20000 (node=jake, call=7, rc=7, status=complete): not running
Code: Alles auswählen
jake:~ $ crm configure show
node elwood \
attributes standby="false"
node jake \
attributes standby="false"
primitive Service_IP ocf:heartbeat:IPaddr2 \
params ip="192.168.0.150" cidr_netmask="24" \
op monitor interval="10" timeout="20" \
meta target-role="started"
primitive apache2 ocf:heartbeat:apache \
params configfile="/etc/apache2/apache2.conf" \
op monitor interval="20" timeout="30" \
meta target-role="Started"
location cli-prefer-Service_IP Service_IP \
rule $id="cli-prefer-rule-Service_IP" inf: #uname eq elwood
property $id="cib-bootstrap-options" \
dc-version="1.1.7-ee0730e13d124c3d58f00016c3376a1de5323cff" \
cluster-infrastructure="openais" \
expected-quorum-votes="2" \
stonith-enabled="false" \
no-quorum-policy="ignore" \
stonith-action="poweroff" \
default-resource-stickiness="100"
Code: Alles auswählen
crm_resource -r Service_IP -M -N jake
crm status
============
Last updated: Mon Feb 8 10:42:21 2016
Last change: Mon Feb 8 10:42:17 2016 via crm_resource on elwood
Stack: openais
Current DC: jake - partition with quorum
Version: 1.1.7-ee0730e13d124c3d58f00016c3376a1de5323cff
2 Nodes configured, 2 expected votes
2 Resources configured.
============
Online: [ elwood jake ]
Service_IP (ocf::heartbeat:IPaddr2): Started jake
apache2 (ocf::heartbeat:apache): Started jake
Failed actions:
apache2_monitor_20000 (node=jake, call=7, rc=7, status=complete): not running
Grüße
Wambui