conga ./conga.spec.in.in luci/cluster/cluster_ ...
CVSROOT: /cvs/cluster
Module name: conga
Branch: RHEL5
Changes by: rmccabe at sourceware.org 2008-08-07 18:08:24
Modified files:
. : conga.spec.in.in
luci/cluster : cluster_config-macros cluster_svc-macros
resource_form_handlers.js
luci/site/luci/Extensions: LuciClusterInfo.py LuciValidation.py luci/site/luci/var: Data.fs
make : version.in
Log message:
More fixes for bz429350
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/conga.spec.in.in.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.45.2.99&r2=1.45.2.100
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/cluster_config-macros.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.3.2.3&r2=1.3.2.4
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/cluster_svc-macros.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.3.2.6&r2=1.3.2.7
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/resource_form_handlers.js.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.20.2.15&r2=1.20.2.16
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/LuciClusterInfo.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/site/luci/Extensions/LuciValidation.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.6.2.7&r2=1.6.2.8
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/var/Data.fs.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.15.2.36&r2=1.15.2.37
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/make/version.in.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.21.2.43&r2=1.21.2.44
conga.spec.in.in +3 -0
@@ -312,6 +312,9 @@ ### changelog ### %changelog +* Thu Aug 07 2008 Ryan McCabe <[email protected]> 0.12.1-3 +- More fixes for bz429350 + * Thu Jul 10 2008 Ryan McCabe <[email protected]> 0.12.1-1 - Fix bz444938 (conga fails to create proper cluster.conf entries for gfs2 filesystem type) - Fix bz444210 (Adding multiple fence devices at the same time causes duplicate entries)
luci/cluster/cluster_config-macros +8 -7
@@ -715,34 +715,35 @@ </td> </tr> - <tr class="systemsTable"><td colspan="2"> <table class="systemsTable"> <tr class="systemsTable"> <td class="systemsTable"> <input type="radio" name="qdisk_dev_label" - onclick="disable_text_field(this.form.label, this.form.device)">Label + onclick="disable_text_field(this.form.label, this.form.device)" + tal:attributes=" + checked python:(clusterinfo.get('label') or not clusterinfo.get('device')) and 'checked' or ''">Label </td> <td class="systemsTable"> <input type="text" name="label" id="qdisk_label" onfocus="disable_text_field(this.form.label, this.form.device);this.form.qdisk_dev_label[0].checked='checked';" tal:attributes=" - disabled python:(clusterinfo.get('label') or not clusterinfo.get('device')) and '' or 'disabled'; - checked python:(clusterinfo.get('label') or not clusterinfo.get('label')) and 'checked' or ''; + disabled python:(not clusterinfo.get('label') and clusterinfo.get('device')) and 'disabled' or ''; value clusterinfo/label | nothing" /> </td> </tr> <tr class="systemsTable"> <td class="systemsTable"> <input type="radio" name="qdisk_dev_label" - onclick="disable_text_field(this.form.device, this.form.label)">Device (deprecated) + onclick="disable_text_field(this.form.device, this.form.label)" + tal:attributes=" + checked python:clusterinfo.get('device') and 'checked' or ''">Device (deprecated) </td> <td class="systemsTable"> <input type="text" name="device" id="qdisk_device" onfocus="disable_text_field(this.form.device, this.form.label);this.form.qdisk_dev_label[1].checked='checked';" tal:attributes=" - disabled python:clusterinfo.get('device') and '' or 'disabled'; - checked python:clusterinfo.get('device') and 'checked' or ''; + disabled python:not clusterinfo.get('device') and 'disabled' or ''; value clusterinfo/device | nothing" /> </td> </tr>
luci/cluster/cluster_svc-macros +4 -0
@@ -375,6 +375,8 @@ <input type="hidden" name="exclusive" value="-1" /> <input type="hidden" name="recovery" /> <input type="hidden" name="domain" /> + <input type="hidden" name="max_restarts" /> + <input type="hidden" name="restart_expire_time" /> <input type="hidden" name="form_xml" /> <input type="hidden" name="action" value="add" /> </form>
@@ -760,6 +762,8 @@ <input type="hidden" name="exclusive" value="-1" /> <input type="hidden" name="recovery" /> <input type="hidden" name="domain" /> + <input type="hidden" name="max_restarts" /> + <input type="hidden" name="restart_expire_time" /> <input type="hidden" name="form_xml" /> <input type="hidden" name="action" value="edit" /> </form>
luci/cluster/resource_form_handlers.js +18 -0
@@ -479,6 +479,8 @@ var domain = null; var exclusive = 0; var recovery = null; + var max_restarts = null; + var restart_expire_time = null; submit_btn = submit_button; submit_button.disabled = true;
@@ -509,6 +511,18 @@ recovery = null; } + if (form[i].max_restarts) { + max_restarts = form[i].max_restarts.value; + if (str_is_blank(max_restarts)) + max_restarts = null; + } + + if (form[i].restart_expire_time) { + restart_expire_time = form[i].restart_expire_time.value; + if (str_is_blank(restart_expire_time)) + restart_expire_time = null; + } + if (form[i].domain) { domain = form[i].domain.options[form[i].domain.options.selectedIndex].value; if (str_is_blank(domain))
@@ -581,6 +595,10 @@ master_form.domain.value = domain; if (recovery) master_form.recovery.value = recovery; + if (max_restarts) + master_form.max_restarts.value = max_restarts; + if (restart_expire_time) + master_form.restart_expire_time.value = restart_expire_time; master_form.autostart.value = autostart; master_form.exclusive.value = exclusive;
luci/site/luci/Extensions/LuciClusterInfo.py +15 -1
@@ -423,6 +423,20 @@ hmap['recovery'] = None try: + hmap['max_restarts'] = svc.getAttribute('max_restarts') + if not hmap['max_restarts']: + hmap['max_restarts'] = 0 + except: + hmap['max_restarts'] = 0 + + try: + hmap['restart_expire_time'] = svc.getAttribute('restart_expire_time') + if not hmap['restart_expire_time']: + hmap['restart_expire_time'] = 0 + except: + hmap['restart_expire_time'] = 0 + + try: if int(svc.getAttribute('exclusive')): hmap['exclusive'] = 'true' else:
@@ -1088,7 +1102,7 @@ nl_map['fdoms'] = fdom_dict_list - if model.has_errors(): + if model and model.has_errors(): nl_map['has_errors'] = True nl_map['errmsgs'] = model.get_errmsgs() resultlist.append(nl_map)
luci/site/luci/Extensions/LuciValidation.py +15 -12
@@ -370,26 +370,28 @@ if recovery is not None and recovery != 'restart' and recovery != 'relocate' and recovery != 'disable': errors.append('You entered an invalid recovery option: "%s" Valid options are "restart" "relocate" and "disable."') + max_restarts = None + restart_expire_time = None + if recovery == 'restart': - max_restarts = None - if fvar['max_restarts']: + if fvar['max_restarts'] is not None: try: max_restarts = int(fvar['max_restarts']) if max_restarts < 0: - raise ValueError, 'must be greater than 0' + raise ValueError, 'must be greater than or equal to 0' except Exception, e: errors.append('Maximum restarts must be a number greater than or equal to 0') max_restarts = None - restart_expire_time = None - if fvar['restart_expire_time']: + if fvar['restart_expire_time'] is not None: try: restart_expire_time = int(fvar['restart_expire_time']) if restart_expire_time < 0: - raise ValueError, 'must be greater than 0' + raise ValueError, 'must be greater than or equal to 0' except Exception, e: 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:
@@ -1114,22 +1116,23 @@ recovery = fvar['recovery'] if recovery is not None and recovery != 'restart' and recovery != 'relocate' and recovery != 'disable': errors.append('You entered an invalid recovery option "%s" for VM service "%s". Valid options are "restart" "relocate" and "disable"' % (recovery, vm_name)) + + max_restarts = None + restart_expire_time = None if recovery == 'restart': - max_restarts = None - if fvar['max_restarts']: + if fvar['max_restarts'] is not None: try: max_restarts = int(fvar['max_restarts']) if max_restarts < 0: - raise ValueError, 'must be greater than 0' + raise ValueError, 'must be greater than or equal to 0' except Exception, e: errors.append('Maximum restarts must be a number greater than or equal to 0') max_restarts = None - restart_expire_time = None - if fvar['restart_expire_time']: + if fvar['restart_expire_time'] is not None: try: restart_expire_time = int(fvar['restart_expire_time']) if restart_expire_time < 0: - raise ValueError, 'must be greater than 0' + raise ValueError, 'must be greater than or equal to 0' except Exception, e: errors.append('Restart expire time must be a number greater than or equal to 0') restart_expire_time = None
Binary files /cvs/cluster/conga/luci/site/luci/var/Data.fs 2008/07/30 21:27:07 1.15.2.36 and /cvs/cluster/conga/luci/site/luci/var/Data.fs 2008/08/07 18:07:37 1.15.2.37 differ
rcsdiff: /cvs/cluster/conga/luci/site/luci/var/Data.fs: diff failed
make/version.in +1 -1
@@ -1,2 +1,2 @@ VERSION=0.12.1 -RELEASE=2 +RELEASE=3