error when use api to reset volume status with integer

Bug #1622941 reported by Zhang Danyang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
New
Undecided
Tushar Trambak Gite

Bug Description

When use api to reset volume status,if set the parameter as integer , the server will return 500.

Reproduce step:

1.set the status of the volume as integer

curl -X POST -H "X-Auth-Token: ${mytoken}" "http://${my_ip}:8776/v2/${tenant_id}/volumes/${volume_id}/action" -H 'Content-type: application/json' -d "{
\"os-reset_status\" : {
\"status\" : 1
}

2.set the attach_status of the volume as integer

curl -X POST -H "X-Auth-Token: ${mytoken}" "http://${my_ip}:8776/v2/${tenant_id}/volumes/${volume_id}/action" -H 'Content-type: application/json' -d "{
\"os-reset_status\" : {
\"attach_status\" : 1
}

3.set the migration_status of the volume as integer

curl -X POST -H "X-Auth-Token: ${mytoken}" "http://${my_ip}:8776/v2/${tenant_id}/volumes/${volume_id}/action" -H 'Content-type: application/json' -d "{
\"os-reset_status\" : {
\"migration_status\" : 1
}

we will get such log in c-api.log

1.status
http://paste.openstack.org/show/573540/

2.attach_status
http://paste.openstack.org/show/573539/

3.migration_status
http://paste.openstack.org/show/573538/

Tags: cinder-api
Zhang Danyang (zdy349)
Changed in cinder:
assignee: nobody → Zhang Danyang (zdy349)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/369277

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (master)

Change abandoned by Sean McGinnis (<email address hidden>) on branch: master
Review: https://review.openstack.org/369277
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Revision history for this message
Sean McGinnis (sean-mcginnis) wrote : Bug Assignee Expired

Unassigning due to no activity for > 6 months.

Changed in cinder:
assignee: Zhang Danyang (zdy349) → nobody
status: In Progress → New
Changed in cinder:
assignee: nobody → Tushar Trambak Gite (tushargite96)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.