conga ./conga.spec.in.in luci/site/luci/Extens ...
CVSROOT: /cvs/cluster
Module name: conga
Branch: RHEL4
Changes by: rmccabe at sourceware.org 2007-05-02 02:39:53
Modified files:
. : conga.spec.in.in
luci/site/luci/Extensions: FenceHandler.py cluster_adapters.py
Log message:
Fix 238656: conga does not set the "nodename" attribute for manual fencing
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/conga.spec.in.in.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.67.2.10&r2=1.67.2.11
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.1&r2=1.17.2.2
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.18&r2=1.227.2.19
conga.spec.in.in +3 -0
@@ -288,6 +288,9 @@ %changelog +* Tue Apr 30 2007 Ryan McCabe <[email protected]> 0.9.1-9 +- Fix bz238656 (conga does not set the "nodename" attribute for manual fencing) + * Tue Apr 30 2007 Ryan McCabe <[email protected]> 0.9.1-8 - Do not build for ppc64 - Resolves: bz236827
luci/site/luci/Extensions/FenceHandler.py +17 -4
@@ -29,7 +29,7 @@ FI_PROVIDE_IPADDRESS = 'An IP address must be provided for this Fence' FI_PROVIDE_ELPAN = 'A LPAN value must be provided for this Egenera Fence' 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_NODENAME = 'A Node Name value must be provided for this Fence' ILLEGAL_CHARS_REPLACED = 'Illegal characters were replaced by underscores. Feel free to set a new value.'
@@ -120,7 +120,7 @@ 'fence_drac': [], 'fence_rsa': [], 'fence_rps10': [], - 'fence_manual': [] + 'fence_manual': ['nodename'] } FENCE_FD_ATTRS = {
@@ -1094,6 +1094,19 @@ fenceinst.addAttribute('nodename', nodename) return errors +def val_manual_fi(form, fenceinst): + errors = list() + + try: + nodename = form['nodename'].strip() + if not nodename: + raise Exception, 'blank' + except Exception, e: + errors.append(FI_PROVIDE_NODENAME) + + fenceinst.addAttribute('nodename', nodename) + return errors + def val_noop_fi(dummy, _dummy): return []
@@ -1110,12 +1123,12 @@ 'fence_bullpap': val_bullpap_fi, 'fence_xvm': val_xvm_fi, 'fence_scsi': val_scsi_fi, + 'fence_manual': val_manual_fi, 'fence_ilo': val_noop_fi, 'fence_ipmilan': val_noop_fi, 'fence_drac': val_noop_fi, 'fence_rsa': val_noop_fi, - 'fence_rps10': val_noop_fi, - 'fence_manual': val_noop_fi + 'fence_rps10': val_noop_fi } def validate_fenceinstance(form, parent_name, fence_agent):
luci/site/luci/Extensions/cluster_adapters.py +8 -2
@@ -1877,7 +1877,10 @@ # Add back the tags under the method block # for the fence instance - instance_list.append({'name': fencedev_name }) + if fence_type == 'fence_manual': + instance_list.append({'name': fencedev_name, 'nodename': nodename }) + else: + instance_list.append({'name': fencedev_name }) else: # The user created a new fence device. retcode, retmsg = validateNewFenceDevice(fence_form, model)
@@ -1891,7 +1894,10 @@ # so the appropriate XML goes into the <method> block inside # <node><fence>. All we need for that is the device name. if not 'sharable' in fence_form: - instance_list.append({'name': fencedev_name }) + if fence_type == 'fence_manual': + instance_list.append({'name': fencedev_name, 'nodename': nodename }) + else: + instance_list.append({'name': fencedev_name }) if fencedev_unknown is True: # Save any instances for this fence device.