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 161864 Details for
Bug 251966
merge of openais partitions and disallowed cman nodes
[?]
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 to implement 'dirty' bit
dirty.patch (text/plain), 7.67 KB, created by
Christine Caulfield
on 2007-08-20 12:08:18 UTC
(
hide
)
Description:
Patch to implement 'dirty' bit
Filename:
MIME Type:
Creator:
Christine Caulfield
Created:
2007-08-20 12:08:18 UTC
Size:
7.67 KB
patch
obsolete
>Index: cman/cman_tool/main.c >=================================================================== >RCS file: /cvs/cluster/cluster/cman/cman_tool/main.c,v >retrieving revision 1.51.2.1 >diff -u -p -r1.51.2.1 main.c >--- cman/cman_tool/main.c 19 Feb 2007 14:05:04 -0000 1.51.2.1 >+++ cman/cman_tool/main.c 20 Aug 2007 09:11:43 -0000 >@@ -235,6 +235,8 @@ static void show_status(void) > printf(" Error"); > if (einfo->ei_flags & CMAN_EXTRA_FLAG_DISALLOWED) > printf(" DisallowedNodes"); >+ if (einfo->ei_flags & CMAN_EXTRA_FLAG_DIRTY) >+ printf(" Dirty"); > printf(" \n"); > > printf("Ports Bound: "); >Index: cman/daemon/cnxman-private.h >=================================================================== >RCS file: /cvs/cluster/cluster/cman/daemon/cnxman-private.h,v >retrieving revision 1.26 >diff -u -p -r1.26 cnxman-private.h >--- cman/daemon/cnxman-private.h 3 Nov 2006 15:07:52 -0000 1.26 >+++ cman/daemon/cnxman-private.h 20 Aug 2007 09:11:43 -0000 >@@ -18,8 +18,8 @@ > > /* Protocol Version triplet */ > #define CNXMAN_MAJOR_VERSION 6 >-#define CNXMAN_MINOR_VERSION 0 >-#define CNXMAN_PATCH_VERSION 1 >+#define CNXMAN_MINOR_VERSION 1 >+#define CNXMAN_PATCH_VERSION 0 > > /* How we announce ourself in console events */ > #define CMAN_NAME "CMAN" >@@ -147,11 +147,14 @@ struct connection > NODE_FLAGS_FENCED - This node has been fenced since it last went down. > NODE_FLAGS_FENCEDWHILEUP - This node was fenced manually (probably). > NODE_FLAGS_SEESDISALLOWED - Only set in a transition message >+ NODE_FLAGS_DIRTY - This node has internal state and must not join >+ a cluster that also has state. > */ > #define NODE_FLAGS_BEENDOWN 1 > #define NODE_FLAGS_FENCED 2 > #define NODE_FLAGS_FENCEDWHILEUP 4 > #define NODE_FLAGS_SEESDISALLOWED 8 >+#define NODE_FLAGS_DIRTY 16 > > /* There's one of these for each node in the cluster */ > struct cluster_node { >Index: cman/daemon/cnxman-socket.h >=================================================================== >RCS file: /cvs/cluster/cluster/cman/daemon/cnxman-socket.h,v >retrieving revision 1.17 >diff -u -p -r1.17 cnxman-socket.h >--- cman/daemon/cnxman-socket.h 5 Oct 2006 07:48:33 -0000 1.17 >+++ cman/daemon/cnxman-socket.h 20 Aug 2007 09:11:43 -0000 >@@ -52,6 +52,7 @@ > #define CMAN_CMD_GET_NODEADDRS 0x000000bf > #define CMAN_CMD_START_CONFCHG 0x000000c0 > #define CMAN_CMD_STOP_CONFCHG 0x000000c1 >+#define CMAN_CMD_SET_DIRTY 0x800000c2 > > #define CMAN_CMD_DATA 0x00000100 > #define CMAN_CMD_BIND 0x00000101 >@@ -167,6 +168,7 @@ struct sock_confchg_message { > #define CMAN_EXTRA_FLAG_ERROR 2 > #define CMAN_EXTRA_FLAG_SHUTDOWN 4 > #define CMAN_EXTRA_FLAG_UNCOUNTED 8 >+#define CMAN_EXTRA_FLAG_DIRTY 16 > > struct cl_extra_info { > int node_state; >Index: cman/daemon/commands.c >=================================================================== >RCS file: /cvs/cluster/cluster/cman/daemon/commands.c,v >retrieving revision 1.55.2.8 >diff -u -p -r1.55.2.8 commands.c >--- cman/daemon/commands.c 26 Jun 2007 12:29:17 -0000 1.55.2.8 >+++ cman/daemon/commands.c 20 Aug 2007 09:11:43 -0000 >@@ -501,6 +501,8 @@ static int do_cmd_get_extrainfo(char *cm > einfo->flags |= CMAN_EXTRA_FLAG_SHUTDOWN; > if (uncounted) > einfo->flags |= CMAN_EXTRA_FLAG_UNCOUNTED; >+ if (us->flags & NODE_FLAGS_DIRTY) >+ einfo->flags |= CMAN_EXTRA_FLAG_DIRTY; > > ptr = einfo->addresses; > for (i=0; i<num_interfaces; i++) { >@@ -1206,6 +1208,10 @@ int process_command(struct connection *c > err = 0; > break; > >+ case CMAN_CMD_SET_DIRTY: >+ us->flags |= NODE_FLAGS_DIRTY; >+ break; >+ > case CMAN_CMD_START_CONFCHG: > con->confchg = 1; > err = 0; >@@ -1705,7 +1711,27 @@ static void do_process_transition(int no > node = find_node_by_nodeid(nodeid); > assert(node); > >- /* This is the killer. If the join_time of the node matches that already stored AND >+ /* Newer nodes 6.1.0 onwards, set the DIRTY flag if they have state. If the new node has been down >+ and has state then we mark it disallowed because we cannot merge stateful nodes */ >+ if (msg->flags & NODE_FLAGS_DIRTY && node->flags & NODE_FLAGS_BEENDOWN) { >+ /* Don't duplicate messages */ >+ if (node->state != NODESTATE_AISONLY) { >+ if (cluster_is_quorate) { >+ P_MEMB("Killing node %s because it has rejoined the cluster with existing state", node->name); >+ log_printf(LOG_CRIT, "Killing node %s because it has rejoined the cluster with existing state", node->name); >+ node->state = NODESTATE_AISONLY; >+ send_kill(nodeid, CLUSTER_KILL_REJOIN); >+ } >+ else { >+ P_MEMB("Node %s not joined to cman because it has existing state", node->name); >+ log_printf(LOG_CRIT, "Node %s not joined to cman because it has existing state", node->name); >+ node->state = NODESTATE_AISONLY; >+ } >+ } >+ return; >+ } >+ >+ /* This is for older nodes. If the join_time of the node matches that already stored AND > the node has been down, then we kill it as this must be a rejoin */ > if (msg->join_time == node->cman_join_time && node->flags & NODE_FLAGS_BEENDOWN) { > /* Don't duplicate messages */ >Index: cman/lib/libcman.c >=================================================================== >RCS file: /cvs/cluster/cluster/cman/lib/libcman.c,v >retrieving revision 1.30.2.3 >diff -u -p -r1.30.2.3 libcman.c >--- cman/lib/libcman.c 5 Jan 2007 10:31:33 -0000 1.30.2.3 >+++ cman/lib/libcman.c 20 Aug 2007 09:11:43 -0000 >@@ -1,7 +1,7 @@ > /****************************************************************************** > ******************************************************************************* > ** >-** Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. >+** Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved. > ** > ** This library is free software; you can redistribute it and/or > ** modify it under the terms of the GNU Lesser General Public >@@ -978,6 +978,14 @@ int cman_shutdown(cman_handle_t handle, > return info_call(h, CMAN_CMD_TRY_SHUTDOWN, &flags, sizeof(int), NULL, 0); > } > >+int cman_set_dirty(cman_handle_t handle) >+{ >+ struct cman_handle *h = (struct cman_handle *)handle; >+ VALIDATE_HANDLE(h); >+ >+ return info_call(h, CMAN_CMD_SET_DIRTY, NULL, 0, NULL, 0); >+} >+ > int cman_replyto_shutdown(cman_handle_t handle, int yesno) > { > struct cman_handle *h = (struct cman_handle *)handle; >Index: cman/lib/libcman.h >=================================================================== >RCS file: /cvs/cluster/cluster/cman/lib/libcman.h,v >retrieving revision 1.29 >diff -u -p -r1.29 libcman.h >--- cman/lib/libcman.h 5 Oct 2006 07:48:33 -0000 1.29 >+++ cman/lib/libcman.h 20 Aug 2007 09:11:44 -0000 >@@ -1,7 +1,7 @@ > /****************************************************************************** > ******************************************************************************* > ** >-** Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. >+** Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved. > ** > ** This library is free software; you can redistribute it and/or > ** modify it under the terms of the GNU Lesser General Public >@@ -154,6 +154,7 @@ typedef struct cman_cluster > #define CMAN_EXTRA_FLAG_ERROR 2 > #define CMAN_EXTRA_FLAG_SHUTDOWN 4 > #define CMAN_EXTRA_FLAG_DISALLOWED 8 >+#define CMAN_EXTRA_FLAG_DIRTY 16 > > typedef struct cman_extra_info { > int ei_node_state; >@@ -388,4 +389,12 @@ int cman_register_quorum_device(cman_han > int cman_unregister_quorum_device(cman_handle_t handle); > int cman_poll_quorum_device(cman_handle_t handle, int isavailable); > >+/* >+ * Sets the dirty bit inside cman. This indicates that the node has >+ * some internal 'state' (eg in a daemon, filesystem or lock manager) >+ * and cannot merge with another cluster that already has state. >+ * This cannot be reset. >+ */ >+int cman_set_dirty(cman_handle_t handle); >+ > #endif
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 251966
:
161197
|
161199
|
161201
| 161864 |
173681
|
173701
|
173721
|
173741
|
173901
|
173961