Bug 876139
| Summary: | [rest-api] moveImage (import vm from template) is always used with 'force' = 'true' | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Virtualization Manager | Reporter: | Haim <hateya> | ||||
| Component: | ovirt-engine | Assignee: | Maor <mlipchuk> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Attila Darazs <adarazs> | ||||
| Severity: | high | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 3.1.0 | CC: | abaron, amureini, dyasny, ecohen, ewarszaw, hateya, iheim, jlibosva, lpeer, mgoldboi, mpastern, Rhev-m-bugs, sgrinber, yeylon, ykaul | ||||
| Target Milestone: | --- | ||||||
| Target Release: | 3.1.0 | ||||||
| Hardware: | x86_64 | ||||||
| OS: | Linux | ||||||
| Whiteboard: | storage | ||||||
| Fixed In Version: | si24.2 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 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 644091 [details]
all logs.
Body and url used:
/api/storagedomains/df1cdb8f-9774-4d32-8335-5e6cb09cea02/vms/6cb08ca5-f30f-4a2f-8cc1-e8581776523d/import
body:
<action>
<async>false</async>
<grace_period>
<expiry>10</expiry>
</grace_period>
<storage_domain>
<name>iscsiStorageTest_data_domain0</name>
</storage_domain>
<cluster>
<name>iscsiStorageTest</name>
</cluster>
</action>
(In reply to comment #0) > Description of problem: > > it appears that when using import vm from template in rest-API it always > pass the 'force' = 'true' field which kindly asks vdsm to remove all > pre-existing volumes, problem starts when in our tests we just ask to import > a VM from template, but the image doesn't exists, vdsm is failing (due to > different bug). > > expected results: > > force value should be passed by request and not by default. > > <test_case> > <test_name>Import vm</test_name> > <test_action>importVm</test_action> > <parameters>vm='vm_test', import_storagedomain='master_sd', > export_storagedomain='{export_domain_name}', > cluster='storage_sanity_31_cluster'</parameters> > <positive>true</positive> > <run>yes</run> > <report>yes</report> > <bz>853045</bz> > </test_case> not sure i understand, what do you mean by "import vm from template" ? we : 1. import vms from SD 2. create/clone vm from template (In reply to comment #0) > Description of problem: > > it appears that when using import vm from template in rest-API it always > pass the 'force' = 'true' field which kindly asks vdsm to remove all > pre-existing volumes, problem starts when in our tests we just ask to import > a VM from template, but the image doesn't exists, vdsm is failing (due to > different bug). > backend forcibly set '.setForceOverride(true);' in ImportVmCommand:559 Engine should set the force property from the import params onwards. Default in REST API should be false if it is not set. Pushed suggestion fix to upstream at http://gerrit.ovirt.org/#/c/9224/ Merged upstream with change id Ie3a8de587e9a9384a2cf51dc7435967d46d3d9fd Verified rhevm-3.1.0-30.el6ev.noarch |
Description of problem: it appears that when using import vm from template in rest-API it always pass the 'force' = 'true' field which kindly asks vdsm to remove all pre-existing volumes, problem starts when in our tests we just ask to import a VM from template, but the image doesn't exists, vdsm is failing (due to different bug). expected results: force value should be passed by request and not by default. <test_case> <test_name>Import vm</test_name> <test_action>importVm</test_action> <parameters>vm='vm_test', import_storagedomain='master_sd', export_storagedomain='{export_domain_name}', cluster='storage_sanity_31_cluster'</parameters> <positive>true</positive> <run>yes</run> <report>yes</report> <bz>853045</bz> </test_case>