Bug 613871 - luci should not give ungraceful error messages when encountering fence devices that it does not recognize/support
luci should not give ungraceful error messages when encountering fence device...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: luci (Show other bugs)
6.0
All Linux
low Severity medium
: rc
: ---
Assigned To: Ryan McCabe
Toure Dunnon
:
: 615880 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-12 23:22 EDT by Ryan Mitchell
Modified: 2016-04-26 09:46 EDT (History)
6 users (show)

See Also:
Fixed In Version: luci-0.23.0-11.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-05-19 09:56:06 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Proposed patch to fix this bug. (2.25 KB, patch)
2010-12-22 12:01 EST, Jan Pokorný
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0655 normal SHIPPED_LIVE luci bug fix update 2011-05-19 05:47:45 EDT

  None (edit)
Description Ryan Mitchell 2010-07-12 23:22:25 EDT
Description of problem:
If you try to view a cluster in luci that has a manual fence device, the interface gives a 500 error:

Error 500
We're sorry but we weren't able to process this request.

Version-Release number of selected component (if applicable):
$ rpm -q luci
luci-0.22.2-3.el6.x86_64
$ rpm -q cman
cman-3.0.12-9.el6.x86_64
$ uname -r
2.6.32-42.el6.x86_64

Cluster I'm managing is RHEL5u3 so manual fencing is quite acceptable.


How reproducible:
Very reproducible.

Steps to Reproduce:
1. Create a RHEL5 cluster in RHEL6 luci with no fencing devices
2. Check that you can view and configure the cluster
3. Using RHEL5's system-config-cluster or other method, create a manual fence device.  In /etc/cluster/cluster.conf it looks like this:
	<fencedevices>
		<fencedevice agent="fence_manual" name="manualfence"/>
	</fencedevices>
4. After propagating fence device to cluster, try to view cluster configuration in RHEL6 luci again.
  
Actual results:
- 500 error in the luci interface.
- traceback in /var/log/luci.log on RHEL6 luci host.

Expected results:
- There is no error 500 and I can view and configure the cluster in RHEL6 luci.

Additional info:
I understand there are no options to create manual fence devices in RHEL6 luci.  I think we still want the system to be accessible even if a manual fence device is present.
Comment 1 Ryan Mitchell 2010-07-12 23:26:33 EDT
Traceback from /var/log/luci.log:

Error - <type 'exceptions.NameError'>: name 'fence_manual' is not defined
URL: https://laptop.bne.redhat.com:8084/cluster/rhel5u3
File '/usr/lib/python2.6/site-packages/weberror/errormiddleware.py', line 162 in __call__
  app_iter = self.application(environ, sr_checker)
File '/usr/lib/python2.6/site-packages/tg/configuration.py', line 655 in wrapper
  return app(environ, start_response)
File '/usr/lib/python2.6/site-packages/tg/configuration.py', line 555 in remover
  return app(environ, start_response)
File '/usr/lib/python2.6/site-packages/repoze/tm/__init__.py', line 19 in __call__
  result = self.application(environ, save_status_and_headers)
File '/usr/lib/python2.6/site-packages/tw/core/middleware.py', line 43 in __call__
  return self.wsgi_app(environ, start_response)
File '/usr/lib/python2.6/site-packages/tw/core/middleware.py', line 68 in wsgi_app
  resp = req.get_response(self.application)
File '/usr/lib/python2.6/site-packages/webob/__init__.py', line 1325 in get_response
  application, catch_exc_info=False)
File '/usr/lib/python2.6/site-packages/webob/__init__.py', line 1293 in call_application
  app_iter = application(self.environ, start_response)
File '/usr/lib/python2.6/site-packages/tw/core/resource_injector.py', line 68 in _injector
  resp = req.get_response(app)
File '/usr/lib/python2.6/site-packages/webob/__init__.py', line 1325 in get_response
  application, catch_exc_info=False)
File '/usr/lib/python2.6/site-packages/webob/__init__.py', line 1293 in call_application
  app_iter = application(self.environ, start_response)
File '/usr/lib/python2.6/site-packages/beaker/middleware.py', line 73 in __call__
  return self.app(environ, start_response)
File '/usr/lib/python2.6/site-packages/beaker/middleware.py', line 152 in __call__
  return self.wrap_app(environ, session_start_response)
File '/usr/lib/python2.6/site-packages/routes/middleware.py', line 130 in __call__
  response = self.app(environ, start_response)
File '/usr/lib/python2.6/site-packages/pylons/wsgiapp.py', line 125 in __call__
  response = self.dispatch(controller, environ, start_response)
File '/usr/lib/python2.6/site-packages/pylons/wsgiapp.py', line 324 in dispatch
  return controller(environ, start_response)
File '/usr/lib/python2.6/site-packages/luci/controllers/root.py', line 43 in __call__
  return BaseController.__call__(self, environ, start_response)
File '/usr/lib/python2.6/site-packages/luci/lib/base.py', line 30 in __call__
  return TGController.__call__(self, environ, start_response)
File '/usr/lib/python2.6/site-packages/pylons/controllers/core.py', line 221 in __call__
  response = self._dispatch_call()
File '/usr/lib/python2.6/site-packages/pylons/controllers/core.py', line 172 in _dispatch_call
  response = self._inspect_call(func)
File '/usr/lib/python2.6/site-packages/pylons/controllers/core.py', line 107 in _inspect_call
  result = self._perform_call(func, args)
File '/usr/lib/python2.6/site-packages/tg/controllers.py', line 857 in _perform_call
  self, controller, params, remainder=remainder)
File '/usr/lib/python2.6/site-packages/tg/controllers.py', line 182 in _perform_call
  response = self._render_response(controller, output)
File '/usr/lib/python2.6/site-packages/tg/controllers.py', line 358 in _render_response
  template_name=template_name)
File '/usr/lib/python2.6/site-packages/tg/render.py', line 141 in render
  return render_function(template_name, template_vars, **kwargs)
File '/usr/lib/python2.6/site-packages/tg/render.py', line 168 in render_genshi
  **kwargs)
File '/usr/lib/python2.6/site-packages/pylons/templating.py', line 338 in render_genshi
  ns_options=('method'), method=method)
File '/usr/lib/python2.6/site-packages/pylons/templating.py', line 249 in cached_template
  return render_func()
File '/usr/lib/python2.6/site-packages/pylons/templating.py', line 334 in render_template
  encoding=None))
File '/usr/lib64/python2.6/site-packages/genshi/core.py', line 179 in render
  return encode(generator, method=method, encoding=encoding, out=out)
File '/usr/lib64/python2.6/site-packages/genshi/output.py', line 60 in encode
  return _encode(u''.join(list(iterator)))
File '/usr/lib64/python2.6/site-packages/genshi/output.py', line 311 in __call__
  for kind, data, pos in stream:
File '/usr/lib64/python2.6/site-packages/genshi/output.py', line 592 in __call__
  for kind, data, pos in stream:
File '/usr/lib64/python2.6/site-packages/genshi/output.py', line 698 in __call__
  for kind, data, pos in chain(stream, [(None, None, None)]):
File '/usr/lib64/python2.6/site-packages/genshi/output.py', line 532 in __call__
  for ev in stream:
File '/usr/lib64/python2.6/site-packages/genshi/core.py', line 283 in _ensure
  for event in stream:
File '/usr/lib64/python2.6/site-packages/genshi/template/base.py', line 569 in _include
  for event in stream:
File '/usr/lib64/python2.6/site-packages/genshi/template/markup.py', line 279 in _match
  content = list(content)
File '/usr/lib64/python2.6/site-packages/genshi/template/base.py', line 569 in _include
  for event in stream:
File '/usr/lib64/python2.6/site-packages/genshi/template/markup.py', line 245 in _match
  for event in stream:
File '/usr/lib64/python2.6/site-packages/genshi/template/markup.py', line 234 in _strip
  event = stream.next()
File '/usr/lib64/python2.6/site-packages/genshi/template/base.py', line 545 in _exec
  _exec_suite(event[1], ctxt, **vars)
File '/usr/lib64/python2.6/site-packages/genshi/template/base.py', line 302 in _exec_suite
  suite.execute(_ctxt2dict(ctxt))
File '/usr/lib64/python2.6/site-packages/genshi/template/eval.py', line 201 in execute
  exec self.code in _globals, data
File '/usr/lib/python2.6/site-packages/luci/templates/node.html', line 34 in <Suite u'agent_type = fencedev.getAgentType() ...'>
  agent_type = fencedev.getAgentType()
File '<string>', line 1 in <module>
NameError: name 'fence_manual' is not defined


CGI Variables
-------------
  AUTH_TYPE: 'cookie'
  CONTENT_LENGTH: '0'
  HTTP_ACCEPT: 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
  HTTP_ACCEPT_CHARSET: 'ISO-8859-1,utf-8;q=0.7,*;q=0.7'
  HTTP_ACCEPT_ENCODING: 'gzip,deflate'
  HTTP_ACCEPT_LANGUAGE: 'en-us,en;q=0.5'
  HTTP_CONNECTION: 'keep-alive'
  HTTP_COOKIE: 'rh_omni_tc=70160000000H4AoAAK; s_vi=[CS]v1|25FDE77E051D0318-40000103E0003A5E[CE]; s_nr=1277506625954; s_vnum=1280098606584%26vn%3D47; rh_omni_itc=70160000000I4LWAA0; PREDHI.redhat.com=qrDEbPlzQNSjfQSQ8pLpSgTL:S; s_cc=true; s_ria=flash%2010%7Csilverlight%20not%20detected; s_sq=%5B%5BB%5D%5D; rh_shared_auth=d286a46758294bfb163d37983f50ff321ffd882f4ef3bcc7951e27ded19f2e46fa126e18478bc2c32c2773557177a35f04962f4ecb862a23e0f397ae5aa73efb6a9b1afa717247dc2d4d560dcbb8c0dd; rh_sso=0|hrPjUWkbl4dHSfnvxERGPwWSO7mhS4K0kGJ; rh_user=rhn-support-rmitchell|Ryan|customer|; rh_locale=en_US; luci=dacfc2ec9b2b08fac86a29684792a56b5ac34cd8b867b8861cca5ac74d2a0f40351e498e; auth_tkt="f1eedbf23487d09edeea45d903eefea74c3bd5a7root!"'
  HTTP_HOST: 'rmitchell-laptop.bne.redhat.com:8084'
  HTTP_KEEP_ALIVE: '115'
  HTTP_REFERER: 'https://laptop.bne.redhat.com:8084/cluster/rhel5u3/fences'
  HTTP_USER_AGENT: 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.6) Gecko/20100630 Red Hat/3.6.6-2.el6 Firefox/3.6.6'
  PATH_INFO: '/cluster/rhel5u3'
  REMOTE_ADDR: '10.64.1.142'
  REMOTE_USER: 'root'
  REMOTE_USER_TOKENS: ['']
  REQUEST_METHOD: 'GET'
  SERVER_NAME: '0.0.0.0'
  SERVER_PORT: '8084'
  SERVER_PROTOCOL: 'HTTP/1.1'


WSGI Variables
--------------
  application: <function wrapper at 0x3323578>
  beaker.cache: <beaker.cache.CacheManager object at 0x3324cd0>
  beaker.get_session: <bound method SessionMiddleware._get_session of <beaker.middleware.SessionMiddleware object at 0x3324c50>>
  beaker.session: {'_accessed_time': 1278990802.126905}
  paste.cookies: (<SimpleCookie: PREDHI.redhat.com='qrDEbPlzQNSjfQSQ8pLpSgTL:S' auth_tkt='f1eedbf23487d09edeea45d903eefea74c3bd5a7root!' luci='dacfc2ec9b2b08fac86a29684792a56b5ac34cd8b867b8861cca5ac74d2a0f40351e498e' rh_locale='en_US' rh_omni_itc='70160000000I4LWAA0' rh_omni_tc='70160000000H4AoAAK' rh_shared_auth='d286a46758294bfb163d37983f50ff321ffd882f4ef3bcc7951e27ded19f2e46fa126e18478bc2c32c2773557177a35f04962f4ecb862a23e0f397ae5aa73efb6a9b1afa717247dc2d4d560dcbb8c0dd' rh_sso='0|hrPjUWkbl4dHSfnvxERGPwWSO7mhS4K0kGJ' rh_user='rhn-support-rmitchell|Ryan|customer|' s_cc='true' s_nr='1277506625954' s_ria='flash%2010%7Csilverlight%20not%20detected' s_sq='%5B%5BB%5D%5D' s_vi='' s_vnum='1280098606584%26vn%3D47'>, 'rh_omni_tc=70160000000H4AoAAK; s_vi=[CS]v1|25FDE77E051D0318-40000103E0003A5E[CE]; s_nr=1277506625954; s_vnum=1280098606584%26vn%3D47; rh_omni_itc=70160000000I4LWAA0; PREDHI.redhat.com=qrDEbPlzQNSjfQSQ8pLpSgTL:S; s_cc=true; s_ria=flash%2010%7Csilverlight%20not%20detected; s_sq=...74c3bd5a7root!"')
  paste.httpserver.thread_pool: <paste.httpserver.ThreadPool object at 0x3337650>
  paste.registry: <paste.registry.Registry object at 0x7f5914a95a50>
  paste.throw_errors: True
  pylons.action_method: <bound method RootController.routes_placeholder of <luci.controllers.root.RootController object at 0x333bd90>>
  pylons.controller: <luci.controllers.root.RootController object at 0x333bd90>
  pylons.environ_config: {'session': 'beaker.session', 'cache': 'beaker.cache'}
  pylons.pylons: <pylons.util.PylonsContext object at 0x333b3d0>
  pylons.routes_dict: {'url': u'cluster/rhel5u3', 'action': u'routes_placeholder', 'controller': u'root'}
  repoze.tm.active: True
  repoze.what.credentials: {'repoze.what.userid': 'root', 'groups': ['managers'], 'permissions': ['manage']}
  repoze.who.identity: <repoze.who identity (hidden, dict-like) at 140020631478144>
  repoze.who.logger: <logging.Logger instance at 0x3335ef0>
  repoze.who.plugins: {'luci.lib.pamplugin:PAMPlugin': <luci.lib.pamplugin.PAMPlugin object at 0x332eed0>, 'friendlyform': <FriendlyFormPlugin 53654864>, 'auth_tkt': <AuthTktCookiePlugin 53669520>}
  routes.route: <routes.route.Route object at 0x31d3590>
  routes.url: <routes.util.URLGenerator object at 0x333b610>
  toscawidgets.framework: <tw.mods.base.HostFramework object at 0x3324d50>
  toscawidgets.javascript.require_once: False
  toscawidgets.prefix: '/toscawidgets'
  webob._parsed_query_vars: (MultiDict([]), '')
  webob.adhoc_attrs: {'start_response': <function repl_start_response at 0x7f591484f848>, 'response_ext': None, 'identity': <repoze.who identity (hidden, dict-like) at 140020631478144>, 'language': 'en-us', 'response_type': None}
  wsgi process: 'Multithreaded'
  wsgiorg.routing_args: (<routes.util.URLGenerator object at 0x333b610>, {'url': u'cluster/rhel5u3', 'action': u'routes_placeholder', 'controller': u'root'})
------------------------------------------------------------
Comment 2 Ryan Mitchell 2010-07-12 23:27:48 EDT
/etc/cluster/cluster.conf I used to reproduce (Red Hat Enterprise Linux 5.3 cluster):
# cat /etc/cluster/cluster.conf
<?xml version="1.0"?>
<cluster alias="rhel5u3" config_version="6" name="rhel5u3">
	<fence_daemon post_fail_delay="0" post_join_delay="3"/>
	<clusternodes>
		<clusternode name="rhel5u3clu1.virtnet100.net" nodeid="1" votes="1">
			<fence>
				<method name="1"/>
			</fence>
		</clusternode>
		<clusternode name="rhel5u3clu2.virtnet100.net" nodeid="2" votes="1">
			<fence>
				<method name="1"/>
			</fence>
		</clusternode>
	</clusternodes>
	<cman expected_votes="1" two_node="1"/>
	<fencedevices>
		<fencedevice agent="fence_manual" name="manualfence"/>
	</fencedevices>
	<rm>
		<failoverdomains/>
		<resources/>
	</rm>
</cluster>
Comment 4 Perry Myers 2010-07-12 23:43:12 EDT
@Ryan

fence_manual is not supported in RHEL5 at all.  We implemented fence_ack_manual to replace it a while back and have officially de-supported all usage of fence_manual.  Therefore it does not make sense to put it into RHEL6 Luci at all.  The fact that you get a 500 error is a bug certainly, but this bug will be fixed by removing the ability to set fence_manual at all.  We do _not_ want to enable or encourage its use.

See https://access.redhat.com/kb/docs/DOC-30003 for a listing of all of the fence devices, fence_manual is listed as unsupported in all versions of RHEL and RHEV.
Comment 5 Perry Myers 2010-07-13 00:04:16 EDT
Ok, rmitchell corrected me on smth.  fence_manual is not present in the Luci interface, it's just that if luci tries to read a config file with fence_manual in it, it explodes.  Config files w/ fence_manual are not supported since we don't support that fence device, but Luci should at least error out more gracefully when it sees something it does not recognize.  (for example, what if someone created their own custom fence device: fence_foo?)

So when an unrecognized/unsupported fence device is encountered, Luci should return a graceful error telling you that it cannot work with that device and if you continue to edit this cluster in the luci interface the offending fence devices will be removed.

rmitchell, does that sound reasonable?
Comment 6 Ryan Mitchell 2010-07-13 00:11:57 EDT
I believe that is reasonable.  I understand that fence_manual is not configurable in luci but luci needs to be graceful in handling fence devices that aren't configurable.
Comment 9 Chris Feist 2010-07-13 16:55:13 EDT
Resetting to assigned because if you view a node on the nodes page it will still give you a 500 error.
Comment 10 Fabio Massimo Di Nitto 2010-07-26 10:21:44 EDT
*** Bug 615880 has been marked as a duplicate of this bug. ***
Comment 20 Jan Pokorný 2010-12-22 12:01:32 EST
Created attachment 470261 [details]
Proposed patch to fix this bug.
Comment 21 Jan Pokorný 2010-12-22 12:09:37 EST
The same patch committed to upstream: http://git.fedorahosted.org/git/?p=luci.git;a=commit;h=b30734ccd162c16a392a48d81785c2965f113072
Comment 29 errata-xmlrpc 2011-05-19 09:56:06 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0655.html

Note You need to log in before you can comment on or make changes to this bug.