Bug 1608392
| Summary: | Status code from the API for unsupported reduce volume actions (for disk that resides on file based domain for example) is 400 (bad request) instead 409 (conflict) | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [oVirt] ovirt-engine | Reporter: | Shir Fishbain <sfishbai> | ||||
| Component: | RestAPI | Assignee: | shani <sleviim> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Shir Fishbain <sfishbai> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 4.2.5 | CC: | bugs, eedri, ratamir, sfishbai, sleviim, tnisan | ||||
| Target Milestone: | ovirt-4.2.6 | Flags: | rule-engine:
ovirt-4.2+
|
||||
| Target Release: | 4.2.6.2 | ||||||
| Hardware: | x86_64 | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | ovirt-engine-4.2.6.2 | Doc Type: | If docs needed, set a value | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2018-09-03 15:09:34 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | Storage | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
The bug reproduced.
The status code is still 400 Bad Request.
Response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<action>
<async>true</async>
<fault>
<detail>[Cannot ${action} Storage. Reduce image is not supported for shareable disks.]</detail>
<reason>Operation Failed</reason>
</fault>
<status>failed</status>
</action>
Looking at https://gerrit.ovirt.org/gitweb?p=ovirt-engine.git;a=shortlog;h=refs%2Fheads%2Fovirt-engine-4.2 It seems this patch got in after the tag for 4.2.6 was made, we'll check why the bot moved it to ON_QA prematurely. The bug was fixed.
The status code is 409 Conflict.
Response:
<action>
<async>true</async>
<fault>
<detail>[Cannot ${action} Storage. Reduce image is not supported for shareable disks.]</detail>
<reason>Operation Failed</reason>
</fault>
<status>failed</status>
</action>
ovirt-engine-4.2.6.3-0.0.master.20180813213957.gitf1e5f42.el7.noarch
vdsm-4.20.37-2.gitb789857.el7.x86_64
QE verification bot: the bug was verified upstream |
Created attachment 1470513 [details] engine.log Description of problem: An attempt to reduce of a shareable disk or disk that resides on file SD using REST API, returns a wrong status code - 400 (bad request) and it should return 409 conflict. Version-Release number of selected component (if applicable): 4.2.5.1-0.1.el7ev vdsm-4.20.34-1.el7ev.x86_64 How reproducible: Always Steps to Reproduce: 1. Create a shareable floating disk and attached them to two VMs Attached the disk on block based domain. 2. Call reduce for the disk: POST method Reduces the size of the disk image in the REST API. engine_addressti/disks/%disk_id%/reduce with request body as follows: <action> <async>true</async> </action> Actual results: The status code is 400 Bad Request Response: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <action> <async>true</async> <fault> <detail>[Cannot ${action} Storage. Reduce image is not supported for shareable disks.]</detail> <reason>Operation Failed</reason> </fault> <status>failed</status> </action> Expected results: The status should be 409 conflict. Additional info: