Bug 1358860
| Summary: | Api v3 error return null in disk search | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [oVirt] ovirt-engine | Reporter: | Clesio Santos <clesio> | ||||||||
| Component: | RestAPI | Assignee: | Juan Hernández <juan.hernandez> | ||||||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Eyal Shenitzky <eshenitz> | ||||||||
| Severity: | urgent | Docs Contact: | |||||||||
| Priority: | unspecified | ||||||||||
| Version: | 4.0.1 | CC: | acanan, bugs, clesio, nicolas, redhat, sbonazzo, ybronhei | ||||||||
| Target Milestone: | ovirt-4.0.2 | Keywords: | Regression, ZStream | ||||||||
| Target Release: | 4.0.2.1 | Flags: | rule-engine:
ovirt-4.0.z+
rule-engine: blocker+ rule-engine: planning_ack+ juan.hernandez: devel_ack+ rule-engine: testing_ack+ |
||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Whiteboard: | |||||||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||||||
| Doc Text: | Story Points: | --- | |||||||||
| Clone Of: | Environment: | ||||||||||
| Last Closed: | 2016-08-12 14:23:56 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: | |||||||||||
| Bug Depends On: | |||||||||||
| Bug Blocks: | 1356649 | ||||||||||
| Attachments: |
|
||||||||||
Created attachment 1182638 [details]
API V3 ovirt 3.6
Created attachment 1182639 [details]
API V3 ovirt 4.0
This bug report has Keywords: Regression or TestBlocker. Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP. Clesio, you are right, this a regression that we introduced when we replaced the "disks" collection with "diskattachments". We will try to fix it in the next 4.0.z release. Please consider using version 4 of the API. Thanks Juan but i´m using the ovirt integrations with foreman. After update foreman no works. Thanks for reponse i´m waiting release. Clesio, can you elaborate a bit? What part of the integration with Foreman isn't working? What version of Foreman? Created attachment 1182932 [details]
Foreman Integration oVirt
show de error of integration Foreman-oVirt
(In reply to Juan Hernández from comment #6) > Clesio, can you elaborate a bit? What part of the integration with Foreman > isn't working? What version of Foreman? Juan, I may have expressed myself wrong, I use the foreman to provision the oVirt through the API. the error is the attach. Tks I understand. Thanks for the additional information Clesio, it is very useful. The problem that you are having with Foreman is not caused by the incorrect URL, but by a different problem. In version 3 of the engine we used to support an undocumented parameter to request additional detail. For example, to request the VM together with its disks one could use the following request:
GET /ovirt-engine/api/vms
Accept: application/xml; detail=disks
The result of this should be something like this:
<vms>
<vm id="..." href="...">
<disks>
<disk id="..." href="...">
<name>mydisk</name>
...
</disk>
...
</disks>
...
</vm>
...
</vms>
Note the presence of the "disks" element, which isn't normally present.
This has been removed completely in version 4 of the API, but it was preserved in version 3 for backwards compatibility. Unfortunately it isn't working correctly, because the "disks" collection has also been removed from version 4 of the API.
When Foreman requests the list of virtual machines uses the Ruby gem `rbovirt`, and that gem uses this undocumented mechanism, and fails.
We will fix this in the API.
Juan, that exellent news ... I'm hoping the fix, if you are interested, I can test the fix. I am currently with my foreman standing room waiting for the fix; ( You can count on me to what is necessary. Hugs Verified with the following code:
------------------------------------------
rhevm-
4.0.2.3-0.1.el7ev
Steps to reproduce:
------------------------------------------
https://<server>/ovirt-engine/api/v3/vms/{:id}/disks
|
Description of problem: Version-Release number of selected component (if applicable): Versão 4.0.2-0.0.master.20160719143217.git36eaeca.el7.centos How reproducible: acess the API V3 Steps to Reproduce: 1.https://<server>/ovirt-engine/api/v3/vms/{:id}/disks 2. 3. Actual results: the result the XML is <disks> <disk href="/ovirt-engine/api/v3/vms/{:id}/null/{:diskID}" id="DiskID"> <actions> Expected results: Additional info: Please look the path after {:id} return "null". i´m reproduce in oVirt 3.6 and show me after {:id} "disk"