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 278351 Details for
Bug 318361
cman needs to include qdisk votes in expected votes display
[?]
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
qdevinfo.patch (text/plain), 5.13 KB, created by
Christine Caulfield
on 2007-12-05 14:32:28 UTC
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Christine Caulfield
Created:
2007-12-05 14:32:28 UTC
Size:
5.13 KB
patch
obsolete
>Index: cman_tool/main.c >=================================================================== >RCS file: /cvs/cluster/cluster/cman/cman_tool/main.c,v >retrieving revision 1.60 >diff -u -p -r1.60 main.c >--- cman_tool/main.c 29 Nov 2007 11:19:12 -0000 1.60 >+++ cman_tool/main.c 5 Dec 2007 14:28:38 -0000 >@@ -201,6 +201,7 @@ static void show_status(void) > char info_buf[PIPE_BUF]; > char tmpbuf[1024]; > cman_extra_info_t *einfo = (cman_extra_info_t *)info_buf; >+ cman_qdev_info qinfo; > int quorate; > int i; > int j; >@@ -228,6 +229,8 @@ static void show_status(void) > einfo->ei_node_state)); > printf("Nodes: %d\n", einfo->ei_members); > printf("Expected votes: %d\n", einfo->ei_expected_votes); >+ if (cman_get_quorum_device(h, &qinfo) == 0 && qinfo.qi_state == 1) >+ printf("Quorum device votes: %d\n", qinfo.qi_votes); > printf("Total votes: %d\n", einfo->ei_total_votes); > > printf("Quorum: %d %s\n", einfo->ei_quorum, quorate?" ":"Activity blocked"); >Index: daemon/cnxman-socket.h >=================================================================== >RCS file: /cvs/cluster/cluster/cman/daemon/cnxman-socket.h,v >retrieving revision 1.20 >diff -u -p -r1.20 cnxman-socket.h >--- daemon/cnxman-socket.h 5 Nov 2007 15:15:53 -0000 1.20 >+++ daemon/cnxman-socket.h 5 Dec 2007 14:28:38 -0000 >@@ -54,6 +54,7 @@ > #define CMAN_CMD_STOP_CONFCHG 0x000000c1 > #define CMAN_CMD_SET_DIRTY 0x800000c2 > #define CMAN_CMD_SET_DEBUGLOG 0x800000c3 >+#define CMAN_CMD_GET_QUORUMDEV 0x000000c4 > > #define CMAN_CMD_DATA 0x00000100 > #define CMAN_CMD_BIND 0x00000101 >@@ -256,6 +257,12 @@ struct cl_fence_info { > char fence_agent[MAX_FENCE_AGENT_NAME_LEN]; > }; > >+struct cl_qdev_info { >+ char name[MAX_CLUSTER_MEMBER_NAME_LEN]; >+ int state; >+ int votes; >+}; >+ > /* Commands to the barrier cmd */ > #define BARRIER_CMD_REGISTER 1 > #define BARRIER_CMD_CHANGE 2 >Index: daemon/commands.c >=================================================================== >RCS file: /cvs/cluster/cluster/cman/daemon/commands.c,v >retrieving revision 1.76 >diff -u -p -r1.76 commands.c >--- daemon/commands.c 29 Nov 2007 11:19:12 -0000 1.76 >+++ daemon/commands.c 5 Dec 2007 14:28:38 -0000 >@@ -1024,6 +1024,21 @@ static int do_cmd_unregister_quorum_devi > return 0; > } > >+static int do_cmd_get_quorum_device(char *cmdbuf, char *retbuf, int *retlen) >+{ >+ struct cl_qdev_info *qdi = (struct cl_qdev_info *)retbuf; >+ >+ if (!quorum_device) >+ return -EINVAL; >+ >+ strcpy(qdi->name, quorum_device->name); >+ qdi->state = (quorum_device->state == NODESTATE_MEMBER); >+ qdi->votes = quorum_device->votes; >+ *retlen = sizeof(struct cl_qdev_info); >+ >+ return 0; >+} >+ > static void ccsd_timer_fn(void *arg) > { > int ccs_err; >@@ -1276,6 +1291,10 @@ int process_command(struct connection *c > err = do_cmd_get_cluster(cmdbuf, outbuf+offset, retlen); > break; > >+ case CMAN_CMD_GET_QUORUMDEV: >+ err = do_cmd_get_quorum_device(cmdbuf, outbuf+offset, retlen); >+ break; >+ > case CMAN_CMD_GETEXTRAINFO: > err = do_cmd_get_extrainfo(cmdbuf, retbuf, retsize, retlen, offset); > break; >Index: lib/libcman.c >=================================================================== >RCS file: /cvs/cluster/cluster/cman/lib/libcman.c,v >retrieving revision 1.39 >diff -u -p -r1.39 libcman.c >--- lib/libcman.c 9 Nov 2007 12:51:58 -0000 1.39 >+++ lib/libcman.c 5 Dec 2007 14:28:38 -0000 >@@ -1037,6 +1037,22 @@ int cman_poll_quorum_device(cman_handle_ > return info_call(h, CMAN_CMD_POLL_QUORUMDEV, &isavailable, sizeof(int), NULL, 0); > } > >+int cman_get_quorum_device(cman_handle_t handle, struct cman_qdev_info *info) >+{ >+ struct cman_handle *h = (struct cman_handle *)handle; >+ int ret; >+ struct cl_qdev_info q; >+ VALIDATE_HANDLE(h); >+ >+ ret = info_call(h, CMAN_CMD_GET_QUORUMDEV, NULL, 0, &q, sizeof(q)); >+ if (!ret) { >+ strcpy(info->qi_name, q.name); >+ info->qi_state = q.state; >+ info->qi_votes = q.votes; >+ } >+ return ret; >+} >+ > int cman_get_fenceinfo(cman_handle_t handle, int nodeid, uint64_t *time, int *fenced, char *agent) > { > struct cman_handle *h = (struct cman_handle *)handle; >Index: lib/libcman.h >=================================================================== >RCS file: /cvs/cluster/cluster/cman/lib/libcman.h,v >retrieving revision 1.37 >diff -u -p -r1.37 libcman.h >--- lib/libcman.h 9 Nov 2007 12:51:58 -0000 1.37 >+++ lib/libcman.h 5 Dec 2007 14:28:38 -0000 >@@ -176,6 +176,13 @@ typedef struct cman_extra_info { > First batch is the multicast address list */ > } cman_extra_info_t; > >+/* Quorum device info, returned from cman_get_quorum_device() */ >+typedef struct cman_qdev_info { >+ char qi_name[CMAN_MAX_NODENAME_LEN+1]; >+ int qi_state; >+ int qi_votes; >+} cman_qdev_info; >+ > /* > * NOTE: Apart from cman_replyto_shutdown(), you must not > * call other cman_* functions while in these two callbacks: >@@ -394,6 +401,7 @@ int cman_barrier_delete(cman_handle_t ha > int cman_register_quorum_device(cman_handle_t handle, char *name, int votes); > int cman_unregister_quorum_device(cman_handle_t handle); > int cman_poll_quorum_device(cman_handle_t handle, int isavailable); >+int cman_get_quorum_device(cman_handle_t handle, struct cman_qdev_info *info); > > /* > * Sets the dirty bit inside cman. This indicates that the node has
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 318361
: 278351 |
294359