<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:2014453731;
        mso-list-type:hybrid;
        mso-list-template-ids:171852650 1074331649 1074331651 1074331653 1074331649 1074331651 1074331653 1074331649 1074331651 1074331653;}
@list l0:level1
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-IN" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hi All,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I am new in pacemaker corosync.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have created a simple environment with 2 nodes(Active/Passive) having 2 resources.<o:p></o:p></p>
<p class="MsoNormal">Resources:<o:p></o:p></p>
<p class="MsoNormal">One resource is added on VIP.<o:p></o:p></p>
<p class="MsoNormal">Other resource is added as Httpd apache service.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"><i><span style="background:yellow;mso-highlight:yellow">[root@node1 ~]# pcs resource show Httpd</span><o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:36.0pt"><i>Resource: Httpd (class=ocf provider=heartbeat type=apache)<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:36.0pt"><i>  Attributes: configfile=/etc/httpd/conf/httpd.conf<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:36.0pt"><i>  Operations: monitor interval=30s (Httpd-monitor-interval-30s)<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:36.0pt"><i>              start interval=0s timeout=40s (Httpd-start-interval-0s)<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:36.0pt"><i>              stop interval=0s timeout=60s (Httpd-stop-interval-0s)<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:36.0pt"><i><span style="background:yellow;mso-highlight:yellow">[root@node1 ~]# pcs resource show Cluster_VIP</span><o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:36.0pt"><i>Resource: Cluster_VIP (class=ocf provider=heartbeat type=IPaddr2)<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:36.0pt"><i>  Attributes: cidr_netmask=32 ip=10.0.4.99<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:36.0pt"><i>  Operations: monitor interval=20s (Cluster_VIP-monitor-interval-20s)<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:36.0pt"><i>              start interval=0s timeout=20s (Cluster_VIP-start-interval-0s)<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:36.0pt"><i>              stop interval=0s timeout=20s (Cluster_VIP-stop-interval-0s)<o:p></o:p></i></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"><i><span style="background:yellow;mso-highlight:yellow">[root@node1 ~]# pcs status</span><o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:36.0pt"><i>Cluster name: Cluster<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:36.0pt"><i>Stack: corosync<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:36.0pt"><i>Current DC: node2 (version 1.1.16-12.el7_4.4-94ff4df) - partition with quorum<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:36.0pt"><i>Last updated: Tue Nov  7 15:09:40 2017<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:36.0pt"><i>Last change: Tue Nov  7 15:03:22 2017 by root via cibadmin on node1<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:36.0pt"><i>2 nodes configured<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:36.0pt"><i>2 resources configured<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:36.0pt"><i>Online: [ node1 node2 ]<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:36.0pt"><i>Full list of resources:<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:36.0pt"><i>Cluster_VIP    (ocf::heartbeat:IPaddr2):       Started node1<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:36.0pt"><i>Httpd  (ocf::heartbeat:apache):        Started node1<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:36.0pt"><i>Daemon Status:<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:36.0pt"><i>  corosync: active/enabled<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:36.0pt"><i>  pacemaker: active/enabled<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:36.0pt"><i>  pcsd: active/enabled<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:36.0pt"><i><o:p> </o:p></i></p>
<p class="MsoNormal">To check and kill  process ID(pid) of httpd by using command:<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="font-family:Symbol"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">        
</span></span></span><![endif]>ps –aef | grep httpd<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"><i><span style="background:yellow;mso-highlight:yellow">[root@node1 ~]# ps -aef | grep httpd</span><o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:36.0pt"><i>root      4392     1  0 15:03 ?        00:00:00 /sbin/httpd -DSTATUS -f /etc/httpd/conf/httpd.conf -c PidFile /var/run//httpd.pid<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:36.0pt"><i>apache    4393  4392  0 15:03 ?        00:00:00 /sbin/httpd -DSTATUS -f /etc/httpd/conf/httpd.conf -c PidFile /var/run//httpd.pid<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:36.0pt"><i>apache    4394  4392  0 15:03 ?        00:00:00 /sbin/httpd -DSTATUS -f /etc/httpd/conf/httpd.conf -c PidFile /var/run//httpd.pid<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:36.0pt"><i>apache    4395  4392  0 15:03 ?        00:00:00 /sbin/httpd -DSTATUS -f /etc/httpd/conf/httpd.conf -c PidFile /var/run//httpd.pid<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:36.0pt"><i>apache    4396  4392  0 15:03 ?        00:00:00 /sbin/httpd -DSTATUS -f /etc/httpd/conf/httpd.conf -c PidFile /var/run//httpd.pid<o:p></o:p></i></p>
<p class="MsoNormal" style="margin-left:36.0pt"><i>apache    4397  4392  0 15:03 ?        00:00:00 /sbin/httpd -DSTATUS -f /etc/httpd/conf/httpd.conf -c PidFile /var/run//httpd.pid<o:p></o:p></i></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="text-indent:36.0pt"><span style="background:yellow;mso-highlight:yellow">[root@node1 ~]# kill -9 4392</span>
<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:36.0pt"><o:p> </o:p></p>
<p class="MsoNormal">I am trying to do resource failover by killing pid of httpd.
<b><o:p></o:p></b></p>
<p class="MsoNormal"><b>Observation:<o:p></o:p></b></p>
<p class="MsoNormal">I observed that resource failover is not happing after killing the pid. Status of resource(Httpd) remain started on node1.
<o:p></o:p></p>
<p class="MsoNormal">We don’t want to use resource move ”pcs resource move Httpd” and resource disable”pcs resource disable httpd” command for this.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b>Query:<o:p></o:p></b></p>
<p class="MsoNormal">What is the issue in our approach ?<b><o:p></o:p></b></p>
<p class="MsoNormal">How we can achieve a resources failover? <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Further I will use this environment for testing the migration-threshold.
<o:p></o:p></p>
<p class="MsoNormal">Any suggestions regarding this also welcome.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">TIA<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-IN">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-IN">Garima<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>