conga ./conga.spec.in.in luci/site/luci/Extens ...
CVSROOT: /cvs/cluster
Module name: conga
Branch: RHEL5
Changes by: rmccabe at sourceware.org 2008-09-17 06:29:55
Modified files:
. : conga.spec.in.in
luci/site/luci/Extensions: RicciQueries.py cluster_adapters.py
Log message:
Fix bz459623
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/conga.spec.in.in.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.45.2.101&r2=1.45.2.102
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/RicciQueries.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.4.10&r2=1.1.4.11
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.120.2.46&r2=1.120.2.47
conga.spec.in.in +1 -0
@@ -315,6 +315,7 @@ * Wed Aug 27 2008 Ryan McCabe <[email protected]> 0.12.1-4 - Fix bz459562 (charset configuration fix for luci) - Fix bz459469 (An unknown device type was given: "gnbd.") +- Fix bz459623 (Conga error adding new node to existing cluster) * Thu Aug 07 2008 Ryan McCabe <[email protected]> 0.12.1-3 - More fixes for bz429350
luci/site/luci/Extensions/RicciQueries.py +26 -4
@@ -6,12 +6,10 @@ # Free Software Foundation. from xml.dom import minidom -from ricci_communicator import RicciCommunicator +from ricci_communicator import RicciCommunicator, batch_status from LuciSyslog import get_logger from conga_constants import LUCI_DEBUG_MODE - - luci_log = get_logger() def addClusterNodeBatch(cluster_name,
@@ -115,7 +113,7 @@ batch.append('<module name="cluster">') batch.append('<request API_version="1.0">') batch.append('<function_call name="start_node">') - batch.append('<var mutable="false" name="enable_services" type="boolean" value="true"/>"') + batch.append('<var mutable="false" name="enable_services" type="boolean" value="true"/>') batch.append('</function_call>') batch.append('</request>') batch.append('</module>')
@@ -342,6 +340,30 @@ ricci_xml = rc.batch_run(batch_str) return batchAttemptResult(ricci_xml) +def setClusterConfSync(rc, clusterconf, propagate=True): + if propagate is True: + propg = 'true' + else: + propg = 'false' + + conf = str(clusterconf).replace('<?xml version="1.0"?>', '') + conf = conf.replace('<?xml version="1.0" ?>', '') + conf = conf.replace('<? xml version="1.0"?>', '') + conf = conf.replace('<? xml version="1.0" ?>', '') + + batch_str = '<module name="cluster"><request API_version="1.0"><function_call name="set_cluster.conf"><var type="boolean" name="propagate" mutable="false" value="%s"/><var type="xml" mutable="false" name="cluster.conf">%s</var></function_call></request></module>' % (propg, conf) + + ricci_xml = rc.batch_run(batch_str, async=False) + if not ricci_xml: + return False + batch_xml = ricci_xml.getElementsByTagName('batch') + if not batch_xml: + return None + (num, total) = batch_status(batch_xml[0]) + if num == total: + return True + return False + def getNodeLogs(rc): from time import time, ctime
luci/site/luci/Extensions/cluster_adapters.py +24 -59
109 lines not on this page · raw message