Bug 1509375
| Summary: | Update VM from REST fails if next run spanshot exists | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [oVirt] ovirt-engine | Reporter: | jniederm | ||||
| Component: | BLL.Virt | Assignee: | jniederm | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Vladimir <vshypygu> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | future | CC: | bugs, tjelinek | ||||
| Target Milestone: | ovirt-4.2.0 | Flags: | rule-engine:
ovirt-4.2+
|
||||
| Target Release: | --- | ||||||
| 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: | 2018-02-22 09:58:34 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: | |||||||
| Attachments: |
|
||||||
Verified on 4.2.1.6-0.1.el7 Scenario: 1. Update sockets using next_run=true 2. Update sockets once more - PASS This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017. Since the problem described in this bug report should be resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report. |
Created attachment 1347437 [details] engine-log-generated-by-the-erroneous-request.txt Description of problem: UpdateVmCommand fails since #areUpdatedFieldsLegal() returns false since VM instance form DB and from params differs not only in socket count but also in e.g. 'managedDeviceMap' (from params: filled, from db: empty) and 'exportDate' (from params: date of next run snapshot, from db: null). List of all changed field according to ObjectIdentityChecker#getChangedFields(): [clusterCompatibilityVersionOrigin, dbGeneration, exportDate, managedDeviceMap, numOfSockets, ovfVersion, quotaEnforcementType, quotaName, vmInit] Version-Release number of selected component (if applicable): current master, commit 930bddb235 How reproducible: 100% Steps to Reproduce: 1. Create a VM with 2 CPU sockets 2. Run the VM 3. Set num of cpu sockets to 1 using REST with next_run=true options PUT api/vms/{vmId}?next_run=true <vm> <cpu> <topology> <sockets>1</sockets> </topology> </cpu> </vm> 4. Send the same request again Actual results: It fails with status code 400: <fault> <detail>[There was an attempt to change VM values while the VM is not down. Please shut down the VM in order to modify these properties.]</detail> <reason>Operation Failed</reason> </fault> Expected results: VM keeps its configuration, request passes Additional info: