From mboxrd@z Thu Jan 1 00:00:00 1970 From: rmccabe@sourceware.org Date: 2 Nov 2006 20:58:48 -0000 Subject: [Cluster-devel] conga/luci/site/luci/Extensions cluster_adapte ... Message-ID: <20061102205848.31841.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit CVSROOT: /cvs/cluster Module name: conga Changes by: rmccabe at sourceware.org 2006-11-02 20:58:48 Modified files: luci/site/luci/Extensions: cluster_adapters.py Log message: use the host data from rc.hostname(), not rc.system_info() when deploying a cluster (it shouldn't matter, since we force the user to enter something sensible to begin with). Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&r1=1.138&r2=1.139 --- conga/luci/site/luci/Extensions/cluster_adapters.py 2006/11/02 20:45:18 1.138 +++ conga/luci/site/luci/Extensions/cluster_adapters.py 2006/11/02 20:58:48 1.139 @@ -188,7 +188,7 @@ batchNode = createClusterBatch(cluster_os, clusterName, clusterName, - map(lambda x: x['ricci_host'], nodeList), + map(lambda x: x['host'], nodeList), True, True, enable_storage, @@ -213,10 +213,10 @@ for i in nodeList: success = True try: - rc = RicciCommunicator(i['ricci_host']) + rc = RicciCommunicator(i['host']) except RicciError, e: luci_log.debug('Unable to connect to the ricci agent on %s: %s'\ - % (i['ricci_host'], str(e))) + % (i['host'], str(e))) success = False except: success = False @@ -224,14 +224,14 @@ if success == True: try: resultNode = rc.process_batch(batchNode, async=True) - batch_id_map[i['ricci_host']] = resultNode.getAttribute('batch_id') + batch_id_map[i['host']] = resultNode.getAttribute('batch_id') except: success = False if not success: nodeUnauth(nodeList) cluster_properties['isComplete'] = False - errors.append('An error occurred while attempting to add cluster node \"' + i['ricci_host'] + '\"') + errors.append('An error occurred while attempting to add cluster node \"' + i['host'] + '\"') return (False, {'errors': errors, 'requestResults':cluster_properties }) buildClusterCreateFlags(self, batch_id_map, clusterName) @@ -346,7 +346,7 @@ clunode['errors'] = True nodeUnauth(nodeList) cluster_properties['isComplete'] = False - errors.append('Unable to initiate node creation for host \"' + clunode['ricci_host'] + '\"') + errors.append('Unable to initiate node creation for host \"' + clunode['host'] + '\"') if not cluster_properties['isComplete']: return (False, {'errors': errors, 'requestResults': cluster_properties}) @@ -363,25 +363,25 @@ clunode = nodeList[i] success = True try: - rc = RicciCommunicator(clunode['ricci_host']) + rc = RicciCommunicator(clunode['host']) except: - luci_log.info('Unable to connect to the ricci daemon on host ' + clunode['ricci_host']) + luci_log.info('Unable to connect to the ricci daemon on host ' + clunode['host']) success = False if success: try: resultNode = rc.process_batch(batchNode, async=True) - batch_id_map[clunode['ricci_host']] = resultNode.getAttribute('batch_id') + batch_id_map[clunode['host']] = resultNode.getAttribute('batch_id') except: success = False if not success: nodeUnauth(nodeList) cluster_properties['isComplete'] = False - errors.append('An error occurred while attempting to add cluster node \"' + clunode['ricci_host'] + '\"') + errors.append('An error occurred while attempting to add cluster node \"' + clunode['host'] + '\"') return (False, {'errors': errors, 'requestResults': cluster_properties}) - messages.append('Cluster join initiated for host \"' + clunode['ricci_host'] + '\"') + messages.append('Cluster join initiated for host \"' + clunode['host'] + '\"') buildClusterCreateFlags(self, batch_id_map, clusterName) return (True, {'errors': errors, 'messages': messages})