From mboxrd@z Thu Jan 1 00:00:00 1970 From: rmccabe@sourceware.org Date: 21 Apr 2008 18:16:04 -0000 Subject: [Cluster-devel] conga ./conga.spec.in.in luci/cluster/fence-ma ... Message-ID: <20080421181604.17671.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 Branch: RHEL4 Changes by: rmccabe at sourceware.org 2008-04-21 18:16:01 Modified files: . : conga.spec.in.in luci/cluster : fence-macros form-macros resource-form-macros validate_fence.js luci/site/luci/Extensions: FenceHandler.py LuciClusterInfo.py luci/site/luci/var: Data.fs make : version.in Log message: Fix bz442729 (Add UI support for ssh for fence agents that now support it) Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/conga/conga.spec.in.in.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.67.2.26&r2=1.67.2.27 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/fence-macros.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.2.4.4&r2=1.2.4.5 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.176.2.23&r2=1.176.2.24 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/resource-form-macros.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.31.2.9&r2=1.31.2.10 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/validate_fence.js.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.3.2.6&r2=1.3.2.7 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/FenceHandler.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.17.2.8&r2=1.17.2.9 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/LuciClusterInfo.py.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.10.2.4&r2=1.10.2.5 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.22&r2=1.20.2.23 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/make/version.in.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.28.2.11&r2=1.28.2.12 --- conga/conga.spec.in.in 2008/04/18 04:19:57 1.67.2.26 +++ conga/conga.spec.in.in 2008/04/21 18:15:17 1.67.2.27 @@ -300,6 +300,9 @@ %changelog +* Fri Apr 18 2008 Ryan McCabe 0.11.1-3 +- Fix bz442729 (Add UI support for ssh for fence agents that now support it) + * Tue Mar 25 2008 Ryan McCabe 0.11.1-2 - Fix bz443002 (luci shows wrong state for 'Monitor link' checkbox in IP resource) - Fix bz442933 (Luci inserts "hostname" instead of "ipaddr" for rsa II fencing device) --- conga/luci/cluster/fence-macros 2008/04/18 03:31:46 1.2.4.4 +++ conga/luci/cluster/fence-macros 2008/04/21 18:15:17 1.2.4.5 @@ -77,6 +77,9 @@

Add a Sharable Fence Device

+ + @@ -136,6 +139,9 @@

Configure a Fence Device

+ + @@ -615,6 +621,19 @@ value cur_fencedev/passwd_script | nothing" /> + + + Use SSH + + + + + + @@ -675,6 +694,19 @@ value cur_fencedev/passwd_script | nothing" /> + + + Use SSH (DRAC5 only) + + + + + + @@ -1386,10 +1418,9 @@ Use Lanplus - + + tal:attributes="checked python: (cur_fencedev and cur_fencedev.has_key('lanplus') and (cur_fencedev['lanplus'] == '1' or cur_fencedev['lanplus'].lower() == 'true')) and 'checked' or ''" /> @@ -1532,6 +1563,19 @@ tal:attributes="value cur_instance/switch | nothing" /> + + + Use SSH + + + + + +
@@ -1615,6 +1659,19 @@ tal:attributes="value cur_instance/port | nothing" /> + + + Use SSH + + + + + +
@@ -1843,6 +1900,19 @@ tal:attributes="value cur_instance/blade | nothing" /> + + + Use SSH + + + + + +
--- conga/luci/cluster/form-macros 2008/03/25 01:27:10 1.176.2.23 +++ conga/luci/cluster/form-macros 2008/04/21 18:15:17 1.176.2.24 @@ -512,6 +512,9 @@ global cluster_node_status_str python: (nodeinfo['nodestate'] == '0' and 'Cluster member' or (nodeinfo['nodestate'] == '1' and 'Currently not a cluster participant' or 'This node is not responding'))" /> + +
--- conga/luci/cluster/resource-form-macros 2008/04/18 04:19:57 1.31.2.9 +++ conga/luci/cluster/resource-form-macros 2008/04/21 18:15:17 1.31.2.10 @@ -146,7 +146,10 @@ - + + + + @@ -199,7 +202,11 @@ - + + + + + --- conga/luci/cluster/validate_fence.js 2008/04/18 03:31:46 1.3.2.6 +++ conga/luci/cluster/validate_fence.js 2008/04/21 18:15:17 1.3.2.7 @@ -8,8 +8,8 @@ */ var fence_inst_validator = []; -fence_inst_validator['apc'] = [ 'port', 'switch' ]; -fence_inst_validator['bladecenter'] = [ 'blade' ]; +fence_inst_validator['apc'] = [ 'port', 'switch', 'secure' ]; +fence_inst_validator['bladecenter'] = [ 'blade', 'secure' ]; fence_inst_validator['brocade'] = [ 'port' ]; fence_inst_validator['bullpap'] = [ 'domain' ]; fence_inst_validator['egenera'] = [ 'lpan', 'pserver' ]; @@ -18,7 +18,7 @@ fence_inst_validator['sanbox2'] = [ 'port' ]; fence_inst_validator['scsi'] = [ 'nodename' ]; fence_inst_validator['vixel'] = [ 'port' ]; -fence_inst_validator['wti'] = [ 'port' ]; +fence_inst_validator['wti'] = [ 'port', 'secure' ]; fence_inst_validator['xvm'] = [ 'domain' ]; var fence_validator = []; @@ -26,10 +26,10 @@ fence_validator['bladecenter'] = [ 'ipaddr', 'login', 'passwd', 'passwd_script' ]; fence_validator['brocade'] = [ 'ipaddr', 'login', 'passwd', 'passwd_script' ]; fence_validator['bullpap'] = [ 'ipaddr', 'login', 'passwd', 'passwd_script' ]; -fence_validator['drac'] = [ 'ipaddr', 'login', 'passwd', 'passwd_script' ]; +fence_validator['drac'] = [ 'ipaddr', 'login', 'passwd', 'passwd_script', 'secure' ]; fence_validator['egenera'] = [ 'cserver' ]; fence_validator['gnbd'] = [ 'servers' ]; -fence_validator['ilo'] = [ 'hostname', 'login', 'passwd', 'passwd_script' ]; +fence_validator['ilo'] = [ 'hostname', 'login', 'passwd', 'passwd_script', 'secure' ]; fence_validator['ipmilan'] = [ 'ipaddr', 'login', 'passwd', 'passwd_script', 'lanplus', 'auth' ]; fence_validator['manual'] = []; fence_validator['mcdata'] = [ 'ipaddr', 'login', 'passwd', 'passwd_script' ]; @@ -77,7 +77,8 @@ return (errors); } - if (errors && errors.length > 0 && form.passwd_script && !str_is_blank(form.passwd_script.value)) + if (errors && errors.length > 0 && + form.passwd_script && !str_is_blank(form.passwd_script.value)) { clr_form_err(form_elem); return (null); @@ -126,6 +127,9 @@ field_validator['port'] = validate_field_str; field_validator['passwd_script'] = validate_field_noop; +/* iLO, DRAC5, WTI, APC, Bladecenter */ +field_validator['secure'] = validate_field_noop; + /* IPMI fence device */ field_validator['lanplus'] = validate_field_noop; field_validator['auth'] = validate_field_ipmilan_auth; --- conga/luci/site/luci/Extensions/FenceHandler.py 2008/04/18 03:31:46 1.17.2.8 +++ conga/luci/site/luci/Extensions/FenceHandler.py 2008/04/21 18:15:18 1.17.2.9 @@ -654,6 +654,12 @@ except: pass + use_ssh = form.has_key('secure') and (form['secure'] == '1' or form['secure'].lower() == 'true') + if use_ssh: + fencedev.addAttribute('secure', '1') + else: + fencedev.removeAttribute('secure') + return errors def val_rps10_fd(form, fencedev): @@ -803,6 +809,12 @@ if not has_passwd: errors.append(FD_PROVIDE_PASSWD) + use_ssh = form.has_key('secure') and (form['secure'] == '1' or form['secure'].lower() == 'true') + if use_ssh: + fencedev.addAttribute('secure', '1') + else: + fencedev.removeAttribute('secure') + return errors FD_VALIDATE = { @@ -903,6 +915,12 @@ except Exception, e: errors.append(FI_PROVIDE_SWITCH) + use_ssh = form.has_key('secure') and (form['secure'] == '1' or form['secure'].lower() == 'true') + if use_ssh: + fenceinst.addAttribute('secure', '1') + else: + fenceinst.removeAttribute('secure') + return errors def val_wti_fi(form, fenceinst): @@ -916,6 +934,12 @@ except Exception, e: errors.append(FI_PROVIDE_PORT) + use_ssh = form.has_key('secure') and (form['secure'] == '1' or form['secure'].lower() == 'true') + if use_ssh: + fenceinst.addAttribute('secure', '1') + else: + fenceinst.removeAttribute('secure') + return errors def val_brocade_fi(form, fenceinst): @@ -981,6 +1005,12 @@ except Exception, e: errors.append(FI_PROVIDE_BLADE) + use_ssh = form.has_key('secure') and (form['secure'] == '1' or form['secure'].lower() == 'true') + if use_ssh: + fenceinst.addAttribute('secure', '1') + else: + fenceinst.removeAttribute('secure') + return errors def val_mcdata_fi(form, fenceinst): --- conga/luci/site/luci/Extensions/LuciClusterInfo.py 2008/03/25 01:27:12 1.10.2.4 +++ conga/luci/site/luci/Extensions/LuciClusterInfo.py 2008/04/21 18:15:18 1.10.2.5 @@ -575,14 +575,24 @@ return {} clumap = {} + try: cluster_os = model.getClusterOS() - if cluster_os.find('Tikanga'): + if cluster_os.find('Tikanga') != -1: + clumap['os_major'] = 5 os_minor = int(cluster_os[cluster_os.find('5.') + 2]) + clumap['os_minor'] = os_minor if os_minor > 1: clumap['vm_migration_choice'] = True - except: - pass + elif cluster_os.find('Nahant') != -1: + clumap['os_major'] = 4 + os_minor = int(cluster_os[cluster_os.find('Update ') + 7]) + clumap['os_minor'] = os_minor + if os_minor > 6: + clumap['has_fence_ssh'] = True + except Exception, e: + if LUCI_DEBUG_MODE is True: + luci_log.debug_verbose('GCI0a: %r %s' % (e, str(e))) if not model: try: @@ -1626,7 +1636,9 @@ clu_map = {} try: - os_str = resolveOSType(rc.os()) + os_str = rc.os() + clu_map['os_full'] = os_str + os_str = resolveOSType(os_str) clu_map['os'] = os_str clu_map['isVirtualized'] = rc.dom0() except: Binary files /cvs/cluster/conga/luci/site/luci/var/Data.fs 2008/04/14 17:17:29 1.20.2.22 and /cvs/cluster/conga/luci/site/luci/var/Data.fs 2008/04/21 18:15:18 1.20.2.23 differ rcsdiff: /cvs/cluster/conga/luci/site/luci/var/Data.fs: diff failed --- conga/make/version.in 2008/04/11 06:30:25 1.28.2.11 +++ conga/make/version.in 2008/04/21 18:16:00 1.28.2.12 @@ -1,2 +1,2 @@ VERSION=0.11.1 -RELEASE=2 +RELEASE=3