<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Nov 7, 2013, at 8:59 PM, Sean Lutner &lt;<a href="mailto:sean@rentul.net">sean@rentul.net</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=us-ascii"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div><div>On Nov 7, 2013, at 8:34 PM, Andrew Beekhof &lt;<a href="mailto:andrew@beekhof.net">andrew@beekhof.net</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br>On 8 Nov 2013, at 4:45 am, Sean Lutner &lt;<a href="mailto:sean@rentul.net">sean@rentul.net</a>&gt; wrote:<br><br><blockquote type="cite">I have a confusing situation that I'm hoping to get help with. Last night after configuring STONITH on my two node cluster, I suddenly have a "ghost" node in my cluster. I'm looking to understand the best way to remove this node from the config.<br><br>I'm using the fence_ec2 device for for STONITH. I dropped the script on each node, registered the device with stonith_admin -R -a fence_ec2 and confirmed the registration with both<br><br># stonith_admin -I<br># pcs stonith list<br><br>I then configured STONITH per the Clusters from Scratch doc<br><br><a href="http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html/Clusters_from_Scratch/_example.html">http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html/Clusters_from_Scratch/_example.html</a><br><br>Here are my commands:<br># pcs cluster cib stonith_cfg<br># pcs -f stonith_cfg stonith create ec2-fencing fence_ec2 ec2-home="/opt/ec2-api-tools" pcmk_host_check="static-list" pcmk_host_list="ip-10-50-3-122 ip-10-50-3-251" op monitor interval="300s" timeout="150s" op start start-delay="30s" interval="0"<br># pcs -f stonith_cfg stonith<br># pcs -f stonith_cfg property set stonith-enabled=true<br># pcs -f stonith_cfg property<br># pcs cluster push cib stonith_cfg<br><br>After that I saw that STONITH appears to be functioning but a new node listed in pcs status output:<br></blockquote><br>Do the EC2 instances have fixed IPs?<br>I didn't have much luck with EC2 because every time they came back up it was with a new name/address which confused corosync and created situations like this.<br></div></blockquote><div><br></div><div>The IPs persist across reboots as far as I can tell. I thought the problem was due to stonith being enabled but not working so I removed the stonith_id and disabled stonith. After that I restarted pacemaker and cman on both nodes and things started as expected but the ghost node it still there.&nbsp;<div><br></div><div>Someone else working on the cluster exported the CIB, removed the node and then imported the CIB. They used this process&nbsp;<a href="http://clusterlabs.org/doc/en-US/Pacemaker/1.0/html/Pacemaker_Explained/s-config-updates.html">http://clusterlabs.org/doc/en-US/Pacemaker/1.0/html/Pacemaker_Explained/s-config-updates.html</a></div><div><br></div><div>Even after that, the ghost node is still there? Would pcs cluster cib &gt; /tmp/cib-temp.xml and then pcs cluster push cib /tmp/cib-temp.xml after editing the node out of the config?</div><div><br></div><div>I may have to go back to the drawing board on a fencing device for the nodes. Are there any other recommendations for a cluster on EC2 nodes?</div><div><br></div><div>Thanks very much</div></div></div></div></div></blockquote><div><br></div><div>Some addition detail from the logs. This is from last night when I added the fencing. After I ran the commands above, this was in the logs. I don't see 1251 in any commands I ran and that node ID doesn't show up in instance or tag data in ec2. I'm really confused by this.</div><div><br></div><div><div>Nov &nbsp;7 03:52:37 ip-10-50-3-122 cibadmin[31146]: &nbsp; notice: crm_log_args: Invoked: /usr/sbin/cibadmin -o resources -C -X &lt;primitive class="stonith" id="ec2-fencing" type="fence_ec2"&gt;&lt;instance_attributes id="ec2-fencing-instance_attributes"&gt;&lt;nvpair id="ec2-fencing-instance_attributes-ec2-home" name="ec2-home" value="/opt/ec2-api-tools"/&gt;&lt;nvpair id="ec2-fencing-instance_attributes-pcmk_host_check" name="pcmk_host_check" value="static-list"/&gt;&lt;nvpair id="ec2-fencing-instance_attributes-pcmk_host_list" name="pcmk_host_list" value="ip-10-50-3-122 ip-10-50-3-251</div><div>Nov &nbsp;7 03:52:41 ip-10-50-3-122 lrmd[18588]: &nbsp; notice: operation_finished: ClusterEIP_54.215.143.166_monitor_30000:31096 [ 2013/11/07_03:52:41 INFO: 54.215.143.166 is here ]</div><div>Nov &nbsp;7 03:53:14 ip-10-50-3-122 cibadmin[31311]: &nbsp; notice: crm_log_args: Invoked: /usr/sbin/cibadmin -Q --xpath //crm_config&nbsp;</div><div>Nov &nbsp;7 03:53:14 ip-10-50-3-122 cibadmin[31312]: &nbsp; notice: crm_log_args: Invoked: /usr/sbin/cibadmin -c -R --xml-text &lt;cluster_property_set id="cib-bootstrap-options"&gt;#012 &nbsp; &nbsp;&lt;nvpair id="cib-bootstrap-options-dc-version" name="dc-version" value="1.1.8-7.el6-394e906"/&gt;#012 &nbsp; &nbsp;&lt;nvpair id="cib-bootstrap-options-cluster-infrastructure" name="cluster-infrastructure" value="cman"/&gt;#012 &nbsp; &nbsp;&lt;nvpair id="cib-bootstrap-options-last-lrm-refresh" name="last-lrm-refresh" value="1383790849"/&gt;#012 &nbsp; &nbsp;#012 &nbsp; &nbsp;&lt;nvpair id="cib-bootstrap-options-no-quorum-policy" name="no-quorum-policy" v</div><div>Nov &nbsp;7 03:53:19 ip-10-50-3-122 lrmd[18588]: &nbsp; notice: operation_finished: ClusterEIP_54.215.143.166_monitor_30000:31281 [ 2013/11/07_03:53:19 INFO: 54.215.143.166 is here ]</div><div>Nov &nbsp;7 03:53:28 ip-10-50-3-122 cibadmin[31399]: &nbsp; notice: crm_log_args: Invoked: /usr/sbin/cibadmin -Q --scope crm_config&nbsp;</div><div>Nov &nbsp;7 03:53:41 ip-10-50-3-122 cibadmin[31430]: &nbsp; notice: crm_log_args: Invoked: /usr/sbin/cibadmin --replace --xml-file stonith_cfg&nbsp;</div><div>Nov &nbsp;7 03:53:41 ip-10-50-3-122 crmd[18591]: &nbsp; notice: do_state_transition: State transition S_IDLE -&gt; S_POLICY_ENGINE [ input=I_PE_CALC cause=C_FSA_INTERNAL origin=abort_transition_graph ]</div><div>Nov &nbsp;7 03:53:41 ip-10-50-3-122 cib[18586]: &nbsp; notice: cib:diff: Diff: --- 1.1181.7</div><div>Nov &nbsp;7 03:53:41 ip-10-50-3-122 cib[18586]: &nbsp; notice: cib:diff: Diff: +++ 1.1184.1 9ecc39408f9be3e1137a0a574fc9df33</div><div>Nov &nbsp;7 03:53:41 ip-10-50-3-122 cib[18586]: &nbsp; notice: cib:diff: -- &nbsp; &nbsp; &nbsp; &nbsp; &lt;nvpair value="false" id="cib-bootstrap-options-stonith-enabled" /&gt;</div><div>Nov &nbsp;7 03:53:41 ip-10-50-3-122 cib[18586]: &nbsp; notice: cib:diff: ++ &nbsp; &nbsp; &nbsp; &nbsp; &lt;nvpair id="cib-bootstrap-options-stonith-enabled" name="stonith-enabled" value="true" /&gt;</div><div>Nov &nbsp;7 03:53:41 ip-10-50-3-122 cib[18586]: &nbsp; notice: cib:diff: ++ &nbsp; &nbsp; &nbsp; &lt;primitive class="stonith" id="ec2-fencing" type="fence_ec2" &gt;</div><div>Nov &nbsp;7 03:53:41 ip-10-50-3-122 cib[18586]: &nbsp; notice: cib:diff: ++ &nbsp; &nbsp; &nbsp; &nbsp; &lt;instance_attributes id="ec2-fencing-instance_attributes" &gt;</div><div>Nov &nbsp;7 03:53:41 ip-10-50-3-122 cib[18586]: &nbsp; notice: cib:diff: ++ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;nvpair id="ec2-fencing-instance_attributes-ec2-home" name="ec2-home" value="/opt/ec2-api-tools" /&gt;</div><div>Nov &nbsp;7 03:53:41 ip-10-50-3-122 cib[18586]: &nbsp; notice: cib:diff: ++ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;nvpair id="ec2-fencing-instance_attributes-pcmk_host_check" name="pcmk_host_check" value="static-list" /&gt;</div><div>Nov &nbsp;7 03:53:41 ip-10-50-3-122 cib[18586]: &nbsp; notice: cib:diff: ++ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;nvpair id="ec2-fencing-instance_attributes-pcmk_host_list" name="pcmk_host_list" value="ip-10-50-3-122 ip-10-50-3-251" /&gt;</div><div>Nov &nbsp;7 03:53:41 ip-10-50-3-122 cib[18586]: &nbsp; notice: cib:diff: ++ &nbsp; &nbsp; &nbsp; &nbsp; &lt;/instance_attributes&gt;</div><div>Nov &nbsp;7 03:53:41 ip-10-50-3-122 cib[18586]: &nbsp; notice: cib:diff: ++ &nbsp; &nbsp; &nbsp; &nbsp; &lt;operations &gt;</div><div>Nov &nbsp;7 03:53:41 ip-10-50-3-122 cib[18586]: &nbsp; notice: cib:diff: ++ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;op id="ec2-fencing-interval-0" interval="0" name="monitor" start-delay="30s" timeout="150s" /&gt;</div><div>Nov &nbsp;7 03:53:41 ip-10-50-3-122 crmd[18591]: &nbsp; notice: do_state_transition: State transition S_ELECTION -&gt; S_INTEGRATION [ input=I_ELECTION_DC cause=C_FSA_INTERNAL origin=do_election_check ]</div><div>Nov &nbsp;7 03:53:41 ip-10-50-3-122 cib[18586]: &nbsp; notice: cib:diff: ++ &nbsp; &nbsp; &nbsp; &nbsp; &lt;/operations&gt;</div><div>Nov &nbsp;7 03:53:41 ip-10-50-3-122 cib[18586]: &nbsp; notice: cib:diff: ++ &nbsp; &nbsp; &nbsp; &lt;/primitive&gt;</div><div>Nov &nbsp;7 03:53:41 ip-10-50-3-122 cib[18586]: &nbsp; notice: log_cib_diff: cib:diff: Local-only Change: 1.1185.1</div><div>Nov &nbsp;7 03:53:41 ip-10-50-3-122 cib[18586]: &nbsp; notice: cib:diff: -- &lt;cib admin_epoch="1" epoch="1184" num_updates="1" /&gt;</div><div>Nov &nbsp;7 03:53:41 ip-10-50-3-122 cib[18586]: &nbsp; notice: cib:diff: ++ &nbsp; &nbsp; &nbsp; &lt;node id="ip-10-50-3-1251" uname="ip-10-50-3-1251" /&gt;</div></div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div><div><br><blockquote type="cite"><div style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br><blockquote type="cite"><br># pcs status<br>Last updated: Thu Nov &nbsp;7 17:41:21 2013<br>Last change: Thu Nov &nbsp;7 04:29:06 2013 via cibadmin on ip-10-50-3-122<br>Stack: cman<br>Current DC: ip-10-50-3-122 - partition with quorum<br>Version: 1.1.8-7.el6-394e906<br>3 Nodes configured, unknown expected votes<br>11 Resources configured.<br><br><br>Node ip-10-50-3-1251: UNCLEAN (offline)<br>Online: [ ip-10-50-3-122 ip-10-50-3-251 ]<br><br>Full list of resources:<br><br>ClusterEIP_54.215.143.166 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(ocf::pacemaker:EIP): &nbsp;&nbsp;Started ip-10-50-3-122<br>Clone Set: EIP-AND-VARNISH-clone [EIP-AND-VARNISH]<br>&nbsp;&nbsp;&nbsp;Started: [ ip-10-50-3-122 ip-10-50-3-251 ]<br>&nbsp;&nbsp;&nbsp;Stopped: [ EIP-AND-VARNISH:2 ]<br>ec2-fencing &nbsp;&nbsp;&nbsp;(stonith:fence_ec2): &nbsp;&nbsp;&nbsp;Stopped<span class="Apple-converted-space">&nbsp;</span><br><br>I have no idea where the node that is marked UNCLEAN came from, though it's a clear typo is a proper cluster node.<br><br>The only command I ran with the bad node ID was:<br><br># crm_resource --resource ClusterEIP_54.215.143.166 --cleanup --node ip-10-50-3-1251<br><br>Is there any possible way that could have caused the the node to be added?<br><br>I tried running pcs cluster node remove ip-10-50-3-1251 but since there is no node and thus no pcsd that failed. Is there a way I can safely remove this ghost node from the cluster? I can provide logs from pacemaker or corosync as needed.<br>_______________________________________________<br>Pacemaker mailing list: <a href="mailto:Pacemaker@oss.clusterlabs.org">Pacemaker@oss.clusterlabs.org</a><br><a href="http://oss.clusterlabs.org/mailman/listinfo/pacemaker">http://oss.clusterlabs.org/mailman/listinfo/pacemaker</a><br><br>Project Home: <a href="http://www.clusterlabs.org">http://www.clusterlabs.org</a><br>Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</a><br>Bugs: <a href="http://bugs.clusterlabs.org">http://bugs.clusterlabs.org</a><br></blockquote><br><br>_______________________________________________<br>Pacemaker mailing list:<span class="Apple-converted-space">&nbsp;</span><a href="mailto:Pacemaker@oss.clusterlabs.org">Pacemaker@oss.clusterlabs.org</a><br><a href="http://oss.clusterlabs.org/mailman/listinfo/pacemaker">http://oss.clusterlabs.org/mailman/listinfo/pacemaker</a><br><br>Project Home:<span class="Apple-converted-space">&nbsp;</span><a href="http://www.clusterlabs.org/">http://www.clusterlabs.org</a><br>Getting started:<span class="Apple-converted-space">&nbsp;</span><a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</a><br>Bugs:<span class="Apple-converted-space">&nbsp;</span><a href="http://bugs.clusterlabs.org/">http://bugs.clusterlabs.org</a></div></blockquote></div><br></div></div>_______________________________________________<br>Pacemaker mailing list: <a href="mailto:Pacemaker@oss.clusterlabs.org">Pacemaker@oss.clusterlabs.org</a><br><a href="http://oss.clusterlabs.org/mailman/listinfo/pacemaker">http://oss.clusterlabs.org/mailman/listinfo/pacemaker</a><br><br>Project Home: http://www.clusterlabs.org<br>Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf<br>Bugs: http://bugs.clusterlabs.org<br></blockquote></div><br></body></html>