All of lore.kernel.org
 help / color / mirror / Atom feed
From: rmccabe@sourceware.org <rmccabe@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga luci/cluster/busy_wait-macro luci/cluste ...
Date: 10 Dec 2008 21:02:49 -0000	[thread overview]
Message-ID: <20081210210249.2602.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	conga
Branch: 	RHEL4
Changes by:	rmccabe at sourceware.org	2008-12-10 21:02:46

Modified files:
	luci/cluster   : busy_wait-macro form-macros 
	                 validate_create_gulm.js 
	luci/plone-custom: update_hostinfo.js validate_auth.js 
	luci/site/luci/Extensions: HelperFunctions.py LuciDB.py 
	                           cluster_adapters.py 
	luci/site/luci/var: Data.fs 
	ricci/init.d   : ricci 
	ricci/modules/cluster/clumon/init.d: modclusterd 

Log message:
	Improve fix for bz458298

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/busy_wait-macro.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.3.2.3&r2=1.3.2.4
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.176.2.25&r2=1.176.2.26
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/validate_create_gulm.js.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.2.3&r2=1.1.2.4
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/plone-custom/update_hostinfo.js.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.4.2&r2=1.1.4.3
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/plone-custom/validate_auth.js.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.4.1&r2=1.1.4.2
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/HelperFunctions.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.6.2.4&r2=1.6.2.5
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/LuciDB.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.6.2.4&r2=1.6.2.5
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.227.2.28&r2=1.227.2.29
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/var/Data.fs.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.20.2.26&r2=1.20.2.27
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/init.d/ricci.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.10.2.3&r2=1.10.2.4
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/cluster/clumon/init.d/modclusterd.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.2.4.3&r2=1.2.4.4

--- conga/luci/cluster/busy_wait-macro	2008/06/10 15:29:13	1.3.2.3
+++ conga/luci/cluster/busy_wait-macro	2008/12/10 21:02:00	1.3.2.4
@@ -3,7 +3,7 @@
 
 	<p><img src="100wait.gif" /></p>
 
-	<span tal:define="global nodereports isBusy/nodereports" />
+	<span tal:define="global nodereports isBusy/nodereports | nothing" />
 
 	<div tal:repeat="nodereport nodereports">
 		<tal:block
--- conga/luci/cluster/form-macros	2008/11/10 21:02:43	1.176.2.25
+++ conga/luci/cluster/form-macros	2008/12/10 21:02:00	1.176.2.26
@@ -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/11/10 21:02:43	1.1.2.3
+++ conga/luci/cluster/validate_create_gulm.js	2008/12/10 21:02:00	1.1.2.4
@@ -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/update_hostinfo.js	2008/11/10 21:02:43	1.1.4.2
+++ conga/luci/plone-custom/update_hostinfo.js	2008/12/10 21:02:00	1.1.4.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/03/25 01:27:11	1.1.4.1
+++ conga/luci/plone-custom/validate_auth.js	2008/12/10 21:02:00	1.1.4.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/08/07 19:23:21	1.6.2.4
+++ conga/luci/site/luci/Extensions/HelperFunctions.py	2008/12/10 21:02:00	1.6.2.5
@@ -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/11/10 21:02:43	1.6.2.4
+++ conga/luci/site/luci/Extensions/LuciDB.py	2008/12/10 21:02:00	1.6.2.5
@@ -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/11/10 21:02:44	1.227.2.28
+++ conga/luci/site/luci/Extensions/cluster_adapters.py	2008/12/10 21:02:00	1.227.2.29
@@ -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' ])
Binary files /cvs/cluster/conga/luci/site/luci/var/Data.fs	2008/06/10 15:29:13	1.20.2.26 and /cvs/cluster/conga/luci/site/luci/var/Data.fs	2008/12/10 21:02:01	1.20.2.27 differ
rcsdiff: /cvs/cluster/conga/luci/site/luci/var/Data.fs: diff failed
--- conga/ricci/init.d/ricci	2008/11/25 16:37:18	1.10.2.3
+++ conga/ricci/init.d/ricci	2008/12/10 21:02:46	1.10.2.4
@@ -74,7 +74,7 @@
 
 ricci_status() {
 	if [ -f "$PIDFILE" ]; then
-		status -p "$PIDFILE" "$RICCID"
+		status "$RICCID"
 		ricci_up=$?
 	else
 		status "$RICCID"
--- conga/ricci/modules/cluster/clumon/init.d/modclusterd	2008/11/25 16:37:19	1.2.4.3
+++ conga/ricci/modules/cluster/clumon/init.d/modclusterd	2008/12/10 21:02:46	1.2.4.4
@@ -40,7 +40,7 @@
 
 modclusterd_status() {
 	if [ -f "$PIDFILE" ]; then
-		status -p "$PIDFILE" "$MODCLUSTERD"
+		status "$MODCLUSTERD"
 		ret=$?
 	else
 		status "$MODCLUSTERD"



                 reply	other threads:[~2008-12-10 21:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081210210249.2602.qmail@sourceware.org \
    --to=rmccabe@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.