Description of problem: Can't add new power_type through beaker web site. Version-Release number of selected component (if applicable): beaker-0.5.42-2. beaker-server-0.5.42-2. beaker-client-0.5.42-2. beaker-labcontroller-0.5.42-2. Steps to Reproduce: 1. Admin -> power type -> Add(+) -> Click "submit data" without specifying "name". Then, I got the following: 500 Internal error 2. After that, I retried to submit new power type as follows. Admin -> power type However, I got "500 Internal error" again. Actual results: See "Steps to Reproduce". Expected results: Beaker should accept new power_type in step2. Additional info: Contents of power_type tables just after step1 were the following. mysql> select * from power_type; +----+-------------+ | id | name | +----+-------------+ | 1 | apc_snmp | | 2 | bladecenter | | 3 | bladepap | | 4 | drac | | 5 | ether_wake | | 6 | ilo | | 7 | integrity | | 8 | ipmilan | | 9 | ipmitool | | 10 | lpar | | 11 | rsa | | 12 | virsh | | 13 | wti | | 14 | | +----+-------------+ 14 rows in set (0.00 sec) I guess id=14 ,the tuple which "name" entry is NULL, causes internal error. Users need to modify mysql table directly to recover from internal error. It seems user-unfriendly. So I think beaker shouldn't add the tuple which "name" entry is NULL to the power_type table, /var/log/beaker/server.log is following. I hope this helps. <snip> 21/Jun/2010:20:51:55 HTTP INFO Page handler: <bound method PowerTypes.index of <bkr.server.power.PowerTypes object at 0x2aaac0496490>> Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/cherrypy/_cphttptools.py", line 121, in _run self.main() File "/usr/lib/python2.4/site-packages/cherrypy/_cphttptools.py", line 264, in main body = page_handler(*virtual_path, **self.params) File "<string>", line 3, in index File "/usr/lib/python2.4/site-packages/turbogears/controllers.py", line 358, in expose output = database.run_with_transaction( File "<string>", line 5, in run_with_transaction File "/usr/lib/python2.4/site-packages/turbogears/database.py", line 407, in sa_rwt retval = func(*args, **kw) File "<string>", line 5, in _expose File "/usr/lib/python2.4/site-packages/turbogears/controllers.py", line 373, in <lambda> mapping, fragment, args, kw))) File "/usr/lib/python2.4/site-packages/turbogears/controllers.py", line 410, in _execute_func output = errorhandling.try_call(func, *args, **kw) File "/usr/lib/python2.4/site-packages/turbogears/errorhandling.py", line 77, in try_call return func(self, *args, **kw) File "<string>", line 3, in index File "/usr/lib/python2.4/site-packages/turbogears/paginate.py", line 168, in decorated output = func(*args, **kw) File "/usr/lib/python2.4/site-packages/bkr/server/power.py", line 134, in index list_by_letters = set([elem.name[0].capitalize() for elem in powertypes]) IndexError: string index out of range <snip>
Hi Bill, I found new bug in beaker-*-0.5.42-2. Please fix it. Regards,
Hi Seiji, Thanks for pointing this out. Here is the patch http://git.fedorahosted.org/git/?p=beaker.git;a=blobdiff;f=Server/bkr/server/power.py;h=6d160838172069b83292f149dfdd1d6837ffa2f5;hp=9bae11691ad53f17ad26fc051da11ab4761f837d;hb=4e3d657fd7a5fd0340996b53d1c4e0ec65b02fd5;hpb=f284b7ad8a227ec6354f2010ee42d50eeaf690cc
This was fixed in beaker-server-0.5.46-1.