Bug 1313703 - Unable to create a vm from template imported from Glance
Unable to create a vm from template imported from Glance
Status: CLOSED NOTABUG
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage (Show other bugs)
3.6.4
Unspecified Unspecified
unspecified Severity urgent (vote)
: ovirt-3.6.5
: ---
Assigned To: Fred Rolland
Aharon Canan
: AutomationBlocker
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-02 04:14 EST by Nelly Credi
Modified: 2016-03-03 09:58 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-03-03 09:58:23 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Storage
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
amureini: ovirt‑3.6.z?
rule-engine: planning_ack?
rule-engine: devel_ack?
rule-engine: testing_ack?


Attachments (Terms of Use)
engine logs (342.94 KB, application/x-bzip)
2016-03-02 04:21 EST, Anton Marchukov
no flags Details
vdsm logs from all hosts (362.65 KB, application/x-bzip)
2016-03-02 04:22 EST, Anton Marchukov
no flags Details
Good execution - engine logs (343.16 KB, application/x-bzip)
2016-03-03 03:48 EST, Nelly Credi
no flags Details
good execution - hosts log (951.63 KB, application/x-bzip)
2016-03-03 03:48 EST, Nelly Credi
no flags Details

  None (edit)
Description Nelly Credi 2016-03-02 04:14:24 EST
Description of problem:
create vm from template imported from Glance fails with the below error (in actual results)

Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1. add dc
2. add cluster
3. add hosts
4. add sds
5. import image from glance as template
6. get status ok on imported disk
6. copy the template to all sds
7. create a vm from this template


Actual results:
Status: 409
00:24:31.398 	Reason: Conflict
00:24:31.398 	Detail: [Cannot add VM. Disk golden_mixed_virtio_template is being moved or copied.]

Expected results:
we should be able to create a vm from this tempalte

Additional info:
will attach the logs from the last execution soon
Comment 1 Anton Marchukov 2016-03-02 04:21 EST
Created attachment 1132196 [details]
engine logs
Comment 2 Anton Marchukov 2016-03-02 04:22 EST
Created attachment 1132197 [details]
vdsm logs from all hosts
Comment 3 Anton Marchukov 2016-03-02 04:34:51 EST
This issue exists in the following commits of engine and vdsm:

Engine: ded51e3bcac65f194ef2c80818677891fa12d30c ovirt-engine-3.6 branch
core: Unit tests for VmDevicesMonitoring

VDSM: c2b9e0075880a175ba2b7a3c58d15a00831c73be ovirt-3.6.3 branch
oVirt 3.6.3 refresh (storage fix)
Essential we use latest vdsm-4.17.23-0.el7ev.noarch.rpm from brew

I will try to track previous versions to find when the problem started to appear and update. However it may be not easy as previously it was not consistently reproducible.
Comment 4 Allon Mureinik 2016-03-02 06:23:40 EST
Fred, as this week's qa contact can you take a look please?
Comment 5 Nir Soffer 2016-03-02 19:22:01 EST
(In reply to Nelly Credi from comment #0)
> Actual results:
> Status: 409
> 00:24:31.398 	Reason: Conflict
> 00:24:31.398 	Detail: [Cannot add VM. Disk golden_mixed_virtio_template is
> being moved or copied.]

It looks like you try to create a vm before copying the template finished.

How do you verify that the copy operation finished before trying to create a vm?
Comment 6 Nelly Credi 2016-03-03 03:22:54 EST
Hi Nir,

copying the template is a sync action, so we just wait for it to finish

Please also keep in mind that this is working well in 3.6.3
Comment 7 Nir Soffer 2016-03-03 03:36:52 EST
(In reply to Nelly Credi from comment #6)
> copying the template is a sync action, so we just wait for it to finish

Can you explain how do you perform the copy template? Python SDK? REST API?

> Please also keep in mind that this is working well in 3.6.3

Can you provide engine and vdsm logs from "good" 3.6.3 run?
Comment 8 Nelly Credi 2016-03-03 03:48 EST
Created attachment 1132688 [details]
Good execution - engine logs

We are using REST
Comment 9 Nelly Credi 2016-03-03 03:48 EST
Created attachment 1132689 [details]
good execution - hosts log
Comment 10 Fred Rolland 2016-03-03 09:58:23 EST
By looking at the REST log in [1], I can see that the disk is in "locked" state right before the VM creation.

2016-03-02 20:31:51,821  ---> get on the template, disk is locked
2016-03-02 20:31:52,018  ---> create VM with failure

So it could be some timing/logic issue in the test.
The disk status should be checked to be OK before creating the VM

[1]
https://rhev-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/view/GE%20builder%20and%20cleaner/job/GE-builder/1772/artifact/logs/art_tests_20160302_201559.log/*view*/

Note You need to log in before you can comment on or make changes to this bug.