conga luci/cluster/fence-macros luci/cluster/v ...
CVSROOT: /cvs/cluster
Module name: conga
Branch: RHEL5
Changes by: rmccabe at sourceware.org 2010-01-07 18:08:37
Modified files:
luci/cluster : fence-macros validate_fence.js
luci/homebase : form-macros
luci/plone-custom: conga.js luci/site/luci/Extensions: FenceHandler.py LuciValidation.py
ResourceHandler.py homebase_adapters.py
luci/site/luci/Extensions/ClusterModel: FenceDeviceAttr.py
ModelBuilder.py
luci/test : CGA_0160_Add_User.py
CGA_0170_Online_Documentation_Portlet.py CGA_0200_Create_cluster.py cleaner.py congaDemoTests.py conga_Helpers.py conga_suite.py loggerObject.py
luci/utils : luci_admin
ricci/modules/cluster: Clusvcadm.cpp
ricci/ricci : Ricci.cpp
Log message:
Sync with RHEL5.5 tree
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/fence-macros.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.2.2.12&r2=1.2.2.13
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/validate_fence.js.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.2.11&r2=1.1.2.12
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/form-macros.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.44.2.14&r2=1.44.2.15
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/plone-custom/conga.js.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.3.2.7&r2=1.3.2.8
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/FenceHandler.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.4.2.17&r2=1.4.2.18
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/LuciValidation.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.6.2.12&r2=1.6.2.13
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ResourceHandler.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.4.8&r2=1.1.4.9
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/homebase_adapters.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.34.2.17&r2=1.34.2.18
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/FenceDeviceAttr.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.5.2.2&r2=1.5.2.3
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ClusterModel/ModelBuilder.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.4.12&r2=1.1.4.13
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/test/CGA_0160_Add_User.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.7.2.1&r2=1.7.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/test/CGA_0170_Online_Documentation_Portlet.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.4.1&r2=1.1.4.2
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/test/CGA_0200_Create_cluster.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.4.2.2&r2=1.4.2.3
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/test/cleaner.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.4.3&r2=1.1.4.4
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/test/congaDemoTests.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.11.2.2&r2=1.11.2.3
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/test/conga_Helpers.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.14.2.3&r2=1.14.2.4
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/test/conga_suite.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.11.2.2&r2=1.11.2.3
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/test/loggerObject.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.2.4.1&r2=1.2.4.2
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/utils/luci_admin.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.50.2.7&r2=1.50.2.8
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/cluster/Clusvcadm.cpp.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.7.2.7&r2=1.7.2.8
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/ricci/Ricci.cpp.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.18.2.6&r2=1.18.2.7
luci/cluster/fence-macros +88 -0
@@ -190,6 +190,10 @@ <tal:block metal:use-macro="here/fence-macros/macros/fence-form-drac" /> </tal:block> + <tal:block tal:condition="python: cur_fence_type == 'fence_idrac'"> + <tal:block metal:use-macro="here/fence-macros/macros/fence-form-idrac" /> + </tal:block> + <tal:block tal:condition="python: cur_fence_type == 'fence_rsa'"> <tal:block metal:use-macro="here/fence-macros/macros/fence-form-rsa" /> </tal:block>
@@ -354,6 +358,7 @@ <option name="fence_bullpap" value="fence_bullpap">Bull PAP</option> <option name="fence_rps10" value="fence_rps10">RPS10 Serial Switch</option> <option name="fence_drac" value="fence_drac">Dell DRAC</option> + <option name="fence_idrac" value="fence_idrac">Dell iDRAC</option> <option name="fence_ipmilan" value="fence_ipmilan">IPMI Lan</option> <option name="fence_xvm" value="fence_xvm">Virtual Machine Fencing</option> <option name="fence_scsi" value="fence_scsi">SCSI Fencing</option>
@@ -725,6 +730,79 @@ </div> </div> +<div metal:define-macro="fence-form-idrac" + tal:attributes="id cur_fencedev/name | nothing"> + + <div id="fence_idrac" class="fencedev"> + <table> + <tr> + <td><strong class="cluster">Fence Type</strong></td> + <td>Dell iDrac</td> + </tr> + <tr> + <td>Name</td> + <td> + <input name="name" type="text" + tal:attributes="value cur_fencedev/name | nothing" /> + </td> + </tr> + <tr> + <td>IP Address</td> + <td> + <input name="ipaddr" type="text" + tal:attributes="value cur_fencedev/ipaddr | nothing" /> + </td> + </tr> + <tr> + <td>Login</td> + <td> + <input name="login" type="text" + tal:attributes="value cur_fencedev/login | nothing" /> + </td> + </tr> + <tr> + <td>Password</td> + <td> + <input name="passwd" type="password" autocomplete="off" + tal:attributes="value cur_fencedev/passwd | nothing" /> + </td> + </tr> + <tr> + <td> + <span title="Full path to a script to generate fence password">Password Script (optional)</span> + </td> + <td> + <input type="text" name="passwd_script" + tal:attributes=" + disabled cur_fencedev/isShared | nothing; + value cur_fencedev/passwd_script | nothing" /> + </td> + </tr> + <tr tal:condition="exists:clusterinfo/has_fence_ssh"> + <td> + <span title="Enable SSH operation">Use SSH</span> + </td> + <td> + <input tal:condition="exists:cur_fencedev" + type="checkbox" name="secure" + tal:attributes=" + checked python:(cur_fencedev and cur_fencedev.has_key('secure') and (cur_fencedev['secure'] == '1' or cur_fencedev['secure'].lower() == 'true')) and 'checked' or ''" /> + <input tal:condition="not:exists:cur_fencedev" + type="checkbox" name="secure" /> + </td> + </tr> + </table> + + <tal:block tal:condition="exists: cur_fencedev"> + <input type="hidden" name="existing_device" value="1" /> + <input type="hidden" name="orig_name" + tal:attributes="value cur_fencedev/name | nothing" /> + </tal:block> + + <input type="hidden" name="fence_type" value="fence_idrac" /> + </div> +</div> + <div metal:define-macro="fence-form-rsa" tal:attributes="id cur_fencedev/name | nothing">
@@ -1646,6 +1724,7 @@ <tal:block metal:use-macro="here/fence-macros/macros/fence-form-wti" /> <tal:block metal:use-macro="here/fence-macros/macros/fence-form-ilo" /> <tal:block metal:use-macro="here/fence-macros/macros/fence-form-drac" /> + <tal:block metal:use-macro="here/fence-macros/macros/fence-form-idrac" /> <tal:block metal:use-macro="here/fence-macros/macros/fence-form-rsa" /> <tal:block metal:use-macro="here/fence-macros/macros/fence-form-rsb" /> <tal:block metal:use-macro="here/fence-macros/macros/fence-form-brocade" />
@@ -1762,6 +1841,15 @@ </td> </tr> + <tr> + <td>Managed System</td> + <td> + <input name="managed" type="text" + tal:attributes=" + value cur_instance/managed | nothing" /> + </td> + </tr> + <tr><td colspan="2"> <div class="hbSubmit"> <tal:block tal:condition="exists:cur_fence_instance_id">
luci/cluster/validate_fence.js +3 -1
@@ -20,7 +20,7 @@ fence_inst_validator['vixel'] = [ 'port' ]; fence_inst_validator['wti'] = [ 'port', 'secure' ]; fence_inst_validator['xvm'] = [ 'domain' ]; -fence_inst_validator['lpar'] = [ 'partition' ]; +fence_inst_validator['lpar'] = [ 'partition', 'managed' ]; fence_inst_validator['vmware'] = [ 'port' ]; var fence_validator = [];
@@ -29,6 +29,7 @@ fence_validator['brocade'] = [ 'ipaddr', 'login', 'passwd', 'passwd_script' ]; fence_validator['bullpap'] = [ 'ipaddr', 'login', 'passwd', 'passwd_script' ]; fence_validator['drac'] = [ 'ipaddr', 'login', 'passwd', 'passwd_script', 'secure' ]; +fence_validator['idrac'] = [ 'ipaddr', 'login', 'passwd', 'passwd_script', 'secure' ]; fence_validator['egenera'] = [ 'cserver' ]; fence_validator['gnbd'] = [ 'servers' ]; fence_validator['ilo'] = [ 'hostname', 'login', 'passwd', 'passwd_script', 'secure' ];
@@ -150,6 +151,7 @@ field_validator['pserver'] = validate_field_str; field_validator['domain'] = validate_field_str; field_validator['partition'] = validate_field_str; +field_validator['managed'] = validate_field_str; function validate_fence(form) { var errors = [];
luci/homebase/form-macros +11 -0
@@ -210,6 +210,17 @@ </tal:block> </select> + <table class="homebase"> + <tr class="homebase"> + <td> + Set user password + </td> + <td> + <input type="password" name="newpasswd" checked="0" /> + </td> + </tr> + </table> + <h3 class="homebase" tal:condition="python:systems[0] and len(systems[0]) > 0"> Clusters </h3>
luci/plone-custom/conga.js +0 -2
@@ -202,8 +202,6 @@ if (i.length === 1) { if (iponly) { return ('You must enter an IP address in quad-dot notation.'); - } else { - return ('Hostnames must be fully qualified.'); } }
luci/site/luci/Extensions/FenceHandler.py +73 -0
103 lines not on this page · raw message
luci/site/luci/Extensions/LuciValidation.py +31 -32
81 lines not on this page · raw message
luci/site/luci/Extensions/ResourceHandler.py +6 -7
@@ -675,10 +675,7 @@ raise KeyError, 'No volume group name was given for "%s"' % rname res.addAttribute('vg_name', vg_name) except Exception, e: - err = str(e) - errors.append(err) - if LUCI_DEBUG_MODE is True: - luci_log.debug_verbose('addLVM5: %s' % err) + vg_name = None try: lv_name = form['lv_name'].strip()
@@ -686,10 +683,12 @@ raise KeyError, 'No logical volume name was given for "%s"' % rname res.addAttribute('lv_name', lv_name) except Exception, e: - err = str(e) - errors.append(err) + lv_name = None + + if not lv_name and not vg_name: + errors.append('Neither lv_name nor vg_name given for resource "%s"' % rname) if LUCI_DEBUG_MODE is True: - luci_log.debug_verbose('addLVM6: %s' % err) + luci_log.debug_verbose('addLVM6: no vg_name or lv_name for "%s"' % rname) return errors
luci/site/luci/Extensions/homebase_adapters.py +18 -0
@@ -139,6 +139,12 @@ if passwd != pwconfirm: return (False, { 'errors': [ 'The passwords given do not match' ]}) + if ":" in passwd: + return (False, { 'errors': [ 'The passwords cannot contain semicolons' ]}) + + if " " in passwd: + return (False, { 'errors': [ 'The passwords cannot contain spaces' ]}) + user_props = { 'username': user, 'password': passwd,
@@ -763,6 +769,18 @@ if len(errors) > 0: return (False, { 'errors': errors }) + new_passwd = request.form.get('newpasswd') + if new_passwd: + new_passwd = new_passwd.strip() + if new_passwd: + try: + user.userSetPassword(user_id, new_passwd) + messages.append('Set password for user "%s"' % username) + except Exception, e: + errors.append('An error occurred while setting the password for user "%s"' % username) + if len(errors) > 0: + return (False, { 'errors': errors }) + clusters = self.restrictedTraverse('%s/systems/cluster/objectItems' % PLONE_ROOT)('Folder') if not request.form.has_key('__CLUSTER'): for i in clusters:
luci/site/luci/Extensions/ClusterModel/FenceDeviceAttr.py +5 -0
@@ -27,6 +27,7 @@ 'fence_ilo': 'HP iLO Device', 'fence_ipmilan': 'IPMI Lan', 'fence_drac': 'Dell DRAC', + 'fence_idrac': 'Dell iDRAC', 'fence_rsa': 'IBM RSA II Device', 'fence_rps10': 'RPS10 Serial Switch', 'fence_lpar': 'LPAR Fencing',
@@ -52,6 +53,7 @@ 'fence_ilo': False, 'fence_ipmilan': False, 'fence_drac': False, + 'fence_idrac': False, 'fence_rsa': False, 'fence_rps10': False, 'fence_manual': False
@@ -95,6 +97,7 @@ 'fence_ilo': ( ), 'fence_ipmilan': ( ), 'fence_drac': ( ), + 'fence_idrac': ( ), 'fence_rsa': ( ), 'fence_rps10': ( ), 'fence_manual': ( )
@@ -135,6 +138,8 @@ ( 'name', 'ipaddr', 'login', 'passwd', 'lanplus', 'auth' ), 'fence_drac': ( 'name', 'ipaddr', 'login', 'passwd' ), + 'fence_idrac': + ( 'name', 'ipaddr', 'login', 'passwd' ), 'fence_rsa': ( 'name', 'hostname', 'login', 'passwd' ), 'fence_rps10':
luci/site/luci/Extensions/ClusterModel/ModelBuilder.py +0 -1
@@ -1008,7 +1008,6 @@ self.mcast_address = mcast_addr self.mcast_interface = mcast_if self.usesMulticast = True - self.set_nodes_multicast(mcast_addr, mcast_if=mcast_if) self.isModified = True def del_nodes_multicast(self):
luci/test/CGA_0160_Add_User.py +1 -1
@@ -1,4 +1,4 @@ -#! /usr/bin/env python +#!/usr/bin/python # Copyright Red Hat, Inc. 2006 #
luci/test/CGA_0170_Online_Documentation_Portlet.py +1 -1
@@ -1,4 +1,4 @@ -#! /usr/bin/env python +#!/usr/bin/python # Copyright Red Hat, Inc. 2006 #
luci/test/CGA_0200_Create_cluster.py +1 -1
@@ -1,4 +1,4 @@ -#! /usr/bin/env python +#!/usr/bin/python # Copyright Red Hat, Inc. 2006 #
luci/test/cleaner.py +1 -1
@@ -1,4 +1,4 @@ -#! /usr/bin/env python +#!/usr/bin/python # Copyright (C) Red Hat, Inc. 2007-2008 #
luci/test/congaDemoTests.py +1 -1
@@ -1,4 +1,4 @@ -#! /usr/bin/env python +#!/usr/bin/python # Copyright Red Hat, Inc. 2006 #
luci/test/conga_Helpers.py +1 -1
@@ -1,4 +1,4 @@ -#! /usr/bin/env python +#!/usr/bin/python # Copyright (C) Red Hat, Inc. 2006-2008 #
luci/test/conga_suite.py +1 -1
@@ -1,4 +1,4 @@ -#! /usr/bin/env python +#!/usr/bin/python # Copyright Red Hat, Inc. 2006 #
luci/test/loggerObject.py +1 -1
@@ -1,4 +1,4 @@ -#! /usr/bin/env python +#!/usr/bin/python # Copyright Red Hat, Inc. 2006 #
luci/utils/luci_admin +5 -1
@@ -181,6 +181,10 @@ err.write('Spaces are not allowed in passwords\n') continue + elif ':' in s1: + err.write('Semicolons are not allowed in passwords\n') + continue + s2 = getpass(confirm_prompt) if s1 != s2: err.write('Password mismatch, try again\n')
@@ -1022,7 +1026,7 @@ try: (pid, status) = os.waitpid(childpid, 0) except OSError, (errno, msg): - err.write('%s waitpid: %s\n' % (__name__, msg)) + err.write('%s waitpid: %s\n' % (__name__, msg)) if os.WIFEXITED(status): status = os.WEXITSTATUS(status)
ricci/modules/cluster/Clusvcadm.cpp +5 -0
@@ -101,6 +101,8 @@ continue; String flag; + if (iter->status == ServiceStatus::RG_STATE_RECOVER) + throw String(servicename + " is in the process of being recovered"); if (iter->status == ServiceStatus::RG_STATE_MIGRATE) throw String(servicename + " is in the process of being migrated");
@@ -199,6 +201,8 @@ continue; String flag; + if (iter->status == ServiceStatus::RG_STATE_RECOVER) + throw String(servicename + " is in the process of being recovered"); if (iter->status == ServiceStatus::RG_STATE_MIGRATE) throw String(servicename + " is already in the process of being migrated");
@@ -273,6 +277,7 @@ if (iter->status == ServiceStatus::RG_STATE_STARTING || iter->status == ServiceStatus::RG_STATE_FAILED || + iter->status == ServiceStatus::RG_STATE_RECOVER || iter->status == ServiceStatus::RG_STATE_STARTED) { String out, err;
ricci/ricci/Ricci.cpp +1 -0
@@ -483,6 +483,7 @@ int status; vector<String> args; + args.push_back("--readonly"); args.push_back("nodeinfo"); if (utils::execute("/usr/bin/virsh", args, out, err, status, false)) throw command_not_found_error_msg("/usr/bin/virsh");