[Cluster-devel] conga ./conga.spec.in.in luci/cluster/form-mac ...

rmccabe at sourceware.org rmccabe at sourceware.org
Mon Jan 26 17:01:24 UTC 2009


CVSROOT:	/cvs/cluster
Module name:	conga
Branch: 	RHEL5
Changes by:	rmccabe at sourceware.org	2009-01-26 17:01:22

Modified files:
	.              : conga.spec.in.in 
	luci/cluster   : form-macros validate_create_gulm.js 
	luci/plone-custom: conga_ajax.js update_hostinfo.js 
	                   validate_auth.js 
	luci/site/luci/Extensions: HelperFunctions.py LuciDB.py 
	                           cluster_adapters.py 

Log message:
	Fix problems that caused MSIE to not work correctly.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/conga.spec.in.in.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.45.2.107&r2=1.45.2.108
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.90.2.37&r2=1.90.2.38
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/validate_create_gulm.js.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.4.4&r2=1.1.4.5
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/plone-custom/conga_ajax.js.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.2.2.3&r2=1.2.2.4
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/plone-custom/update_hostinfo.js.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.2.2&r2=1.1.2.3
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/plone-custom/validate_auth.js.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.2.1&r2=1.1.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/HelperFunctions.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.4.2.8&r2=1.4.2.9
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/LuciDB.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.47&r2=1.120.2.48

--- conga/conga.spec.in.in	2008/09/29 17:11:13	1.45.2.107
+++ conga/conga.spec.in.in	2009/01/26 17:01:19	1.45.2.108
@@ -323,6 +323,11 @@
 
 ###  changelog ###
 %changelog
+* Thu Jan 22 2009 Ryan McCabe <rmccabe at redhat.com> 0.12.2-1
+- Fix bz452704 (Unable to add existing RHEL4 clusters with RHEL5.2 Luci)
+- Fix bz467464 (adding qdisk to existing cluster fails to update cman entry in cluster.conf)
+- Fix bz460038 (Conga fs resource error when editing service)
+
 * Thu Sep 25 2008 Ryan McCabe <rmccabe at redhat.com> 0.12.1-7
 - Fix a typo in the fix for bz459562
 
--- conga/luci/cluster/form-macros	2008/08/04 21:49:30	1.90.2.37
+++ conga/luci/cluster/form-macros	2009/01/26 17:01:21	1.90.2.38
@@ -231,6 +231,7 @@
 	<script type="text/javascript" src="/luci/homebase/validate_cluster_add.js"></script>
 	<script type="text/javascript" src="validate_create_gulm.js"></script>
 	<script type="text/javascript" src="update_hostinfo.js"></script>
+	<script type="text/javascript" src="validate_auth.js"></script>
 	
 	<script type="text/javascript">
 		set_page_title('Luci — cluster — Deploy a cluster');
--- conga/luci/cluster/validate_create_gulm.js	2008/06/13 18:37:46	1.1.4.4
+++ conga/luci/cluster/validate_create_gulm.js	2009/01/26 17:01:21	1.1.4.5
@@ -67,12 +67,16 @@
 function validate_cluster_create(form) {
 	try {
 		if (!form.cluster_os.value) {
-			get_system_info(null, null, 1);
+			var err_div = document.getElementById('errmsgsdiv');
+			var ret_div = document.getElementById('retmsgsdiv');
+
+			validate_auth_form(form, ret_div, err_div);
 		}
 	} catch (e) {
 	}
 
 	if (form.cluster_os.value) {
+		form.pagetype.value = '6';
 		if (form.lockmanager && !form.lockmanager[0].checked) {
 			var errors = check_gulm_lkserv();
 			if (error_dialog(errors))
--- conga/luci/plone-custom/conga_ajax.js	2008/01/23 04:44:31	1.2.2.3
+++ conga/luci/plone-custom/conga_ajax.js	2009/01/26 17:01:21	1.2.2.4
@@ -12,15 +12,24 @@
 function get_xmlhttp_obj() {
 	xmlHttp_object = false;
 
-	if (!xmlHttp_object && typeof XMLHttpRequest != 'undefined') {
+	if (!xmlHttp_object || typeof XMLHttpRequest != 'undefined') {
 		try {
 			xmlHttp_object = new XMLHttpRequest();
+			if (!xmlHttp_object || typeof XMLHttpRequest != 'undefined') {
+				throw "no XMLHttpRequest";
+			}
 		} catch (e0) {
 			try {
 				xmlHttp_object = new ActiveXObject("Msxml2.XMLHTTP");
+				if (!xmlHttp_object || typeof XMLHttpRequest != 'undefined') {
+					throw "no Msxml2.XMLHTTP";
+				}
 			} catch (e) {
 				try {
 					xmlHttp_object = new ActiveXObject("Microsoft.XMLHTTP");
+					if (!xmlHttp_object || typeof XMLHttpRequest != 'undefined') {
+						throw "No Microsoft.XMLHTTP";
+					}
 				} catch (e2) {
 					xmlHttp_object = false;
 				}
--- conga/luci/plone-custom/update_hostinfo.js	2008/06/13 18:37:46	1.1.2.2
+++ conga/luci/plone-custom/update_hostinfo.js	2009/01/26 17:01:21	1.1.2.3
@@ -108,7 +108,7 @@
 			var pwd_elem = document.getElementById('__SYSTEM' + offset + ':Passwd');
 			var fp_elem = document.getElementById('__SYSTEM' + offset + 'Fingerprint');
 			try {
-				cluster_os = cur_node_props['OS'];
+				cluster_os = cur_node_props['os'];
 			} catch (e) {
 			}
 
--- conga/luci/plone-custom/validate_auth.js	2008/01/23 04:44:32	1.1.2.1
+++ conga/luci/plone-custom/validate_auth.js	2009/01/26 17:01:21	1.1.2.2
@@ -11,7 +11,7 @@
 var msg_div_id = null;
 
 function validate_auth_form(form, msgarea_id, errarea_id) {
-	var url = '/luci/cluster?pagetype=1003';
+	var url = '/luci/cluster/index_html?pagetype=1003'
 	var errors = [];
 	var systems_list = get_systems_list(errors);
 
@@ -32,6 +32,7 @@
 
 	msg_div_id = msgarea_id;
 	err_div_id = errarea_id;
+	form.pagetype.value = '1003';
 	initiate_async_post(form, url, validate_auth_callback);
 }
 
@@ -59,18 +60,18 @@
 	try {
 		obj = obj.responseXML.getElementsByTagName('dict')[0];
 	} catch (e) {
-		alert('Received a malformed response from the luci server.');
+		alert('Received a malformed response from the luci server:' + e);
 		return;
 	}
 
 	var elem = obj.getElementsByTagName('dict');
 	var node_props = [];
 	for (var i = 0 ; i < elem.length ; i++) {
+		var cur_node_props = [];
 		var elem_type = elem[i].getAttribute('name');
 		if (elem_type != 'clusternodes') {
 			continue;
 		}
-		var cur_node_props = [];
 		var var_elem = elem[i].getElementsByTagName('var');
 		for (var j = 0 ; j < var_elem.length ; j++) {
 			try {
@@ -81,6 +82,7 @@
 				continue;
 			}
 		}
+
 		try {
 			node_props[cur_node_props['hostname']] = cur_node_props;
 		} catch (e) {
@@ -91,6 +93,7 @@
 	var errors = [];
 	var msgs = [];
 	var systems_list = get_systems_list_offsets(errors);
+	var os_str = null;
 
 	for (var i = 0 ; i < systems_list.length ; i++) {
 		var cur_node_props = node_props[systems_list[i][0]];
@@ -114,6 +117,29 @@
 					has_valid_fp = true;
 				}
 
+				try {
+					os_str = cur_node_props['os'];
+					if (os_str !== null) {
+						var os_in = document.getElementById('cluster_os');
+						if (os_in !== null) {
+							var os_version = 'rhel5';
+							if (os_str.match(/Nahant/)) {
+								var lsdiv = document.getElementById('lockserver_div');
+								if (lsdiv !== null) {
+									var ls_cell = document.getElementById('lockserver_dialog');
+									if (ls_cell !== null) {
+										lsdiv.id = null;
+										ls_cell.appendChild(lsdiv);
+									}
+								}
+								os_version = 'rhel4';
+							}
+							os_in.value = os_version;
+						}
+					}
+				} catch (e1) {
+				}
+
 				if (cur_node_props['authed'] != 'True') {
 					errors.push('Authentication for host ' + cur_sys_name + ' failed.');
 					clr_form_err(addr_elem);
@@ -129,7 +155,6 @@
 				}
 			}
 		} catch (e) {
-			alert(e);
 		}
 	}
 
--- conga/luci/site/luci/Extensions/HelperFunctions.py	2008/07/23 19:55:41	1.4.2.8
+++ conga/luci/site/luci/Extensions/HelperFunctions.py	2009/01/26 17:01:21	1.4.2.9
@@ -9,10 +9,9 @@
 import threading
 
 def resolveOSType(os_str):
-	if not os_str or os_str.find('Tikanga') != (-1) or os_str.find('Zod') != (-1) or os_str.find('Moonshine') != (-1) or os_str.find('Werewolf') != (-1) or os_str.find('Sulphur') != (-1):
-		return 'rhel5'
-	else:
+	if os_str and os_str.find('Nahant') != (-1):
 		return 'rhel4'
+	return 'rhel5'
 
 def add_commas(self, str1, str2):
 	return '%s; %s' % (str1, str2)
@@ -179,7 +178,7 @@
 
 		s = {
 			'hostname'	: hostname,
-			'OS'		: OS,
+			'os'		: OS,
 			'cluname'	: cluname,
 			'key_fp'	: key_fp,
 			'clualias'	: cluali,
--- conga/luci/site/luci/Extensions/LuciDB.py	2008/08/04 21:49:30	1.1.4.10
+++ conga/luci/site/luci/Extensions/LuciDB.py	2009/01/26 17:01:22	1.1.4.11
@@ -865,7 +865,6 @@
 				if LUCI_DEBUG_MODE is True:
 					luci_log.debug_verbose('GRA8: cluster name is none for %s' \
 						% ricci_hostname)
-				raise Exception, '%s not in a cluster' % ricci_hostname
 
 			cur_alias = str(clu_info[1]).strip().lower()
 			if not cur_alias:
--- conga/luci/site/luci/Extensions/cluster_adapters.py	2008/09/17 06:29:54	1.120.2.47
+++ conga/luci/site/luci/Extensions/cluster_adapters.py	2009/01/26 17:01:22	1.120.2.48
@@ -183,7 +183,7 @@
 				cluster_os = cur_host_os
 				add_cluster['cluster_os'] = cur_host_os
 
-			elif cluster_os != cur_host_os:
+			elif False and cluster_os != cur_host_os:
 				cur_system['errors'] = True
 				incomplete = True
 
@@ -304,8 +304,6 @@
 		% (request['URL'], CLUSTER_CONFIG, clustername))
 
 def validateAddClusterNode(self, request):
-	import time
-
 	try:
 		request.SESSION.delete('add_node')
 	except:
@@ -479,7 +477,7 @@
 				continue
 
 			cur_host_os = resolveOSType(rc.os())
-			if cluster_os is not None and cluster_os != cur_host_os:
+			if False and cluster_os is not None and cluster_os != cur_host_os:
 				cur_system['errors'] = True
 				incomplete = True
 
@@ -1198,8 +1196,7 @@
 		if LUCI_DEBUG_MODE is True:
 			luci_log.debug_verbose('VP1: no handler for page type %d' % pagetype)
 		return (False, {})
-	else:
-		return formValidators[pagetype](self, request)
+	return formValidators[pagetype](self, request)
 
 def clusterTaskProcess(self, model, request):
 	fvar = GetReqVars(request, [ 'task', 'clustername', 'URL' ])




More information about the Cluster-devel mailing list