Project

General

Profile

Bug #2163

New host installation fails with RHEV 3.1

Added by Samuli Heinonen over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Compute resources
Target version:
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

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.


Related issues

Is duplicate of Foreman - Bug #2328: Foreman should wait for Ovirt/RHEV VM to be fully createdDuplicate2013-03-15

Associated revisions

Revision 1bf5debd (diff)
Added by Amos Benari over 6 years ago

fixes #2163 New host installation fails with RHEV 3.1

History

#1 Updated by Ohad Levy over 6 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).

#2 Updated by Ohad Levy over 6 years ago

and the upstream bug is https://bugzilla.redhat.com/show_bug.cgi?id=874443 of course.

#3 Updated by Jason Montleon over 6 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

#4 Updated by Ohad Levy over 6 years ago

  • Assignee set to Amos Benari

#5 Updated by Ohad Levy over 6 years ago

  • Category set to Compute resources
  • Target version set to 1.2.0

#6 Updated by Amos Benari over 6 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF