From mboxrd@z Thu Jan 1 00:00:00 1970 From: rmccabe@sourceware.org Date: 7 Aug 2008 18:08:28 -0000 Subject: [Cluster-devel] conga ./conga.spec.in.in luci/cluster/cluster_ ... Message-ID: <20080807180828.11796.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: 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/conga.spec.in.in 2008/07/28 17:49:44 1.45.2.99 +++ conga/conga.spec.in.in 2008/08/07 18:07:36 1.45.2.100 @@ -312,6 +312,9 @@ ### changelog ### %changelog +* Thu Aug 07 2008 Ryan McCabe 0.12.1-3 +- More fixes for bz429350 + * Thu Jul 10 2008 Ryan McCabe 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) --- conga/luci/cluster/cluster_config-macros 2008/07/14 21:52:30 1.3.2.3 +++ conga/luci/cluster/cluster_config-macros 2008/08/07 18:07:37 1.3.2.4 @@ -715,34 +715,35 @@ - --- conga/luci/cluster/cluster_svc-macros 2008/08/04 21:49:30 1.3.2.6 +++ conga/luci/cluster/cluster_svc-macros 2008/08/07 18:07:37 1.3.2.7 @@ -375,6 +375,8 @@ + + @@ -760,6 +762,8 @@ + + --- conga/luci/cluster/resource_form_handlers.js 2008/03/12 15:13:12 1.20.2.15 +++ conga/luci/cluster/resource_form_handlers.js 2008/08/07 18:07:37 1.20.2.16 @@ -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; --- conga/luci/site/luci/Extensions/LuciClusterInfo.py 2008/08/04 21:49:30 1.1.4.12 +++ conga/luci/site/luci/Extensions/LuciClusterInfo.py 2008/08/07 18:07:37 1.1.4.13 @@ -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) --- conga/luci/site/luci/Extensions/LuciValidation.py 2008/07/31 18:46:40 1.6.2.7 +++ conga/luci/site/luci/Extensions/LuciValidation.py 2008/08/07 18:07:37 1.6.2.8 @@ -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 --- conga/make/version.in 2008/07/30 21:27:55 1.21.2.43 +++ conga/make/version.in 2008/08/07 18:08:24 1.21.2.44 @@ -1,2 +1,2 @@ VERSION=0.12.1 -RELEASE=2 +RELEASE=3
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
Device (deprecated) + onclick="disable_text_field(this.form.device, this.form.label)" + tal:attributes=" + checked python:clusterinfo.get('device') and 'checked' or ''">Device (deprecated)