Send Linux-ha-cvs mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Linux-ha-cvs digest..."


Today's Topics:

   1. Linux-HA CVS: lib by blaschke from 
      ([email protected])


----------------------------------------------------------------------

Message: 1
Date: Mon, 28 Nov 2005 09:52:09 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: lib by blaschke from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : blaschke
Host    : 
Project : linux-ha
Module  : lib

Dir     : linux-ha/lib/plugins/stonith


Modified Files:
        Makefile.am README.cyclades cyclades.c 


Log Message:

Patch from Marcelo that updates the Cyclades STONITH module as follows:
* Support new PM firmware format
* Support multiple outlets connected to a single host by truncating the
comparison to the hostname length defined in the heartbeat configuration.
* Increase maximum outlet name length to 16 characters.
* Add README.cyclades file which for some reason was not incorporated
to the official heartbeat package.


===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/plugins/stonith/Makefile.am,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -3 -r1.46 -r1.47
--- Makefile.am 26 Sep 2005 05:08:11 -0000      1.46
+++ Makefile.am 28 Nov 2005 16:52:08 -0000      1.47
@@ -37,7 +37,7 @@
                        -DLOCALEDIR='"@LOCALE@"'                
 
 
-EXTRA_DIST = README.meatware README.rcd_serial README.vacm README.drac3 
README.ipmilan
+EXTRA_DIST = README.meatware README.rcd_serial README.vacm README.drac3 
README.ipmilan README.cyclades
 
 #
 #       We need "vacmclient_api.h" and -lvacmclient to make the VACM
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/plugins/stonith/README.cyclades,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- README.cyclades     22 Mar 2005 17:39:45 -0000      1.2
+++ README.cyclades     28 Nov 2005 16:52:08 -0000      1.3
@@ -58,4 +58,4 @@
 
 ------
 Any questions please contact Cyclades support at <[EMAIL PROTECTED]> 
-or the current module maintainer Marcelo Tosatti <[EMAIL PROTECTED]>
+or <[EMAIL PROTECTED]>
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/plugins/stonith/cyclades.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- cyclades.c  26 Apr 2005 17:08:24 -0000      1.11
+++ cyclades.c  28 Nov 2005 16:52:08 -0000      1.12
@@ -1,4 +1,4 @@
- /* $Id: cyclades.c,v 1.11 2005/04/26 17:08:24 blaschke Exp $ */
+ /* $Id: cyclades.c,v 1.12 2005/11/28 16:52:08 blaschke Exp $ */
 /*
  * Stonith module for Cyclades AlterPath PM
  * Bases off the SSH plugin
@@ -117,7 +117,8 @@
 };
 
 static struct Etoken StatusOutput[] = { 
-       { "Outlet\t\tName\t\tStatus\t\tUsers\t\tInterval (s)", 0, 0},
+       { "Outlet\t\tName\t\tStatus\t\tUsers\t\tInterval (s)", 1, 0},
+       { "Outlet\tName\t\t\tStatus\t\tInterval (s)\tUsers", 2, 0},
        { NULL, 0, 0} 
 };
 
@@ -234,7 +235,7 @@
        char    savebuf[MAXSAVE];
        int err;
        int outlet, numoutlet = 0;
-       char name[10], locked[10], on[4];
+       char name[17], locked[10], on[4];
 
        if (CYC_robust_cmd(sd, cmd) != S_OK) {
                LOG(PIL_CRIT, "can't run status all command");
@@ -255,10 +256,10 @@
                err = CYCScanLine(sd, 2, savebuf, sizeof(savebuf));
 
                if ((err == S_OK) &&
-                   (sscanf(savebuf,"%3d %10s %10s %3s", &outlet, 
+                   (sscanf(savebuf,"%3d %16s %10s %3s", &outlet, 
                        name, locked, on) > 0)) {
                        if (strstr(locked, "ocked")
-                       && !strcasecmp(name, host)) {
+                       && !strncasecmp(name, host, strlen(host))) {
                                if (numoutlet >= maxoutlet) {
                                        LOG(PIL_CRIT, "too many outlets");
                                        return 0;
@@ -286,7 +287,7 @@
        int err, i;
        int outlet;
        int numnames = 0;
-       char name[10], locked[10], on[4];
+       char name[17], locked[10], on[4];
        char *NameList[MAX_OUTLETS];
        char **ret = NULL;
 
@@ -316,7 +317,7 @@
                err = CYCScanLine(sd, 2, savebuf, sizeof(savebuf));
 
                if ((err == S_OK) &&
-                   (sscanf(savebuf,"%3d %10s %10s %3s", &outlet, 
+                   (sscanf(savebuf,"%3d %16s %10s %3s", &outlet, 
                        name, locked, on) > 0)) {
                        if (strstr(locked, "ocked")) {
                                nm = (char *) STRDUP (name);
@@ -401,8 +402,6 @@
                return(S_OOPS);
        }
 
-       EXPECT(sd->rdfd, CRNL, 50);
-
        for (i = 0; i < numoutlet; i++) {
                memset(expstring, 0, sizeof(expstring));
                snprintf(expstring, sizeof(expstring), "%d: Outlet turned %s."
@@ -447,8 +446,6 @@
                return(S_OOPS);
        }
 
-       RESETEXPECT(sd->rdfd, CRNL, 50);
-
        for (i = 0; i < numoutlet; i++) {
                memset(expstring, 0, sizeof(expstring));
                snprintf(expstring, sizeof(expstring)




------------------------------

_______________________________________________
Linux-ha-cvs mailing list
[email protected]
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs


End of Linux-ha-cvs Digest, Vol 24, Issue 68
********************************************

Reply via email to