Create Volume snapshot force parameter is not validated
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Fix Released
|
Low
|
John Griffith | ||
OpenStack Compute (nova) |
Fix Released
|
Low
|
Rongze Zhu | ||
python-cinderclient |
Invalid
|
Undecided
|
Seif Lotfy |
Bug Description
Description:
Create Volume snapshot with invalid Force value is returning 200 ok instead of raising Bad Request.
Expected Result:
Should return error code 400. (raise Bad Request)
Actual Result:
Is not raising exception. Returning 200 ok.
LOG:
-------
-------
rajalakshmi_
connect: (10.233.53.165, 8774)
send: 'GET /v1.1/ HTTP/1.1\r\nHost: 10.233.
reply: 'HTTP/1.1 204 No Content\r\n'
header: Content-Length: 0
header: X-Auth-Token: admin:admin
header: X-Server-
header: Content-Type: text/plain; charset=UTF-8
header: Date: Mon, 18 Jun 2012 19:52:37 GMT
send: 'POST /v1.1/admin/
reply: 'HTTP/1.1 200 OK\r\n'
header: X-Compute-
header: Content-Type: application/json
header: Content-Length: 165
header: Date: Mon, 18 Jun 2012 19:52:37 GMT
rajalakshmi_
connect: (10.233.53.165, 8774)
send: 'GET /v1.1/ HTTP/1.1\r\nHost: 10.233.
reply: 'HTTP/1.1 204 No Content\r\n'
header: Content-Length: 0
header: X-Auth-Token: admin:admin
header: X-Server-
header: Content-Type: text/plain; charset=UTF-8
header: Date: Mon, 18 Jun 2012 19:53:10 GMT
send: 'POST /v1.1/admin/
reply: 'HTTP/1.1 200 OK\r\n'
header: X-Compute-
header: Content-Type: application/json
header: Content-Length: 165
header: Date: Mon, 18 Jun 2012 19:53:10 GMT
rajalakshmi_
connect: (10.233.53.165, 8774)
send: 'GET /v1.1/ HTTP/1.1\r\nHost: 10.233.
reply: 'HTTP/1.1 204 No Content\r\n'
header: Content-Length: 0
header: X-Auth-Token: admin:admin
header: X-Server-
header: Content-Type: text/plain; charset=UTF-8
header: Date: Mon, 18 Jun 2012 19:55:15 GMT
send: 'POST /v1.1/admin/
reply: 'HTTP/1.1 200 OK\r\n'
header: X-Compute-
header: Content-Type: application/json
header: Content-Length: 165
header: Date: Mon, 18 Jun 2012 19:55:15 GMT
Changed in nova: | |
assignee: | nobody → Rongze Zhu (zrzhit) |
Changed in nova: | |
milestone: | none → folsom-rc1 |
status: | Fix Committed → Fix Released |
Changed in cinder: | |
milestone: | none → folsom-rc2 |
Changed in cinder: | |
assignee: | Rongze Zhu (zrzhit) → John Griffith (john-griffith) |
Changed in cinder: | |
milestone: | folsom-rc2 → 2012.2 |
Changed in nova: | |
milestone: | folsom-rc1 → 2012.2 |
Changed in cinder: | |
status: | Fix Released → Triaged |
Changed in python-cinderclient: | |
status: | Fix Committed → Triaged |
Changed in cinder: | |
status: | Triaged → Fix Released |
Right, all we're doing is:
force = snapshot. get('force' , False)
if force:
...
else:
...
we're not validating that it's a boolean value
utils.bool_ from_str( ) is probably what's needed here