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 294359 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]
Updated patch
qdiskinfo.patch (text/plain), 5.90 KB, created by
Christine Caulfield
on 2008-02-08 14:35:21 UTC
(
hide
)
Description:
Updated patch
Filename:
MIME Type:
Creator:
Christine Caulfield
Created:
2008-02-08 14:35:21 UTC
Size:
5.90 KB
patch
obsolete
>Index: cman_tool/main.c >=================================================================== >RCS file: /cvs/cluster/cluster/cman/cman_tool/main.c,v >retrieving revision 1.51.2.5 >diff -u -p -r1.51.2.5 main.c >--- cman_tool/main.c 12 Oct 2007 18:50:48 -0000 1.51.2.5 >+++ cman_tool/main.c 8 Feb 2008 14:33:52 -0000 >@@ -197,6 +197,7 @@ static void show_status(void) > cman_version_t v; > cman_handle_t h; > cman_node_t node; >+ cman_qdev_info qinfo; > char info_buf[PIPE_BUF]; > char tmpbuf[1024]; > cman_extra_info_t *einfo = (cman_extra_info_t *)info_buf; >@@ -226,7 +227,10 @@ 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 == 2) >+ 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"); > printf("Active subsystems: %d\n", cman_get_subsys_count(h)); > printf("Flags:"); >Index: daemon/cnxman-socket.h >=================================================================== >RCS file: /cvs/cluster/cluster/cman/daemon/cnxman-socket.h,v >retrieving revision 1.17.2.2 >diff -u -p -r1.17.2.2 cnxman-socket.h >--- daemon/cnxman-socket.h 17 Sep 2007 13:48:15 -0000 1.17.2.2 >+++ daemon/cnxman-socket.h 8 Feb 2008 14:33:52 -0000 >@@ -2,7 +2,7 @@ > ******************************************************************************* > ** > ** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. >-** Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. >+** Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved. > ** > ** This copyrighted material is made available to anyone wishing to use, > ** modify, copy, or redistribute it subject to the terms and conditions >@@ -83,6 +83,9 @@ > * transition */ > #define HIGH_PROTECTED_PORT 9 > >+/* Nodeid passed to CMD_GETNODE to return the quorum device info */ >+#define CLUSTER_GETNODE_QUORUMDEV -1 >+ > /* Reasons for leaving the cluster */ > #define CLUSTER_LEAVEFLAG_DOWN 0 /* Normal shutdown */ > #define CLUSTER_LEAVEFLAG_KILLED 1 >Index: daemon/commands.c >=================================================================== >RCS file: /cvs/cluster/cluster/cman/daemon/commands.c,v >retrieving revision 1.55.2.17 >diff -u -p -r1.55.2.17 commands.c >--- daemon/commands.c 3 Jan 2008 16:36:51 -0000 1.55.2.17 >+++ daemon/commands.c 8 Feb 2008 14:33:52 -0000 >@@ -597,13 +597,21 @@ static int do_cmd_get_node(char *cmdbuf, > if (!we_are_a_cluster_member) > return -ENOENT; > >- if (!u_node->name[0]) { >- if (u_node->node_id == 0) >- u_node->node_id = us->node_id; >- node = find_node_by_nodeid(u_node->node_id); >+ if (u_node->node_id == CLUSTER_GETNODE_QUORUMDEV) { >+ if (quorum_device) >+ node = quorum_device; >+ else >+ return -ENOENT; >+ } >+ else { >+ if (!u_node->name[0]) { >+ if (u_node->node_id == 0) >+ u_node->node_id = us->node_id; >+ node = find_node_by_nodeid(u_node->node_id); >+ } >+ else >+ node = find_node_by_name(u_node->name); > } >- else >- node = find_node_by_name(u_node->name); > > if (!node) { > P_MEMB("cmd_get_node failed: id=%d, name='%s'\n", u_node->node_id, u_node->name); >Index: lib/libcman.c >=================================================================== >RCS file: /cvs/cluster/cluster/cman/lib/libcman.c,v >retrieving revision 1.30.2.6 >diff -u -p -r1.30.2.6 libcman.c >--- lib/libcman.c 18 Sep 2007 16:00:56 -0000 1.30.2.6 >+++ lib/libcman.c 8 Feb 2008 14:33:52 -0000 >@@ -1,7 +1,7 @@ > /****************************************************************************** > ******************************************************************************* > ** >-** Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved. >+** Copyright (C) 2004-2008 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 >@@ -1037,6 +1037,23 @@ 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_cluster_node cman_node; >+ VALIDATE_HANDLE(h); >+ >+ cman_node.node_id = CLUSTER_GETNODE_QUORUMDEV; >+ ret = info_call(h, CMAN_CMD_GETNODE, &cman_node, sizeof(cman_node), &cman_node, sizeof(cman_node)); >+ if (!ret) { >+ strcpy(info->qi_name, cman_node.name); >+ info->qi_state = cman_node.state; >+ info->qi_votes = cman_node.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.29.2.2 >diff -u -p -r1.29.2.2 libcman.h >--- lib/libcman.h 17 Sep 2007 13:48:15 -0000 1.29.2.2 >+++ lib/libcman.h 8 Feb 2008 14:33:52 -0000 >@@ -1,7 +1,7 @@ > /****************************************************************************** > ******************************************************************************* > ** >-** Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved. >+** Copyright (C) 2004-2008 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 >@@ -170,6 +170,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:
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