* [Cluster-devel] cluster/fence/fence_node fence_node.c
@ 2006-07-07 19:40 teigland
0 siblings, 0 replies; 7+ messages in thread
From: teigland @ 2006-07-07 19:40 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL4
Changes by: teigland at sourceware.org 2006-07-07 19:40:22
Modified files:
fence/fence_node: fence_node.c
Log message:
dispatch agent function was being called with an extra arg
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/fence_node/fence_node.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.2.2.3&r2=1.2.2.4
--- cluster/fence/fence_node/fence_node.c 2005/02/24 07:06:09 1.2.2.3
+++ cluster/fence/fence_node/fence_node.c 2006/07/07 19:40:22 1.2.2.4
@@ -34,7 +34,7 @@
static char *prog_name;
static int force;
-int dispatch_fence_agent(int cd, char *victim, int in);
+int dispatch_fence_agent(int cd, char *victim);
static void print_usage(void)
{
@@ -116,7 +116,7 @@
goto fail;
}
- error = dispatch_fence_agent(cd, victim, 0);
+ error = dispatch_fence_agent(cd, victim);
if (error)
goto fail_ccs;
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Cluster-devel] cluster/fence/fence_node fence_node.c
@ 2006-07-07 19:41 teigland
0 siblings, 0 replies; 7+ messages in thread
From: teigland @ 2006-07-07 19:41 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: STABLE
Changes by: teigland at sourceware.org 2006-07-07 19:41:25
Modified files:
fence/fence_node: fence_node.c
Log message:
dispatch_fence_agent was being prototyped and called with an extra
arg that doesn't exist in the real function
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/fence_node/fence_node.c.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.2.2.3&r2=1.2.2.3.6.1
--- cluster/fence/fence_node/fence_node.c 2005/02/24 07:06:09 1.2.2.3
+++ cluster/fence/fence_node/fence_node.c 2006/07/07 19:41:25 1.2.2.3.6.1
@@ -34,7 +34,7 @@
static char *prog_name;
static int force;
-int dispatch_fence_agent(int cd, char *victim, int in);
+int dispatch_fence_agent(int cd, char *victim);
static void print_usage(void)
{
@@ -116,7 +116,7 @@
goto fail;
}
- error = dispatch_fence_agent(cd, victim, 0);
+ error = dispatch_fence_agent(cd, victim);
if (error)
goto fail_ccs;
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Cluster-devel] cluster/fence/fence_node fence_node.c
@ 2006-07-07 20:01 teigland
0 siblings, 0 replies; 7+ messages in thread
From: teigland @ 2006-07-07 20:01 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: teigland at sourceware.org 2006-07-07 20:01:17
Modified files:
fence/fence_node: fence_node.c
Log message:
dispatch_fence_agent() was prototyped and called with an extra arg
that doesn't exist in the real function
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/fence_node/fence_node.c.diff?cvsroot=cluster&r1=1.5&r2=1.6
--- cluster/fence/fence_node/fence_node.c 2005/02/24 07:05:51 1.5
+++ cluster/fence/fence_node/fence_node.c 2006/07/07 20:01:17 1.6
@@ -34,7 +34,7 @@
static char *prog_name;
static int force;
-int dispatch_fence_agent(int cd, char *victim, int in);
+int dispatch_fence_agent(int cd, char *victim);
static void print_usage(void)
{
@@ -116,7 +116,7 @@
goto fail;
}
- error = dispatch_fence_agent(cd, victim, 0);
+ error = dispatch_fence_agent(cd, victim);
if (error)
goto fail_ccs;
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Cluster-devel] cluster/fence/fence_node fence_node.c
@ 2006-07-10 17:05 rohara
0 siblings, 0 replies; 7+ messages in thread
From: rohara @ 2006-07-10 17:05 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: rohara at sourceware.org 2006-07-10 17:05:54
Modified files:
fence/fence_node: fence_node.c
Log message:
Added "self" parameter to dispatch_fence_agent.
Added "-s" option as way to pass name of current node.
This is needed for SCSI persistent reservation (fence_scsi).
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/fence_node/fence_node.c.diff?cvsroot=cluster&r1=1.6&r2=1.7
--- cluster/fence/fence_node/fence_node.c 2006/07/07 20:01:17 1.6
+++ cluster/fence/fence_node/fence_node.c 2006/07/10 17:05:53 1.7
@@ -20,7 +20,7 @@
#include "copyright.cf"
#include "ccs.h"
-#define OPTION_STRING ("hOuV")
+#define OPTION_STRING ("hOs:uV")
#define die(fmt, args...) \
do \
@@ -34,7 +34,7 @@
static char *prog_name;
static int force;
-int dispatch_fence_agent(int cd, char *victim);
+int dispatch_fence_agent(int cd, char *victim, char *self);
static void print_usage(void)
{
@@ -46,6 +46,7 @@
printf("\n");
printf(" -h Print this help, then exit\n");
printf(" -O Force connection to CCS\n");
+ printf(" -s Name of current node\n");
printf(" -V Print program version information, then exit\n");
printf("\n");
}
@@ -54,6 +55,7 @@
{
int cont = 1, optchar, error, cd;
char *victim = NULL;
+ char *self = NULL;
prog_name = argv[0];
@@ -67,6 +69,10 @@
exit(EXIT_SUCCESS);
break;
+ case 's':
+ self = optarg;
+ break;
+
case 'O':
force = 1;
break;
@@ -116,7 +122,7 @@
goto fail;
}
- error = dispatch_fence_agent(cd, victim);
+ error = dispatch_fence_agent(cd, victim, self);
if (error)
goto fail_ccs;
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Cluster-devel] cluster/fence/fence_node fence_node.c
@ 2006-12-01 19:17 rohara
0 siblings, 0 replies; 7+ messages in thread
From: rohara @ 2006-12-01 19:17 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: rohara at sourceware.org 2006-12-01 19:17:07
Modified files:
fence/fence_node: fence_node.c
Log message:
Remove option to pass "self" parameter.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/fence_node/fence_node.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.7&r2=1.7.2.1
--- cluster/fence/fence_node/fence_node.c 2006/07/10 17:05:53 1.7
+++ cluster/fence/fence_node/fence_node.c 2006/12/01 19:17:06 1.7.2.1
@@ -20,7 +20,7 @@
#include "copyright.cf"
#include "ccs.h"
-#define OPTION_STRING ("hOs:uV")
+#define OPTION_STRING ("hOuV")
#define die(fmt, args...) \
do \
@@ -34,7 +34,7 @@
static char *prog_name;
static int force;
-int dispatch_fence_agent(int cd, char *victim, char *self);
+int dispatch_fence_agent(int cd, char *victim);
static void print_usage(void)
{
@@ -46,7 +46,6 @@
printf("\n");
printf(" -h Print this help, then exit\n");
printf(" -O Force connection to CCS\n");
- printf(" -s Name of current node\n");
printf(" -V Print program version information, then exit\n");
printf("\n");
}
@@ -55,7 +54,6 @@
{
int cont = 1, optchar, error, cd;
char *victim = NULL;
- char *self = NULL;
prog_name = argv[0];
@@ -69,10 +67,6 @@
exit(EXIT_SUCCESS);
break;
- case 's':
- self = optarg;
- break;
-
case 'O':
force = 1;
break;
@@ -122,7 +116,7 @@
goto fail;
}
- error = dispatch_fence_agent(cd, victim, self);
+ error = dispatch_fence_agent(cd, victim);
if (error)
goto fail_ccs;
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Cluster-devel] cluster/fence/fence_node fence_node.c
@ 2006-12-01 19:57 rohara
0 siblings, 0 replies; 7+ messages in thread
From: rohara @ 2006-12-01 19:57 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL50
Changes by: rohara at sourceware.org 2006-12-01 19:57:53
Modified files:
fence/fence_node: fence_node.c
Log message:
Remove option for passing "self" parameter.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/fence_node/fence_node.c.diff?cvsroot=cluster&only_with_tag=RHEL50&r1=1.7&r2=1.7.4.1
--- cluster/fence/fence_node/fence_node.c 2006/07/10 17:05:53 1.7
+++ cluster/fence/fence_node/fence_node.c 2006/12/01 19:57:53 1.7.4.1
@@ -20,7 +20,7 @@
#include "copyright.cf"
#include "ccs.h"
-#define OPTION_STRING ("hOs:uV")
+#define OPTION_STRING ("hOuV")
#define die(fmt, args...) \
do \
@@ -34,7 +34,7 @@
static char *prog_name;
static int force;
-int dispatch_fence_agent(int cd, char *victim, char *self);
+int dispatch_fence_agent(int cd, char *victim);
static void print_usage(void)
{
@@ -46,7 +46,6 @@
printf("\n");
printf(" -h Print this help, then exit\n");
printf(" -O Force connection to CCS\n");
- printf(" -s Name of current node\n");
printf(" -V Print program version information, then exit\n");
printf("\n");
}
@@ -55,7 +54,6 @@
{
int cont = 1, optchar, error, cd;
char *victim = NULL;
- char *self = NULL;
prog_name = argv[0];
@@ -69,10 +67,6 @@
exit(EXIT_SUCCESS);
break;
- case 's':
- self = optarg;
- break;
-
case 'O':
force = 1;
break;
@@ -122,7 +116,7 @@
goto fail;
}
- error = dispatch_fence_agent(cd, victim, self);
+ error = dispatch_fence_agent(cd, victim);
if (error)
goto fail_ccs;
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Cluster-devel] cluster/fence/fence_node fence_node.c
@ 2007-10-29 5:48 fabbione
0 siblings, 0 replies; 7+ messages in thread
From: fabbione @ 2007-10-29 5:48 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: fabbione at sourceware.org 2007-10-29 05:48:54
Modified files:
fence/fence_node: fence_node.c
Log message:
Apply, rework and cleanup second part of patch from Marco Ceci to fix 354421
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/fence_node/fence_node.c.diff?cvsroot=cluster&r1=1.9&r2=1.10
--- cluster/fence/fence_node/fence_node.c 2007/08/22 08:58:42 1.9
+++ cluster/fence/fence_node/fence_node.c 2007/10/29 05:48:53 1.10
@@ -18,7 +18,6 @@
#include <syslog.h>
#include "copyright.cf"
-#include "ccs.h"
#define OPTION_STRING ("hOuV")
@@ -32,9 +31,9 @@
while (0)
static char *prog_name;
-static int force;
+static int force = 0;
-int dispatch_fence_agent(int cd, char *victim);
+int dispatch_fence_agent(char *victim, int force);
static void print_usage(void)
{
@@ -52,7 +51,7 @@
int main(int argc, char *argv[])
{
- int cont = 1, optchar, error, cd;
+ int cont = 1, optchar, error;
char *victim = NULL;
prog_name = argv[0];
@@ -104,30 +103,16 @@
if (!victim)
die("no node name specified");
- if (force)
- cd = ccs_force_connect(NULL, 0);
- else
- cd = ccs_connect();
-
openlog("fence_node", LOG_PID, LOG_USER);
- if (cd < 0) {
- syslog(LOG_ERR, "cannot connect to ccs %d\n", cd);
- goto fail;
- }
+ error = dispatch_fence_agent(victim, force);
- error = dispatch_fence_agent(cd, victim);
- if (error)
- goto fail_ccs;
-
- syslog(LOG_NOTICE, "Fence of \"%s\" was successful\n", victim);
- ccs_disconnect(cd);
- exit(EXIT_SUCCESS);
-
- fail_ccs:
- ccs_disconnect(cd);
- fail:
- syslog(LOG_ERR, "Fence of \"%s\" was unsuccessful\n", victim);
- exit(EXIT_FAILURE);
+ if (error) {
+ syslog(LOG_ERR, "Fence of \"%s\" was unsuccessful\n", victim);
+ exit(EXIT_FAILURE);
+ } else {
+ syslog(LOG_NOTICE, "Fence of \"%s\" was successful\n", victim);
+ exit(EXIT_SUCCESS);
+ }
}
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-10-29 5:48 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-01 19:17 [Cluster-devel] cluster/fence/fence_node fence_node.c rohara
-- strict thread matches above, loose matches on Subject: below --
2007-10-29 5:48 fabbione
2006-12-01 19:57 rohara
2006-07-10 17:05 rohara
2006-07-07 20:01 teigland
2006-07-07 19:41 teigland
2006-07-07 19:40 teigland
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).