From mboxrd@z Thu Jan 1 00:00:00 1970 From: rmccabe@sourceware.org Date: 2 Feb 2007 00:11:05 -0000 Subject: [Cluster-devel] conga/luci cluster/form-macros site/luci/Exten ... Message-ID: <20070202001105.20559.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 Changes by: rmccabe at sourceware.org 2007-02-02 00:11:05 Modified files: luci/cluster : form-macros luci/site/luci/Extensions: cluster_adapters.py Log message: Disallow multicast configuration options for GULM clusters Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&r1=1.172&r2=1.173 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&r1=1.225&r2=1.226 --- conga/luci/cluster/form-macros 2007/02/01 23:48:51 1.172 +++ conga/luci/cluster/form-macros 2007/02/02 00:11:05 1.173 @@ -550,18 +550,13 @@ class python: 'configTab' + (configTabNum == 2 and ' configTabActive' or ''); ">Fence -
  • +
  • Multicast
  • -
  • - Quorum Partition -
  • @@ -569,6 +564,13 @@ href clusterinfo/gulm_url | nothing; class python: 'configTab' + (configTabNum == 5 and ' configTabActive' or '')">GULM
  • + +
  • + Quorum Partition +
  • --- conga/luci/site/luci/Extensions/cluster_adapters.py 2007/02/01 23:48:51 1.225 +++ conga/luci/site/luci/Extensions/cluster_adapters.py 2007/02/02 00:11:05 1.226 @@ -906,6 +906,13 @@ # rhel5 cluster version def validateMCastConfig(model, form): + try: + gulm_ptr = model.getGULMPtr() + if gulm_ptr: + return (False, {'errors': ['Multicast cannot be used with GULM locking.']}) + except: + pass + errors = list() try: mcast_val = form['mcast'].strip().lower() @@ -3506,24 +3513,25 @@ clumap['pjd'] = pjd #post fail delay clumap['pfd'] = pfd - #------------- - #if multicast - multicast_url = prop_baseurl + PROPERTIES_TAB + "=" + PROP_MCAST_TAB - clumap['multicast_url'] = multicast_url - #mcast addr - is_mcast = model.isMulticast() - #clumap['is_mcast'] = is_mcast - if is_mcast: - clumap['mcast_addr'] = model.getMcastAddr() - clumap['is_mcast'] = "True" - else: - clumap['is_mcast'] = "False" - clumap['mcast_addr'] = "1.2.3.4" - #------------- - #GULM params (rhel4 only) gulm_ptr = model.getGULMPtr() - if gulm_ptr: + if not gulm_ptr: + #------------- + #if multicast + multicast_url = prop_baseurl + PROPERTIES_TAB + "=" + PROP_MCAST_TAB + clumap['multicast_url'] = multicast_url + #mcast addr + is_mcast = model.isMulticast() + if is_mcast: + clumap['mcast_addr'] = model.getMcastAddr() + clumap['is_mcast'] = "True" + else: + clumap['is_mcast'] = "False" + clumap['mcast_addr'] = "1.2.3.4" + clumap['gulm'] = False + else: + #------------- + #GULM params (rhel4 only) lockserv_list = list() clunodes = model.getNodes() gulm_lockservs = map(lambda x: x.getName(), gulm_ptr.getChildren()) @@ -3535,8 +3543,6 @@ clumap['gulm'] = True clumap['gulm_url'] = prop_baseurl + PROPERTIES_TAB + '=' + PROP_GULM_TAB clumap['gulm_lockservers'] = lockserv_list - else: - clumap['gulm'] = False #------------- #quorum disk params