Bug 615917 - adding per node fence instance results in error 500 if no fence devices are configured
adding per node fence instance results in error 500 if no fence devices are c...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: luci (Show other bugs)
6.0
All Linux
low Severity medium
: rc
: ---
Assigned To: Chris Feist
Toure Dunnon
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-19 05:25 EDT by Fabio Massimo Di Nitto
Modified: 2010-11-10 17:12 EST (History)
5 users (show)

See Also:
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 17:12:02 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Fabio Massimo Di Nitto 2010-07-19 05:25:29 EDT
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 16:31:50 EDT
Fixed in ed7581f225169c7ca87d100e5a44d2b543c6e2cd
Comment 2 Fabio Massimo Di Nitto 2010-07-20 05:57:03 EDT
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 17:12:02 EST
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.

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