LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   resource-stickiness automatically move all resources in certain time (https://www.linuxquestions.org/questions/linux-server-73/resource-stickiness-automatically-move-all-resources-in-certain-time-885131/)

danian 06-08-2011 02:37 AM

resource-stickiness automatically move all resources in certain time
 
Hello,
I`ve configured heartbeat and pacemaker with 2 nodes, all resources work well, all resources stars when some of them is down, when the host is down, pacemaker moves all resources to the other one, my configuration:

node $id="06d57c5a-3d47-4ef1-b518-7b8501f5ca9d" premailman1.mpt.es
node $id="9af2ea3b-b7ad-458f-b7d0-2491b72db28f" premailman.mpt.es
primitive IP-Virtual ocf:heartbeat:IPaddr \
params ip="10.1.24.201"
primitive apache_mailman lsb:httpd \
op monitor interval="15" timeout="15" start-delay="15" \
meta target-role="Started"
primitive apache_webmail lsb:httpd \
op monitor interval="15" timeout="15" start-delay="15" \
meta target-role="Started"
primitive httpd_mailman ocf:heartbeat:anything \
params binfile="/usr/local/bin/httpd_mailman"
primitive httpd_webmail ocf:heartbeat:anything \
params binfile="/usr/local/bin/httpd_webmail"
primitive mailman ocf:heartbeat:anything \
params binfile="/var/mailman/bin/mailmanctl" cmdline_options="start" \
op start interval="0s" timeout="60s" on-fail="restart" \
op monitor interval="10s" timeout="60s" on-fail="restart" \
op stop interval="0s" timeout="60s" on-fail="block"
primitive smtp_postfix ocf:heartbeat:postfix \
params binary="/etc/init.d/postfix" \
op start interval="0s" timeout="60s" on-fail="restart" \
op monitor interval="10s" timeout="60s" on-fail="restart" \
op stop interval="0s" timeout="60s" on-fail="block"
colocation colocation-1 inf: IP-Virtual apache_mailman
colocation colocation-2 inf: IP-Virtual smtp_postfix
colocation colocation-3 inf: IP-Virtual mailman
colocation colocation-4 inf: IP-Virtual httpd_mailman
property $id="cib-bootstrap-options" \
dc-version="1.1.1-b9b672590e79770afb63b9b455400d92fb6b5d9e" \
cluster-infrastructure="Heartbeat" \
stonith-enabled="false" \
start-failure-is-fatal="false" \
no-quorum-policy="ignore" \
last-lrm-refresh="1306416533"
rsc_defaults $id="rsc-options" \
resource-stickiness="INFINITY"

How I said everything works well, but i need just one thing, i have the directive " resource-stickiness="INFINITY", when node1 is down, the node2 starts all resources and prevent failback again though the node1 is up, back i need move all resources to the first one when I certainly sure the node1 is runnig, is there some directive to tell pacemaker that move back again the to node1 automatically? i mean, is posibble to move back resources to node1 when It has passed certain time, maybe 1 hour or something?

Best regards from danian.

EricTRA 06-12-2011 02:13 AM

Hello,

If you want to move the resources back to the original node, then don't set stickiness. If you don't have stickiness defined pacemaker will add a line 'location' with the preferred node mentioned in it. After a node fails, it will always return to the original node when it comes back up. I think if you want to use time based migration after failures that you might need migration-threshold and failure-timeout to get what you want. Have a look at this great Pacemaker documentation, more in particular this chapter.

Kind regards,

Eric

EricTRA 06-20-2011 04:15 AM

Hello danian,

You marked your thread as solved. Would you mind letting us know what worked for you at the end so that other in similar situation can see if it works for them too? Thanks in advance, have fun with Linux.

Kind regards,

Eric


All times are GMT -5. The time now is 03:32 PM.