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 314338 Details for
Bug 459127
fenced config option to skip nodes with undefined fencing
[?]
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.
proposed patch
fenced-skip-2.patch (text/plain), 3.90 KB, created by
David Teigland
on 2008-08-14 18:02:21 UTC
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
David Teigland
Created:
2008-08-14 18:02:21 UTC
Size:
3.90 KB
patch
obsolete
>Author: David Teigland <teigland@redhat.com> >Date: Thu Aug 14 11:35:51 2008 -0500 > > fenced: add skip_undefined option > > bz 459127 > > New fenced config option <fence_daemon skip_undefined="1"/> > would cause fenced to not do startup fencing of nodes with zero > defined fence methods. > > The primary use for this option would be asymmetric cluster configs > (http://sources.redhat.com/cluster/wiki/asymmetric_cluster_config) > where client/small/spectator nodes do not join the fence domain > and have no fencing configured. The problem we have is that even with > no fencing configured, and not joining the fence domain, other > nodes may attempt (and fail) to fence these client nodes during > startup fencing. > > Signed-off-by: David Teigland <teigland@redhat.com> > >diff --git a/fence/fenced/agent.c b/fence/fenced/agent.c >index 66ae77a..e3aab9a 100644 >--- a/fence/fenced/agent.c >+++ b/fence/fenced/agent.c >@@ -219,7 +219,7 @@ static int get_device(int cd, char *victim, char *method, int d, char **device) > return error; > } > >-static int count_methods(int cd, char *victim) >+int count_methods(int cd, char *victim) > { > char path[256], *name; > int error, i; >diff --git a/fence/fenced/fd.h b/fence/fenced/fd.h >index 0b78d19..c4204c8 100644 >--- a/fence/fenced/fd.h >+++ b/fence/fenced/fd.h >@@ -53,6 +53,7 @@ > #define DEFAULT_POST_JOIN_DELAY 6 > #define DEFAULT_POST_FAIL_DELAY 0 > #define DEFAULT_CLEAN_START 0 >+#define DEFAULT_SKIP_UNDEFINED 0 > #define DEFAULT_OVERRIDE_PATH "/var/run/cluster/fenced_override" > #define FENCED_SOCK_PATH "fenced_socket" > >@@ -134,9 +135,11 @@ struct commandline > int post_fail_delay; > char *override_path; > int8_t clean_start; >+ int8_t skip_undefined; > int8_t post_join_delay_opt; > int8_t post_fail_delay_opt; > int8_t clean_start_opt; >+ int8_t skip_undefined_opt; > int8_t override_path_opt; > }; > >@@ -177,6 +180,7 @@ void do_recovery_done(fd_t *fd); > > /* agent.c */ > int dispatch_fence_agent(char *victim, int force); >+int count_methods(int cd, char *victim); > > /* group.c */ > int setup_groupd(void); >diff --git a/fence/fenced/main.c b/fence/fenced/main.c >index c3d1720..65c8a40 100644 >--- a/fence/fenced/main.c >+++ b/fence/fenced/main.c >@@ -15,7 +15,7 @@ > #include "ccs.h" > #include "copyright.cf" > >-#define OPTION_STRING ("cj:f:Dn:O:hVSw") >+#define OPTION_STRING ("cj:f:Dn:O:hVSws") > #define LOCKFILE_NAME "/var/run/fenced.pid" > > struct client { >@@ -117,6 +117,20 @@ static int setup_ccs(fd_t *fd) > free(str); > } > >+ if (comline.skip_undefined_opt == FALSE) { >+ str = NULL; >+ memset(path, 0, 256); >+ sprintf(path, "/cluster/fence_daemon/@skip_undefined"); >+ >+ error = ccs_get(cd, path, &str); >+ if (!error) >+ comline.skip_undefined = atoi(str); >+ else >+ comline.skip_undefined = DEFAULT_SKIP_UNDEFINED; >+ if (str) >+ free(str); >+ } >+ > if (comline.post_join_delay_opt == FALSE) { > str = NULL; > memset(path, 0, 256); >@@ -179,6 +193,13 @@ static int setup_ccs(fd_t *fd) > if (error || !name) > break; > >+ num_methods = count_methods(cd, name); >+ >+ if (comline.skip_undefined && !num_methods) { >+ log_debug("skip %s with zero methods", name); >+ continue; >+ } >+ > add_complete_node(fd, 0, name); > free(name); > count++; >@@ -518,6 +539,7 @@ static void print_usage(void) > printf("Options:\n"); > printf("\n"); > printf(" -c All nodes are in a clean state to start\n"); >+ printf(" -s Skip startup fencing of nodes with no defined fence methods\n"); > printf(" -j <secs> Post-join fencing delay (default %d)\n", > DEFAULT_POST_JOIN_DELAY); > printf(" -f <secs> Post-fail fencing delay (default %d)\n", >@@ -587,6 +609,11 @@ static void decode_arguments(int argc, char **argv, commandline_t *comline) > comline->clean_start_opt = TRUE; > break; > >+ case 's': >+ comline->skip_undefined = 1; >+ comline->skip_undefined_opt = TRUE; >+ break; >+ > case 'j': > comline->post_join_delay = atoi(optarg); > comline->post_join_delay_opt = TRUE;
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 Raw
Actions:
View
Attachments on
bug 459127
:
314331
| 314338