Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 239311 Details for
Bug 354421
fenced fails to execute the fence agent again if the first attempt fails and it takes more than 30 seconds to complete
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch that fix the problem
fence-ccs-retry-rhel5.patch (text/plain), 3.89 KB, created by
Marco Ceci
on 2007-10-26 16:42:27 UTC
(
hide
)
Description:
patch that fix the problem
Filename:
MIME Type:
Creator:
Marco Ceci
Created:
2007-10-26 16:42:27 UTC
Size:
3.89 KB
patch
obsolete
>diff -burN cman-2.0.73/fence/fenced/agent.c cman-2.0.73-mceci/fence/fenced/agent.c >--- cman-2.0.73/fence/fenced/agent.c 2006-12-01 19:17:46.000000000 +0000 >+++ cman-2.0.73-mceci/fence/fenced/agent.c 2007-10-26 17:25:22.000000000 +0100 >@@ -302,18 +302,45 @@ > cman_finish(ch); > } > >-int dispatch_fence_agent(int cd, char *victim) >+int dispatch_fence_agent(char *victim, int force) > { > char *method = NULL, *device = NULL; >- int num_methods, num_devices, m, d, error = -1; >+ int num_methods, num_devices, m, d, error = -1, cd; >+ >+ if (force) >+ cd = ccs_force_connect(NULL, 0); >+ else { >+ while ((cd = ccs_connect()) < 0) >+ sleep(1); >+ } >+ >+ if (cd < 0) { >+ syslog(LOG_ERR, "cannot connect to ccs %d\n", cd); >+ return -1; >+ } > > num_methods = count_methods(cd, victim); > > for (m = 0; m < num_methods; m++) { > > error = get_method(cd, victim, m, &method); >+ >+ /* if the connection timed out while we were trying >+ * to fence, try to open the connection again >+ */ >+ if (error == -EBADR) { >+ syslog(LOG_INFO, "ccs connection timed out, " >+ "retrying\n"); >+ >+ while ((cd = ccs_connect()) < 0) >+ sleep(1); >+ >+ error = get_method(cd, victim, m, &method); >+ > if (error) > continue; >+ } else if (error) >+ continue; > > /* if num_devices is zero we should return an error */ > error = -1; >@@ -342,6 +369,8 @@ > break; > } > >+ ccs_disconnect(cd); >+ > return error; > } > >diff -burN cman-2.0.73/fence/fenced/fd.h cman-2.0.73-mceci/fence/fenced/fd.h >--- cman-2.0.73/fence/fenced/fd.h 2007-01-29 20:30:25.000000000 +0000 >+++ cman-2.0.73-mceci/fence/fenced/fd.h 2007-10-25 10:16:42.000000000 +0100 >@@ -176,7 +176,7 @@ > void do_recovery_done(fd_t *fd); > > /* agent.c */ >-int dispatch_fence_agent(int cd, char *victim); >+int dispatch_fence_agent(char *victim, int force); > > /* group.c */ > int setup_groupd(void); >diff -burN cman-2.0.73/fence/fenced/recover.c cman-2.0.73-mceci/fence/fenced/recover.c >--- cman-2.0.73/fence/fenced/recover.c 2007-01-29 20:30:25.000000000 +0000 >+++ cman-2.0.73-mceci/fence/fenced/recover.c 2007-10-25 10:17:13.000000000 +0100 >@@ -12,7 +12,6 @@ > ******************************************************************************/ > > #include "fd.h" >-#include "ccs.h" > #include <sys/time.h> > #include <sys/types.h> > #include <sys/select.h> >@@ -357,7 +356,7 @@ > { > fd_node_t *node; > char *master_name; >- int master, error, cd; >+ int master, error; > int override = -1; > > master = find_master_nodeid(fd, &master_name); >@@ -370,9 +369,6 @@ > > delay_fencing(fd, start_type); > >- while ((cd = ccs_connect()) < 0) >- sleep(1); >- > while (!list_empty(&fd->victims)) { > node = list_entry(fd->victims.next, fd_node_t, list); > >@@ -386,7 +382,7 @@ > log_debug("fencing node %s", node->name); > syslog(LOG_INFO, "fencing node \"%s\"", node->name); > >- error = dispatch_fence_agent(cd, node->name); >+ error = dispatch_fence_agent(node->name, 0); > > syslog(LOG_INFO, "fence \"%s\" %s", node->name, > error ? "failed" : "success"); >@@ -412,8 +408,6 @@ > } > close_override(&override, comline.override_path); > } >- >- ccs_disconnect(cd); > } > > static void add_victims(fd_t *fd, int start_type, int member_count, >diff -burN cman-2.0.73/fence/fence_node/fence_node.c cman-2.0.73-mceci/fence/fence_node/fence_node.c >--- cman-2.0.73/fence/fence_node/fence_node.c 2006-12-01 19:17:06.000000000 +0000 >+++ cman-2.0.73-mceci/fence/fence_node/fence_node.c 2007-10-26 17:26:49.000000000 +0100 >@@ -34,7 +34,7 @@ > static char *prog_name; > static int force; > >-int dispatch_fence_agent(int cd, char *victim); >+int dispatch_fence_agent(char *victim, int force); > > static void print_usage(void) > { >@@ -111,12 +111,11 @@ > > openlog("fence_node", LOG_PID, LOG_USER); > >- if (cd < 0) { >- syslog(LOG_ERR, "cannot connect to ccs %d\n", cd); >- goto fail; >- } >+ if (force) >+ error = dispatch_fence_agent(victim, 1); >+ else >+ error = dispatch_fence_agent(victim, 0); > >- error = dispatch_fence_agent(cd, victim); > if (error) > goto fail_ccs;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 354421
: 239311