FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 01-07-2010, 05:08 PM
 
Default conga luci/cluster/fence-macros luci/cluster/v ...

CVSROOT: /cvs/cluster
Module name: conga
Branch: RHEL5
Changes by: rmccabe@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_t ag=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_t ag=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_wit h_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_wit h_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?cvsr oot=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&on ly_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=RHEL 5&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_t ag=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_ta g=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=RHEL 5&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=R HEL5&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

--- conga/luci/cluster/fence-macros 2009/05/14 21:05:58 1.2.2.12
+++ conga/luci/cluster/fence-macros 2010/01/07 18:08:34 1.2.2.13
@@ -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 pythoncur_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">
--- conga/luci/cluster/validate_fence.js 2009/04/23 20:38:51 1.1.2.11
+++ conga/luci/cluster/validate_fence.js 2010/01/07 18:08:34 1.1.2.12
@@ -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 = [];
--- conga/luci/homebase/form-macros 2008/02/08 21:56:33 1.44.2.14
+++ conga/luci/homebase/form-macros 2010/01/07 18:08:34 1.44.2.15
@@ -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>
--- conga/luci/plone-custom/conga.js 2008/07/14 21:52:30 1.3.2.7
+++ conga/luci/plone-custom/conga.js 2010/01/07 18:08:35 1.3.2.8
@@ -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.');
}
}

--- conga/luci/site/luci/Extensions/FenceHandler.py 2009/04/23 20:38:52 1.4.2.17
+++ conga/luci/site/luci/Extensions/FenceHandler.py 2010/01/07 18:08:35 1.4.2.18
@@ -43,6 +43,7 @@
FI_PROVIDE_EPSERVER = 'A PServer value must be provided for this Egenera Fence'
FI_PROVIDE_NODENAME = 'A Node Name value must be provided for this SCSI Fence'
FI_PROVIDE_PARTITION = 'A partition name must be provided for this LPAR Fence'
+FI_PROVIDE_MANAGED = 'A managed system name must be provided for this LPAR Fence'

ILLEGAL_CHARS_REPLACED = 'Illegal characters were replaced by underscores. Feel free to set a new value.'

@@ -820,6 +821,68 @@

return errors

+def val_idrac_fd(form, fencedev):
+ errors = list()
+
+ try:
+ ip = form['ipaddr'].strip()
+ if not ip:
+ raise Exception, 'blank'
+ fencedev.addAttribute('ipaddr', ip)
+ except Exception, e:
+ errors.append(FD_PROVIDE_IP)
+
+ try:
+ log = form['login'].strip()
+ if not log:
+ raise Exception, 'blank'
+ fencedev.addAttribute('login', log)
+ except Exception, e:
+ errors.append(FD_PROVIDE_LOGIN)
+
+ has_passwd = False
+ try:
+ pwd = form['passwd'].strip()
+ if not pwd:
+ # Allow passwords that consist of only spaces.
+ if not form.has_key('passwd') or form['passwd'] == ':
+ raise Exception, 'blank'
+ else:
+ pwd = form['passwd']
+ fencedev.addAttribute('passwd', pwd)
+ has_passwd = True
+ except Exception, e:
+ try:
+ fencedev.removeAttribute('passwd')
+ except:
+ pass
+
+ try:
+ pwd_script = form['passwd_script'].strip()
+ if not pwd_script:
+ raise Exception, 'blank'
+ fencedev.addAttribute('passwd_script', pwd_script)
+ has_passwd = True
+ except Exception, e:
+ try:
+ fencedev.removeAttribute('passwd_script')
+ except:
+ pass
+
+ 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:
+ try:
+ fencedev.removeAttribute('secure')
+ except:
+ pass
+
+ return errors
+
def val_rps10_fd(form, fencedev):
errors = list()

@@ -988,6 +1051,7 @@
'fence_ipmilan': val_ipmilan_fd,
'fence_drac': val_drac_fd,
'fence_drac5': val_drac_fd,
+ 'fence_idrac': val_idrac_fd,
'fence_rsa': val_rsa_fd,
'fence_rsb': val_rsa_fd, # same params as rsa
'fence_rps10': val_rps10_fd,
@@ -1252,6 +1316,14 @@
except Exception, e:
errors.append(FI_PROVIDE_PARTITION)

+ try:
+ managed = form['managed'].strip()
+ if not managed:
+ raise Exception, 'blank'
+ fenceinst.addAttribute('managed', managed)
+ except Exception, e:
+ errors.append(FI_PROVIDE_MANAGED)
+
fenceinst.addAttribute('secure', '1')

return errors
@@ -1304,6 +1376,7 @@
'fence_ipmilan': val_noop_fi,
'fence_drac': val_noop_fi,
'fence_drac5': val_noop_fi,
+ 'fence_idrac': val_noop_fi,
'fence_rsa': val_noop_fi,
'fence_rsb': val_noop_fi,
'fence_rps10': val_noop_fi
--- conga/luci/site/luci/Extensions/LuciValidation.py 2009/05/21 13:32:04 1.6.2.12
+++ conga/luci/site/luci/Extensions/LuciValidation.py 2010/01/07 18:08:35 1.6.2.13
@@ -288,6 +288,37 @@
luci_log.debug_verbose('vSA1: error: %r %s: %r' % (e, str(e), form_xml))
return (False, { 'errors': [ 'The resource data submitted for this service is not properly formed' ]})

+ service_name = fvar['svc_name']
+ if service_name is None:
+ if LUCI_DEBUG_MODE is True:
+ luci_log.debug_verbose('vSA5: no service name')
+ errors.append('No service name was given')
+
+ try:
+ cur_service = model.retrieveServiceByName(service_name)
+ except Exception, e:
+ if LUCI_DEBUG_MODE is True:
+ luci_log.debug_verbose('vSA5c: no service named %s found: %r %s'
+ % (service_name, e, str(e)))
+ cur_service = None
+
+ action = fvar['action']
+ if action is None:
+ return (False, {'errors': [ 'No action was given for service %s' % service_name ] })
+
+ if action == 'edit':
+ if cur_service is None:
+ return (False, {'errors': [ 'The service %s could not be found for editing' % service_name ]})
+ model.deleteService(service_name)
+ elif action == 'add':
+ if cur_service is not None:
+ return (False, {'errors': [ 'A service with the name %s already exists' % service_name ]})
+ else:
+ if LUCI_DEBUG_MODE is True:
+ luci_log.debug_verbose('vSA4a: unknown action %s'
+ % request.form['action'])
+ return (False, {'errors': [ 'An unknown action was specified' ]})
+
form_hash = {}
form_hash['toplevel'] = { 'form': None, 'kids': [] }
for i in forms:
@@ -391,13 +422,6 @@
errors.append('Restart expire time must be a number greater than or equal to 0')
restart_expire_time = None

-
- service_name = fvar['svc_name']
- if service_name is None:
- if LUCI_DEBUG_MODE is True:
- luci_log.debug_verbose('vSA5: no service name')
- errors.append('No service name was given')
-
nfslock = '0'
try:
if not request.form.has_key('nfslock') or request.form['nfslock'] != '1':
@@ -429,31 +453,6 @@
except Exception, e:
exclusive = '0'

- try:
- cur_service = model.retrieveServiceByName(service_name)
- except Exception, e:
- if LUCI_DEBUG_MODE is True:
- luci_log.debug_verbose('vSA5c: no service named %s found: %r %s'
- % (service_name, e, str(e)))
- cur_service = None
-
- action = fvar['action']
- if action is None:
- return (False, {'errors': [ 'No action was given for service %s' % service_name ] })
-
- if action == 'edit':
- if cur_service is None:
- return (False, {'errors': [ 'The service %s could not be found for editing' % service_name ]})
- model.deleteService(service_name)
- elif action == 'add':
- if cur_service is not None:
- return (False, {'errors': [ 'A service with the name %s already exists' % service_name ]})
- else:
- if LUCI_DEBUG_MODE is True:
- luci_log.debug_verbose('vSA4a: unknown action %s'
- % request.form['action'])
- return (False, {'errors': [ 'An unknown action was specified' ]})
-
def buildSvcTree(parent, child_id_list):
for i in child_id_list:
try:
--- conga/luci/site/luci/Extensions/ResourceHandler.py 2009/05/21 13:32:04 1.1.4.8
+++ conga/luci/site/luci/Extensions/ResourceHandler.py 2010/01/07 18:08:35 1.1.4.9
@@ -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

--- conga/luci/site/luci/Extensions/homebase_adapters.py 2008/04/23 17:27:10 1.34.2.17
+++ conga/luci/site/luci/Extensions/homebase_adapters.py 2010/01/07 18:08:35 1.34.2.18
@@ -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:
--- conga/luci/site/luci/Extensions/ClusterModel/FenceDeviceAttr.py 2009/02/18 19:13:30 1.5.2.2
+++ conga/luci/site/luci/Extensions/ClusterModel/FenceDeviceAttr.py 2010/01/07 18:08:35 1.5.2.3
@@ -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':
--- conga/luci/site/luci/Extensions/ClusterModel/ModelBuilder.py 2009/01/23 19:33:29 1.1.4.12
+++ conga/luci/site/luci/Extensions/ClusterModel/ModelBuilder.py 2010/01/07 18:08:35 1.1.4.13
@@ -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):
--- conga/luci/test/CGA_0160_Add_User.py 2007/03/01 00:31:19 1.7.2.1
+++ conga/luci/test/CGA_0160_Add_User.py 2010/01/07 18:08:36 1.7.2.2
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#!/usr/bin/python

# Copyright Red Hat, Inc. 2006
#
--- conga/luci/test/CGA_0170_Online_Documentation_Portlet.py 2007/03/01 00:31:19 1.1.4.1
+++ conga/luci/test/CGA_0170_Online_Documentation_Portlet.py 2010/01/07 18:08:36 1.1.4.2
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#!/usr/bin/python

# Copyright Red Hat, Inc. 2006
#
--- conga/luci/test/CGA_0200_Create_cluster.py 2007/06/18 18:39:49 1.4.2.2
+++ conga/luci/test/CGA_0200_Create_cluster.py 2010/01/07 18:08:36 1.4.2.3
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#!/usr/bin/python

# Copyright Red Hat, Inc. 2006
#
--- conga/luci/test/cleaner.py 2008/01/23 04:44:56 1.1.4.3
+++ conga/luci/test/cleaner.py 2010/01/07 18:08:36 1.1.4.4
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#!/usr/bin/python

# Copyright (C) Red Hat, Inc. 2007-2008
#
--- conga/luci/test/congaDemoTests.py 2007/06/25 16:17:27 1.11.2.2
+++ conga/luci/test/congaDemoTests.py 2010/01/07 18:08:36 1.11.2.3
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#!/usr/bin/python

# Copyright Red Hat, Inc. 2006
#
--- conga/luci/test/conga_Helpers.py 2008/01/23 04:44:57 1.14.2.3
+++ conga/luci/test/conga_Helpers.py 2010/01/07 18:08:36 1.14.2.4
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#!/usr/bin/python

# Copyright (C) Red Hat, Inc. 2006-2008
#
--- conga/luci/test/conga_suite.py 2007/06/25 16:17:27 1.11.2.2
+++ conga/luci/test/conga_suite.py 2010/01/07 18:08:36 1.11.2.3
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#!/usr/bin/python

# Copyright Red Hat, Inc. 2006
#
--- conga/luci/test/loggerObject.py 2007/03/01 00:31:19 1.2.4.1
+++ conga/luci/test/loggerObject.py 2010/01/07 18:08:36 1.2.4.2
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#!/usr/bin/python

# Copyright Red Hat, Inc. 2006
#
--- conga/luci/utils/luci_admin 2008/04/11 06:50:33 1.50.2.7
+++ conga/luci/utils/luci_admin 2010/01/07 18:08:36 1.50.2.8
@@ -181,6 +181,10 @@
err.write('Spaces are not allowed in passwords
')
continue

+ elif ':' in s1:
+ err.write('Semicolons are not allowed in passwords
')
+ continue
+
s2 = getpass(confirm_prompt)
if s1 != s2:
err.write('Password mismatch, try again
')
@@ -1022,7 +1026,7 @@
try:
(pid, status) = os.waitpid(childpid, 0)
except OSError, (errno, msg):
- err.write('%s waitpid: %s
' % (__name__, msg))
+ err.write('%s waitpid: %s
' % (__name__, msg))

if os.WIFEXITED(status):
status = os.WEXITSTATUS(status)
--- conga/ricci/modules/cluster/Clusvcadm.cpp 2008/01/17 17:38:37 1.7.2.7
+++ conga/ricci/modules/cluster/Clusvcadm.cpp 2010/01/07 18:08:36 1.7.2.8
@@ -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;
--- conga/ricci/ricci/Ricci.cpp 2008/01/17 17:38:39 1.18.2.6
+++ conga/ricci/ricci/Ricci.cpp 2010/01/07 18:08:37 1.18.2.7
@@ -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");
 
Old 08-05-2010, 05:33 PM
 
Default conga luci/cluster/fence-macros luci/cluster/v ...

CVSROOT: /cvs/cluster
Module name: conga
Branch: RHEL5
Changes by: rmccabe@sourceware.org 2010-08-05 17:33:06

Modified files:
luci/cluster : fence-macros validate_fence.js
luci/init.d : luci
luci/plone-custom: conga.js
luci/site/luci/Extensions: FenceHandler.py
luci/site/luci/Extensions/ClusterModel: FenceDeviceAttr.py
make : version.in

Log message:
luci: Add missing commits

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/fence-macros.diff?cvsroot=cluster&only_with_tag=RHEL5&r1 =1.2.2.13&r2=1.2.2.14
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/validate_fence.js.diff?cvsroot=cluster&only_with_t ag=RHEL5&r1=1.1.2.12&r2=1.1.2.13
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/init.d/luci.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1 .11.2.6&r2=1.11.2.7
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/plone-custom/conga.js.diff?cvsroot=cluster&only_with_tag=RHEL5& r1=1.3.2.8&r2=1.3.2.9
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.18&r2=1.4.2.19
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.3&r2=1.5.2.4
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/make/version.in.diff?cvsroot=cluster&only_with_tag=RHEL 5&r1=1.21.2.52&r2=1.21.2.53

--- conga/luci/cluster/fence-macros 2010/01/07 18:08:34 1.2.2.13
+++ conga/luci/cluster/fence-macros 2010/08/05 17:33:04 1.2.2.14
@@ -190,10 +190,6 @@
<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>
@@ -358,7 +354,6 @@
<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>
@@ -730,79 +725,6 @@
</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 pythoncur_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">

@@ -1724,7 +1646,6 @@
<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" />
--- conga/luci/cluster/validate_fence.js 2010/01/07 18:08:34 1.1.2.12
+++ conga/luci/cluster/validate_fence.js 2010/08/05 17:33:05 1.1.2.13
@@ -29,7 +29,6 @@
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' ];
--- conga/luci/init.d/luci 2010/02/04 23:36:34 1.11.2.6
+++ conga/luci/init.d/luci 2010/08/05 17:33:05 1.11.2.7
@@ -30,6 +30,8 @@

LUCI_USER='luci'
LUCI_GROUP='luci'
+LUCI_ZOPE_TIMEOUT=30
+LUCI_STUNNEL_TIMEOUT=10

LUCI_URL="https://`/bin/hostname`:$LUCI_HTTPS_PORT"

@@ -121,7 +123,7 @@
stop()
{
stop_stunnel
- max_wait=5
+ max_wait=$LUCI_STUNNEL_TIMEOUT
cur_wait=0
while [ $cur_wait -lt $max_wait ]; do
sleep 1
@@ -133,12 +135,16 @@
done

if [ $? -ne 0 ]; then
- errmsg='Failed to stop stunnel'
+ if [ $cur_wait -eq $max_wait ]; then
+ errmsg="stunnel did not stop after $max_wait seconds."
+ else
+ errmsg='Failed to stop stunnel'
+ fi
return 1
fi

stop_luci
- max_wait=25
+ max_wait=$LUCI_ZOPE_TIMEOUT
cur_wait=0
while [ $cur_wait -lt $max_wait ]; do
sleep 1
@@ -174,7 +180,7 @@
sh $LUCID >&/dev/null &

cur_wait=0
- max_wait=25
+ max_wait=$LUCI_ZOPE_TIMEOUT
luci_running
ret=$?
while [ $ret -ne 1 ] && [ $cur_wait -lt $max_wait ]; do
@@ -201,7 +207,7 @@
return 1
fi

- max_wait=5
+ max_wait=$LUCI_STUNNEL_TIMEOUT
cur_wait=0
stunnel_running
ret=$?
@@ -213,7 +219,11 @@
done

if [ $ret -ne 2 ]; then
- errmsg='An error occurred while starting stunnel'
+ if [ $cur_wait -eq $max_wait ]; then
+ errmsg="stunnel did not start after $max_wait seconds."
+ else
+ errmsg='An error occurred while starting stunnel'
+ fi
stop_luci >& /dev/null
stop_stunnel >& /dev/null
return 1
@@ -331,7 +341,7 @@
exit 0
else
echo_failure
- /usr/bin/logger -t "$ID" -- "Luci startup failed $errmsg"
+ /usr/bin/logger -t "$ID" -- "Luci startup failed: $errmsg"
echo
exit 1
fi
@@ -378,7 +388,7 @@
/usr/bin/logger -t "$ID" -- "Luci shutdown succeeded"
rtrn=0
else
- /usr/bin/logger -t "$ID" -- "Luci shutdown failed"
+ /usr/bin/logger -t "$ID" -- "Luci shutdown failed: $errmsg"
rtrn=1
fi
elif [ $rtrn -eq 0 ]; then
--- conga/luci/plone-custom/conga.js 2010/01/07 18:08:35 1.3.2.8
+++ conga/luci/plone-custom/conga.js 2010/08/05 17:33:05 1.3.2.9
@@ -211,7 +211,7 @@
var o3 = parseInt(i[2], 10);
var o4 = parseInt(i[3], 10);

- if (isNaN(o1) || isNaN(o2) || isNaN(o3) ||
+ if (isNaN(o1) || isNaN(o2) || isNaN(o3) || isNaN(o4) ||
((o1 & 0xff) !== o1) ||
((o2 & 0xff) !== o2) ||
((o3 & 0xff) !== o3) ||
@@ -231,10 +231,6 @@
return ('You must enter an IP address in quad-dot notation.');
}

- if (!str.match(/^[0-9A-Za-z][0-9A-Za-z.-]*$/)) {
- return ('Hostnames can contain only alphanumeric characters and hyphens.');
- }
-
return (null);
}

--- conga/luci/site/luci/Extensions/FenceHandler.py 2010/01/07 18:08:35 1.4.2.18
+++ conga/luci/site/luci/Extensions/FenceHandler.py 2010/08/05 17:33:05 1.4.2.19
@@ -821,68 +821,6 @@

return errors

-def val_idrac_fd(form, fencedev):
- errors = list()
-
- try:
- ip = form['ipaddr'].strip()
- if not ip:
- raise Exception, 'blank'
- fencedev.addAttribute('ipaddr', ip)
- except Exception, e:
- errors.append(FD_PROVIDE_IP)
-
- try:
- log = form['login'].strip()
- if not log:
- raise Exception, 'blank'
- fencedev.addAttribute('login', log)
- except Exception, e:
- errors.append(FD_PROVIDE_LOGIN)
-
- has_passwd = False
- try:
- pwd = form['passwd'].strip()
- if not pwd:
- # Allow passwords that consist of only spaces.
- if not form.has_key('passwd') or form['passwd'] == ':
- raise Exception, 'blank'
- else:
- pwd = form['passwd']
- fencedev.addAttribute('passwd', pwd)
- has_passwd = True
- except Exception, e:
- try:
- fencedev.removeAttribute('passwd')
- except:
- pass
-
- try:
- pwd_script = form['passwd_script'].strip()
- if not pwd_script:
- raise Exception, 'blank'
- fencedev.addAttribute('passwd_script', pwd_script)
- has_passwd = True
- except Exception, e:
- try:
- fencedev.removeAttribute('passwd_script')
- except:
- pass
-
- 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:
- try:
- fencedev.removeAttribute('secure')
- except:
- pass
-
- return errors
-
def val_rps10_fd(form, fencedev):
errors = list()

@@ -1051,7 +989,6 @@
'fence_ipmilan': val_ipmilan_fd,
'fence_drac': val_drac_fd,
'fence_drac5': val_drac_fd,
- 'fence_idrac': val_idrac_fd,
'fence_rsa': val_rsa_fd,
'fence_rsb': val_rsa_fd, # same params as rsa
'fence_rps10': val_rps10_fd,
@@ -1376,7 +1313,6 @@
'fence_ipmilan': val_noop_fi,
'fence_drac': val_noop_fi,
'fence_drac5': val_noop_fi,
- 'fence_idrac': val_noop_fi,
'fence_rsa': val_noop_fi,
'fence_rsb': val_noop_fi,
'fence_rps10': val_noop_fi
--- conga/luci/site/luci/Extensions/ClusterModel/FenceDeviceAttr.py 2010/01/07 18:08:35 1.5.2.3
+++ conga/luci/site/luci/Extensions/ClusterModel/FenceDeviceAttr.py 2010/08/05 17:33:05 1.5.2.4
@@ -27,7 +27,6 @@
'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',
@@ -53,7 +52,6 @@
'fence_ilo': False,
'fence_ipmilan': False,
'fence_drac': False,
- 'fence_idrac': False,
'fence_rsa': False,
'fence_rps10': False,
'fence_manual': False
@@ -97,7 +95,6 @@
'fence_ilo': ( ),
'fence_ipmilan': ( ),
'fence_drac': ( ),
- 'fence_idrac': ( ),
'fence_rsa': ( ),
'fence_rps10': ( ),
'fence_manual': ( )
@@ -138,8 +135,6 @@
( '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':
--- conga/make/version.in 2009/05/14 21:05:58 1.21.2.52
+++ conga/make/version.in 2010/08/05 17:33:05 1.21.2.53
@@ -1,2 +1,2 @@
VERSION=0.12.2
-RELEASE=6
+RELEASE=13test
 

Thread Tools




All times are GMT. The time now is 09:32 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org