Bug 1931932
Summary: | Adding VM to an existing affinity group always returns an error although the action was successful | ||
---|---|---|---|
Product: | [oVirt] ovirt-engine | Reporter: | Gal Zaidman <gzaidman> |
Component: | BLL.Virt | Assignee: | Liran Rotenberg <lrotenbe> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Polina <pagranat> |
Severity: | urgent | Docs Contact: | |
Priority: | unspecified | ||
Version: | 4.4.5.6 | CC: | ahadas, bugs, emesika, lrotenbe, oliel |
Target Milestone: | ovirt-4.4.5 | Keywords: | DevelBlocker |
Target Release: | --- | Flags: | pm-rhel:
ovirt-4.4+
ahadas: blocker- pm-rhel: exception+ |
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | ovirt-engine-4.4.5.8 | Doc Type: | Bug Fix |
Doc Text: |
Previously, when adding a VM to the affinity group using the API we got an action response. Now, it will return a response containing the VM element, making the SDKs and API documentation get the expected response.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2021-03-18 15:13:22 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | Virt | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1932320 |
Description
Gal Zaidman
2021-02-23 15:38:54 UTC
According to Ori:
> I've found the problem, it is here:
> https://github.com/oVirt/ovirt-engine/blob/68721ead04cef0378937cd331fae3170b4c275ba/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendAffinityGroupVmsResource.java#L39
> editAffinityGroup() indeed returns an Action, incongruent with the declaration in the AffinityGroupVmsService.java.
> So the bug should actually be on ovirt-engine
Ori, wouldn't it be considered breaking backward compatibility if we change it now? Can't we just change the SDKs/API to return action instead? https://github.com/oVirt/ovirt-engine-api-model/blob/master/src/main/java/services/AffinityGroupVmsService.java#L68 (In reply to Gal Zaidman from comment #3) > Can't we just change the SDKs/API to return action instead? > https://github.com/oVirt/ovirt-engine-api-model/blob/master/src/main/java/ > services/AffinityGroupVmsService.java#L68 I think that's the only thing we can actually do - since we guarantee not to break existing clients so if we used to return an action, we should keep doing that but I'd like to check this with Ori I think it's not considered breaking backwards-compatibility, because we are fixing a bug. I mean, it never worked as documented and intended. Also, this is happening at the 3rd level of the API tree (Clusters -> Affinity-Groups -> Vms), I can't imagine that there's tons of scripts out there messing with this. I think it's ok to fix it and return Vms instead of Action. (by the way in case anyone is wondering how this but is possible in a type-safe language (Java) - the reason is that the return value is always wrapped in a Response object) verified on ovirt-engine-4.4.5.9-0.1.el8ev.noarch POST https://{{host}}/ovirt-engine/api/clusters/{clusterId}/affinitygroups/{affinityGroupId}/vms body <vm id="ae1b93a1-f504-48ec-bec2-ec95e269e95d"/> Returns response : <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <vm id="ae1b93a1-f504-48ec-bec2-ec95e269e95d"/> and not <action> as it was on the previous version This bugzilla is included in oVirt 4.4.5 release, published on March 18th 2021. Since the problem described in this bug report should be resolved in oVirt 4.4.5 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. |