Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Cluster Development (http://www.linux-archive.org/cluster-development/)
-   -   qdisk: Assume 1 vote if not specified in cluster.conf (http://www.linux-archive.org/cluster-development/475576-qdisk-assume-1-vote-if-not-specified-cluster-conf.html)

Lon Hohberger 01-12-2011 02:01 PM

qdisk: Assume 1 vote if not specified in cluster.conf
 
This is a clean cherry-pick in to the RHEL6 branch.

Resolves: rhbz#663433

Signed-off-by: Lon Hohberger <lhh@redhat.com>
---
cman/qdisk/main.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/cman/qdisk/main.c b/cman/qdisk/main.c
index 78dc3f0..73138b2 100644
--- a/cman/qdisk/main.c
+++ b/cman/qdisk/main.c
@@ -1386,10 +1386,11 @@ auto_qdisk_votes(int desc)
"/cluster/clusternodes/clusternode[%d]/@votes", ret);

name = NULL;
- if (ccs_get(desc, buf, &name) != 0)
- break;
+ if (ccs_get(desc, buf, &name) == 0)
+ votes = atoi(name);
+ else
+ votes = 1;

- votes=atoi(name);
if (votes != 1) {
free(name);

--
1.7.1.1

Lon Hohberger 01-12-2011 02:09 PM

qdisk: Assume 1 vote if not specified in cluster.conf
 
This is a clean cherry-pick in to the RHEL6 branch.

Resolves: rhbz#663433

Signed-off-by: Lon Hohberger <lhh@redhat.com>
---
cman/qdisk/main.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/cman/qdisk/main.c b/cman/qdisk/main.c
index 78dc3f0..73138b2 100644
--- a/cman/qdisk/main.c
+++ b/cman/qdisk/main.c
@@ -1386,10 +1386,11 @@ auto_qdisk_votes(int desc)
"/cluster/clusternodes/clusternode[%d]/@votes", ret);

name = NULL;
- if (ccs_get(desc, buf, &name) != 0)
- break;
+ if (ccs_get(desc, buf, &name) == 0)
+ votes = atoi(name);
+ else
+ votes = 1;

- votes=atoi(name);
if (votes != 1) {
free(name);

--
1.7.1.1


All times are GMT. The time now is 01:45 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.