commit 777f274454ef3558da8ca731fdd6eae96bfb797f
Author: Jan Pokorný <jpokorny(a)redhat.com>
Date: Wed Aug 14 12:00:00 2013 +0200
Fix cluster_version mismatch upon adding 2+ nodes (rhbz#978479)
Resolves: rhbz#978479
Reported-by: Radek Steiger <rsteiger(a)redhat.com>
Signed-off-by: Jan Pokorný <jpokorny(a)redhat.com>
luci/lib/ricci_queries.py | 5 ++---
luci/validation/validate_create_cluster_form.py | 9 +++++----
2 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/luci/lib/ricci_queries.py b/luci/lib/ricci_queries.py
index 1610667..33dbbad 100644
--- a/luci/lib/ricci_queries.py
+++ b/luci/lib/ricci_queries.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2010 Red Hat, Inc.
+# Copyright 2013 Red Hat, Inc.
#
# This program is free software; you can redistribute
# it and/or modify it under the terms of version 2 of the
@@ -12,7 +12,7 @@ from ricci_communicator import batch_status
class RicciQueriesError(Exception):
pass
-def addClusterNodeBatch(model,
+def addClusterNodeBatch(clusterconf,
install_base,
install_services,
install_shared_storage,
@@ -20,7 +20,6 @@ def addClusterNodeBatch(model,
reboot_nodes=False):
batch = list()
- clusterconf = model.exportModelAsString()
conf = clusterconf.replace('<?xml version="1.0"?>', '')
conf = conf.replace('<?xml version="1.0" ?>', '')
conf = conf.replace('<? xml version="1.0"?>', '')
diff --git a/luci/validation/validate_create_cluster_form.py
b/luci/validation/validate_create_cluster_form.py
index 3d7ae2f..76d0342 100644
--- a/luci/validation/validate_create_cluster_form.py
+++ b/luci/validation/validate_create_cluster_form.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2011 Red Hat, Inc.
+# Copyright 2013 Red Hat, Inc.
#
# This program is free software; you can redistribute
# it and/or modify it under the terms of version 2 of the
@@ -323,15 +323,16 @@ def validate_node_add_form(model, db_obj, **kw):
% (cluster_name, ', '.join(errors)), 'error')
DBSession.rollback()
return
-
+
for i in node_db_obj.values():
DBSession.add(i)
db_obj.nodes.extend(node_db_obj.values())
host_triples = []
+ clusterconf = model.exportModelAsString()
for n in node_list:
- host_triples.append((n, rq.create_cluster_nodes,
- [ model, enable_storage, download_pkgs, reboot_nodes ]))
+ host_triples.append((n, rq.create_cluster_nodes,
+ [clusterconf, enable_storage, download_pkgs, reboot_nodes]))
ret = send_batch_parallel(host_triples, 10)
for i in ret.iterkeys():
Show replies by date