conga luci/cluster/busy_wait-macro luci/cluste ...
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
luci/cluster/busy_wait-macro +1 -1
@@ -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
luci/cluster/form-macros +1 -0
@@ -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');
luci/cluster/validate_create_gulm.js +5 -1
@@ -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))
luci/plone-custom/update_hostinfo.js +1 -1
@@ -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) { }
luci/plone-custom/validate_auth.js +29 -4
@@ -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); } }
luci/site/luci/Extensions/HelperFunctions.py +3 -4
@@ -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,
luci/site/luci/Extensions/LuciDB.py +0 -1
@@ -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:
luci/site/luci/Extensions/cluster_adapters.py +3 -6
@@ -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
ricci/init.d/ricci +1 -1
@@ -74,7 +74,7 @@ ricci_status() { if [ -f "$PIDFILE" ]; then - status -p "$PIDFILE" "$RICCID" + status "$RICCID" ricci_up=$? else status "$RICCID"
ricci/modules/cluster/clumon/init.d/modclusterd +1 -1
@@ -40,7 +40,7 @@ modclusterd_status() { if [ -f "$PIDFILE" ]; then - status -p "$PIDFILE" "$MODCLUSTERD" + status "$MODCLUSTERD" ret=$? else status "$MODCLUSTERD"