400 Bad Request not raised for string values of 'enabled' when update a tenant
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Identity (keystone) |
Fix Released
|
Low
|
Wu Wenxiang |
Bug Description
When update a tenant with string value of 'enable', 500 Internal Server Error raised, which should be 400 Bad Request.
Reproduce Step:
trystack@Key31:~$ curl -s -H 'Content-Type: application/json' -d '{"tenant"
{
"error": {
"code": 500,
"message": "An unexpected error prevented the server from fulfilling your request. invalid literal for int() with base 10: 'true' (original cause: ValueError: invalid literal for int() with base 10: 'true') 'UPDATE project SET enabled=%s WHERE project.id = %s' [{u'project_id': u'7d037c0b18d34
"title": "Internal Server Error"
}
}
Log:
2013-06-16 03:00:43 ERROR [keystone.
Traceback (most recent call last):
File "/home/
result = method(context, **params)
File "/home/
context, tenant_id, clean_tenant)
File "/home/
return f(*args, **kw)
File "/home/
return method(*args, **kwargs)
File "/home/
session.flush()
File "/usr/local/
self.
File "/usr/local/
flush_
File "/usr/local/
rec.
File "/usr/local/
uow
File "/usr/local/
mapper, table, update)
File "/usr/local/
execute(
File "/usr/local/
params)
File "/usr/local/
compiled_sql, distilled_params
File "/usr/local/
None, None)
File "/usr/local/
context = constructor(
File "/usr/local/
param.
File "/usr/local/
return int(value)
StatementError: invalid literal for int() with base 10: 'true' (original cause: ValueError: invalid literal for int() with base 10: 'true') 'UPDATE project SET enabled=%s WHERE project.id = %s' [{u'project_id': u'7d037c0b18d34
Changed in keystone: | |
assignee: | nobody → Wu Wenxiang (wu-wenxiang) |
Changed in keystone: | |
importance: | Undecided → Low |
Changed in keystone: | |
milestone: | none → havana-2 |
status: | Fix Committed → Fix Released |
Changed in keystone: | |
milestone: | havana-2 → 2013.2 |
Fix proposed to branch: master /review. openstack. org/33173
Review: https:/