Bug 615917

Summary: adding per node fence instance results in error 500 if no fence devices are configured
Product: Red Hat Enterprise Linux 6 Reporter: Fabio Massimo Di Nitto <fdinitto>
Component: luciAssignee: Chris Feist <cfeist>
Status: CLOSED CURRENTRELEASE QA Contact: Toure Dunnon <tdunnon>
Severity: medium Docs Contact:
Priority: low    
Version: 6.0CC: bbrock, cfeist, cluster-maint, rmccabe, tdunnon
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: luci-0.22.2-9.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-10 22:12:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Fabio Massimo Di Nitto 2010-07-19 09:25:29 UTC
again using latest luci.git:

cluster -> nodes -> nodename -> add fence method -> add a fence instance -> KABOOM

backtrace:

Error - <type 'exceptions.KeyError'>: 'parent_fencedev'
URL: https://luci-rhel6.int.fabbione.net:8084/cluster/fabbione-rhel6/nodes_fence_cmd?command=AddFence
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 172 in _perform_call
  output = controller(*remainder, **dict(params))
File '/usr/lib/python2.6/site-packages/luci/controllers/cluster.py', line 183 in nodes_fence_cmd
  parent_fencedev = kw['parent_fencedev'].replace('fd_', '', 1)
KeyError: 'parent_fencedev'

this is due to the fact that no Fence Devices from the top menu have been configured yet.

Comment 1 Chris Feist 2010-07-19 20:31:50 UTC
Fixed in ed7581f225169c7ca87d100e5a44d2b543c6e2cd

Comment 2 Fabio Massimo Di Nitto 2010-07-20 09:57:03 UTC
tested with today current luci.git and the menu does not show unless there is a fence device configured.

Side note, might be a good idea to give a message to the users about it or it seems a bit obscure that you can define a fence method without device.

Comment 6 releng-rhel@redhat.com 2010-11-10 22:12:02 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.