Bug #2163
closedNew host installation fails with RHEV 3.1
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.
Updated by Ohad Levy almost 12 years ago
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).
Updated by Ohad Levy almost 12 years ago
and the upstream bug is https://bugzilla.redhat.com/show_bug.cgi?id=874443 of course.
Updated by Anonymous almost 12 years ago
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
Updated by Ohad Levy almost 12 years ago
- Category set to Compute resources
- Target version set to 1.2.0
Updated by Amos Benari almost 12 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
Applied in changeset 1bf5debdb0141dbcf351df1833f33acc1dc499df.