Am Dienstag, 24. August 2010 schrieb Dejan Muhamedagic: > Hi, Hi Dejan,
> On Tue, Aug 24, 2010 at 10:13:00AM +0200, Martin Steigerwald wrote: > > ----- Ursprüngliche Mail ----- > > > > > Hi, > > > > > > On Mon, Aug 23, 2010 at 12:33:15PM +0200, Martin Steigerwald wrote: > > > > Am Montag, 23. August 2010 schrieb Martin Steigerwald: > > > > > Am Mittwoch, 18. August 2010 schrieb Dejan Muhamedagic: > > > > > > Hi, > > > > > > > > > > Hi Dejan, > > > > > > > > > > > On Wed, Aug 18, 2010 at 04:41:32PM +0200, Martin Steigerwald > > > > > > > > > > > > wrote: > > > > > > > Hi, > > > > > > > > > > > > > > I have a working fencing setup with heartbeat-1: > > > > > > > > > > > > > > somehost1:~# grep ^stonith /etc/ha.d/ha.cf > > > > > > > stonith_host * cyclades 172.21.101.79 root > > > > > > > 10 > > > > > > > > > > > > > > So thats a cyclades stonith plugin, the IP adress of the > > > > > > > Cyclades Alterpath, login name for SSH login, and the serial > > > > > > > port of the IPDU that should powercycle the node to be fenced. > > > > > > > > > > > > > > Now when I want to configure a stonith plugin in > > > > > > > corosync/pacemaker, I can't set the serial port. > > > > > > > > > > > > > > There is simply no such parameter in that resource agent shown > > > > > > > > > > > > > in pacemaker: > > > > > > It turns out that the cyclades stonith plugin is missing the > > > > > > serialport parameter in the meta-data. The crm shell normally > > > > > > won't allow you to set parameters which are not mentioned in the > > > > > > meta-data, but you can relax the checks at the options level > > > > > > (see the check-* options, can't recall the name right now). > > > > > > > > > > It appears to be > > > > > > > > > > crm(live)# options check-mode relaxed > > > > > > > > > > At least it seems to accept the serialport now - despite the error > > > > > message: > > > > > > > > > > crm(live)configure# primitive fencing stonith:cyclades params > > > > > ipaddr="172.21.101.79" login="root" serialport="10" op monitor > > > > > interval="15s" timeout="60s" > > > > > ERROR: fencing: parameter serialport does not exist > > > > > WARNING: fencing: default timeout 20s for start is smaller than > > > > > the advised > > > > > 60 > > > > > > > > > > crm(live)configure# clone cloneFencing fencing > > > > > > > > > > crm(live)configure# property stonith-enabled="true" > > > > > > > > > > crm(live)configure# show > > > > > node node1 > > > > > node node2 > > > > > primitive fencing stonith:cyclades \ > > > > > > > > > > params ipaddr="172.21.101.79" login="root" serialport="10" > > > > > \ > > > > > op monitor interval="15s" timeout="60s" > > > > > > > > [...] > > > > > > > > > clone cloneFencing fencing > > > > > clone cloneLdir resLdir \ > > > > > > > > > > meta target-role="Started" > > > > > > > > > > property $id="cib-bootstrap-options" \ > > > > > > > > [...] > > > > > > > > > stonith-enabled="true" > > > > > > > > > > crm(live)configure# commit > > > > > WARNING: CIB changed in the meantime: won't touch it! > > > > > Do you still want to commit? y > > > > > > > > > > But still a STONITH does not work. I trigger ist on node2 by > > > > > killall -9 > > > > > corosync and get this in the log of node1 which wants to fence > > > > > node 2 - > > > > > node 2 obviously has nothing in the logs: > > > > > > > > > > Aug 23 11:55:29 node1 corosync[6552]: [TOTEM ] A processor failed, > > > > > forming new configuration. > > > > > Aug 23 11:55:35 node1 corosync[6552]: [pcmk ] notice: > > > > > pcmk_peer_update: > > > > > Transitional membership event on ring 108: memb=1, new=0, lost=1 > > > > > > > > I now configured the clone resources as > > > > > > > > clone cloneFencing fencing \ > > > > > > > > meta target_role="Started" > > > > > > > > now. > > > > > > > > And I noticed another vital hint in the log: > > > > > > > > Aug 23 12:28:02 node1 stonithd: [6559]: info: client tengine [pid: > > > > 6564] > > > > requests a STONITH operation RESET on node node2 > > > > Aug 23 12:28:02 node1 stonithd: [6559]: info: we can't manage node2, > > > > broadcast > > > > request to other nodes > > > > Aug 23 12:28:02 node1 stonithd: [6559]: info: Broadcasting the > > > > message > > > > succeeded: require others to stonith node node2. > > > > > > > > So it seems stonithd thinks it can't fence node2. But in fact it > > > > should be > > > > able to. My test setup uses only one Cyclades and IPDU, so this > > > > cyclades can > > > > shutdown both nodes. The stonith plugin should get the name of the > > > > host to > > > > fence from Pacemaker. At least thats how it worked in Heartbeat > > > > where I only > > > > needed one stonith_host statement for both hosts. > > > > > > > > Do I still need some "location" definition? > > > > > > No. > > > > So the cyclades plugin is a plugin which can handle mutiple > > hosts. At least this was the case when using it with > > Heartbeat-1. > > > > I wonder whether I still need to tell Pacemaker the host to > > stonith. Maybe I try making an entry to each node. But it > > really shouldn't be needed. > > The code says that it will get the list of nodes which the device > can manage from the device itself. BTW, there's also no other way > to specify a list of nodes. Yes, and it indeed works that way. See below. > > > I don't know what is going on here. You can try things out using > > > the stonith program. For instance, to get a list of nodes which > > > the device can manage: > > > > > > # stonith -t cyclades ipaddr="172.21.101.79" login="root" > > > serialport="10" -l > > > > > > To see debug messages too, add -d. > > > > This did work already. I had a fully working Heartbeat-1 > > including Stonith setup on these test machines. Thats where the > > "stonith_host" config line was coming from. > > > > So I am pretty sure its an issue with my Pacemaker > > configuration or the way Pacemaker interacts with the Cycladed > > Stonith plugin. > > Can you please file a bugzilla and attach hb_report. I found the cause and filed it as: stonith via cyclades fails due to changed host string comparison http://developerbugs.linux-foundation.org/show_bug.cgi?id=2475 Short summary: I have several two outlets per server, since at least in one of the production setups the servers have two power supplies each. The Cyclades STONITH plugin finds the outlets to switch by matching their name which are configured in the Cyclades firmware with the name of the node to fence. Now the Cyclades firmware requires unique names for outlets. So I used: rtv1a rtv1b rtv2a rtv2b as outlet names, cause the stonith plugin in Heartbeat-1 just matched upto the the last character of the name of the node to fence. Thus "rtv2" would match "rtv2a" and "rtv2b". Exactly this behavior does not work anymore, although the source code in cluster-glue 1.06 still uses the same string comparison: heartbeat-2.1.3/lib/plugins/stonith/cyclades.c: static int CYCNametoOutlet(struct pluginDevice *sd, const char *host, int *outlets, int maxoutlet) { [...] if ((err == S_OK) && (sscanf(savebuf,"%3d %16s %10s %3s", &outlet, name, locked, on) > 0)) { if (strstr(locked, "ocked") && !strncasecmp(name, host, strlen(host))) { if (numoutlet >= maxoutlet) { LOG(PIL_CRIT, "too many outlets"); return 0; } outlets[numoutlet++] = outlet; } } [...] It seems that Pacemaker compares the node names by itself and does a full string comparision, cause when I connect rtv2 to outlet "rtv2b" only and rename this outlet to "rtv2" then the STONITH works. But this doesn't work with more than one outlet per node. But unless someone can tell me on how to configure two outlets with exactly the same name in Cyclades, I prefer the old behavior! Thanks, -- Martin Steigerwald - team(ix) GmbH - http://www.teamix.de gpg: 19E3 8D42 896F D004 08AC A0CA 1E10 C593 0399 AE90
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Linux-HA mailing list [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha See also: http://linux-ha.org/ReportingProblems
