Bug 906214

Summary: [RHEV 3.1 support] check image status before start vm
Product: [Retired] Beaker Reporter: Qixiang Wan <qwan>
Component: schedulerAssignee: Qixiang Wan <qwan>
Status: CLOSED CURRENTRELEASE QA Contact: Dan Callaghan <dcallagh>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 0.11CC: asaha, dcallagh, llim, qwan, rglasz, rmancy
Target Milestone: 0.12   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: Cloud
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-04-11 04:56:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 880002    

Description Qixiang Wan 2013-01-31 07:03:15 UTC
Description of problem:
Due to bug 906213, vm will not be locked while creating the image, so vm start may happen while image is locked.

2013-01-30 19:47:57,410 beakerd ERROR Exception in exception handler :-(
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/bkr/server/tools/beakerd.py", line 477, in provision_virt_recipes
    manager.destroy_vm(system_name)
  File "/usr/lib/python2.6/site-packages/bkr/server/model.py", line 6672, in destroy_vm
    vm.delete()
  File "/usr/lib/python2.6/site-packages/ovirtsdk/infrastructure/brokers.py", line 5092, in delete
    headers={"Correlation-Id":correlation_id})
  File "/usr/lib/python2.6/site-packages/ovirtsdk/infrastructure/proxy.py", line 111, in delete
    return self.request('DELETE', url, body, headers)
  File "/usr/lib/python2.6/site-packages/ovirtsdk/infrastructure/proxy.py", line 128, in request
    last=last)
  File "/usr/lib/python2.6/site-packages/ovirtsdk/infrastructure/proxy.py", line 154, in __doRequest
    raise RequestError, response
RequestError: 
status: 400
reason: Bad Request
detail: Cannot remove VM: The disks guest_for_recipe_7_Disk1 are locked. Please try again in a few minutes.


Version-Release number of selected component (if applicable):
Beaker 0.11 + RHEV 3.1

How reproducible:
100%

Steps to Reproduce:
1. Attach a RHEV 3.1 instance to beaker server
2. Create a job which can run with rhev guests
  
Actual results:
failed to schedule recipe with rhev guests due to start vm failure

Expected results:
job can run with rhev guests

Additional info:

Comment 1 Qixiang Wan 2013-01-31 08:12:40 UTC
on gerrit: http://gerrit.beaker-project.org/#/c/1682/

Comment 4 Dan Callaghan 2013-04-11 04:56:43 UTC
Beaker 0.12 has been released.