This is the mail archive of the
cluster-cvs@sourceware.org
mailing list for the cluster.
cluster: STABLE3 - cman: Allow cman_tool version -r0 to update to anarbitrary version
- From: Christine Caulfield <chrissie at fedoraproject dot org>
- To: cluster-cvs-relay at redhat dot com
- Date: Mon, 19 Jan 2009 14:02:56 +0000 (UTC)
- Subject: cluster: STABLE3 - cman: Allow cman_tool version -r0 to update to anarbitrary version
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=5e2fdf75cc2d156ec6e0bb91645fccabfdabdaeb
Commit: 5e2fdf75cc2d156ec6e0bb91645fccabfdabdaeb
Parent: 7ae5969b6d0595378cf5ee85ee998663c17698f7
Author: Christine Caulfield <ccaulfie@redhat.com>
AuthorDate: Mon Jan 19 14:01:09 2009 +0000
Committer: Christine Caulfield <ccaulfie@redhat.com>
CommitterDate: Mon Jan 19 14:01:09 2009 +0000
cman: Allow cman_tool version -r0 to update to an arbitrary version
It's a bit of a nuisance having to know the latest version of
cluster.conf.
Now you don't!
cman_tool version -r0 will cause cman to re-read the configuration and
use the version it finds there.
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
---
cman/cman_tool/main.c | 2 +-
cman/daemon/commands.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/cman/cman_tool/main.c b/cman/cman_tool/main.c
index 4ed6d72..21b7d72 100644
--- a/cman/cman_tool/main.c
+++ b/cman/cman_tool/main.c
@@ -662,7 +662,7 @@ static void version(commandline_t *comline)
if ((result = cman_get_version(h, &ver)))
die("can't get version: %s", cman_error(errno));
- if (!comline->config_version) {
+ if (!comline->config_version_opt) {
printf("%d.%d.%d config %d\n", ver.cv_major, ver.cv_minor, ver.cv_patch,
ver.cv_config);
goto out;
diff --git a/cman/daemon/commands.c b/cman/daemon/commands.c
index c1394d8..27e18cd 100644
--- a/cman/daemon/commands.c
+++ b/cman/daemon/commands.c
@@ -1147,7 +1147,7 @@ static int reread_config(int new_version)
}
/* Still too old?? */
- if (config_version < wanted_config_version) {
+ if (new_version && config_version < wanted_config_version) {
log_printf(LOG_ERR, "Can't get updated config version %d, config file is version %d.\n",
wanted_config_version, config_version);
}