Bug 1636724
| Summary: | Status code from the API for unsupported reduce volume actions (for reduce a size of a floating disk when the dc version is under 4.2) 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.6 | CC: | aefrat, bugs, lveyde, ratamir, tnisan | ||||||
| Target Milestone: | ovirt-4.2.7 | Keywords: | Automation | ||||||
| Target Release: | --- | Flags: | rule-engine:
ovirt-4.2+
rule-engine: ovirt-4.3+ rule-engine: exception+ |
||||||
| Hardware: | x86_64 | ||||||||
| OS: | Unspecified | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | ovirt-engine-4.2.7.3 | Doc Type: | If docs needed, set a value | ||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2018-11-02 14:34:03 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: |
|
||||||||
Created attachment 1491531 [details]
Automation_script
Created attachment 1491532 [details]
engine.log
Verified
Response:
Status Code: 409 Conflict
<action>
<async>true</async>
<fault>
<detail>[Cannot ${action} Storage. Reduce image is not supported by data center version 4.1.]</detail>
<reason>Operation Failed</reason>
</fault>
<status>failed</status>
</action>
ovirt-engine-4.3.0-0.0.master.20181012165724.gitd25f971.el7.noarch
vdsm-4.30.0-640.git6fd8327.el7.x86_64
QE verification bot: the bug was verified upstream This bugzilla is included in oVirt 4.2.7 release, published on November 2nd 2018. Since the problem described in this bug report should be resolved in oVirt 4.2.7 release, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report. |
Description of problem: An attempt to reduce of a floating disk when the dc version is under 4.2 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): ovirt-engine-4.2.6.5-0.0.master.20180914152430.gitb8a2050.el7.noarch vdsm-4.20.39-15.gitae7d021.el7.x86_64 How reproducible: Always Steps to Reproduce: 1.Create DC (dc version under 4.2) & cluster & SD 2.Add disk and attached the disk to a new VM 3.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: 2018-10-07 11:18:57,312 - MainThread - api_utils - WARNING - Failed to syncAction element as expected: Status: 400 Reason: Bad Request Detail: [Cannot ${action} Storage. Reduce image is not supported by data center version 4.1.] Expected results: The status should be 409 conflict Additional info: