Bug #2163
closed
New host installation fails with RHEV 3.1
Added by Samuli Heinonen almost 12 years ago.
Updated almost 12 years ago.
Category:
Compute resources
|
Description
When trying to install new virtual machine with Foreman using RHEV 3.1 it throws following error message:
Failed to power up a compute RHEV-M (oVirt) instance demo125: Cannot run VM: The disks demo125_Disk1 are locked. Please try again in a few minutes.
Failed to destroy a compute RHEV-M (oVirt) instance demo125: Cannot remove VM: The disks demo125_Disk1 are locked. Please try again in a few minutes.
Installation succeeds If "Power ON this machine" option is removed and user waits few minutes before powering up the virtual machine.
this is due a bug in rhevm which returns a status of READY while the disks are still locked.
Foreman tries to start the VM and fail (because the disks are locked).
Ohad's patch seems to fix this for me. Others might want to test to verify.
diff --git a/lib/fog_extensions/ovirt/server.rb b/lib/fog_extensions/ovirt/serve
index b1aa1a7..40d5504 100644
--- a/lib/fog_extensions/ovirt/server.rb
+++ b/lib/fog_extensions/ovirt/server.rb
@@ -6,6 +6,10 @@ module FogExtensions
status
end
+ def status
+ super and volumes.map{|v| v.state == 'ready'}
+ end
+
def interfaces_attributes=(attrs); end
def volumes_attributes=(attrs); end
diff --git a/lib/fog_extensions/ovirt/volume.rb b/lib/fog_extensions/ovirt/volum
index a3b8635..5326475 100644
--- a/lib/fog_extensions/ovirt/volume.rb
+++ b/lib/fog_extensions/ovirt/volume.rb
@@ -1,6 +1,9 @@
module FogExtensions
module Ovirt
module Volume
+
+ attribute :state
+
def as_json(options={ })
size_gb
- Assignee set to Amos Benari
- Category set to Compute resources
- Target version set to 1.2.0
- Status changed from New to Closed
- % Done changed from 0 to 100
Also available in: Atom
PDF