Bug 1298748 - ISO provisioning always fails because it can't start the VM while the disk is locked
ISO provisioning always fails because it can't start the VM while the disk is...
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate (Show other bugs)
5.5.0
All All
high Severity medium
: GA
: 5.6.0
Assigned To: Drew Bomhof
Shveta
: ZStream
: 1301662 (view as bug list)
Depends On:
Blocks: 1301660 1301662
  Show dependency treegraph
 
Reported: 2016-01-14 17:25 EST by Josh Carter
Modified: 2016-06-29 11:30 EDT (History)
8 users (show)

See Also:
Fixed In Version: 5.6.0.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1301660 1301662 (view as bug list)
Environment:
Last Closed: 2016-06-29 11:30:27 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1348 normal SHIPPED_LIVE CFME 5.6.0 bug fixes and enhancement update 2016-06-29 14:50:04 EDT

  None (edit)
Description Josh Carter 2016-01-14 17:25:02 EST
Description of problem:

When ISO provisioning from CloudForms 4.0, the automation state machine exits on Error with [Ovirt::Error]: [Cannot run VM: The following disks are locked: cfme-template_Disk1. Please try again in a few minutes.]. I'm not sure if the problem is with RHEV reporting a READY state prematurely or if CloudForms is not properly checking state.

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


How reproducible:
very

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Comment 2 Greg McCullough 2016-01-14 17:44:31 EST
Drew - The customize_destination state in rhev native provisioning calls destination_image_locked? and re-queues the state if the provider returns that the image is locked.  Both ISO and PXE provisioning override this method and do not have the destination_image_locked? check.

Might be worth investigating if there is a way to make the first part of customize_destination common that could handle the image locked check and then transition to a state that can be overridden for the different provisioning types (native, iso, pxe) which all do different actions in the customize_destination method today.
Comment 4 CFME Bot 2016-01-21 09:50:56 EST
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/ccee4be4278e46999e7498bbff10929d1a602f95

commit ccee4be4278e46999e7498bbff10929d1a602f95
Author:     Drew Bomhof <dbomhof@redhat.com>
AuthorDate: Tue Jan 19 15:35:12 2016 -0500
Commit:     Drew Bomhof <dbomhof@redhat.com>
CommitDate: Tue Jan 19 15:54:35 2016 -0500

    Added destination_image_locked? check to RHEV iso/pxe provisioning
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1298748
    
    The destination_image_locked? method was only being
    called on native RHEV provisioning.  This change slightly
    refactors the customize_destination method to enable
    the destination_image_locked? check for all RHEV
    provisioning types

 .../infra_manager/provision/state_machine.rb       |  9 ++++---
 .../provision_via_iso/state_machine.rb             |  8 +-----
 .../provision_via_pxe/state_machine.rb             |  7 +-----
 .../infra_manager/provision/state_machine_spec.rb  |  9 +++++--
 .../provision_via_iso/state_machine_spec.rb        |  9 +++++--
 .../provision_via_pxe/state_machine_spec.rb        | 29 ++++++++++++++++++++++
 6 files changed, 51 insertions(+), 20 deletions(-)
 create mode 100644 spec/models/manageiq/providers/redhat/infra_manager/provision_via_pxe/state_machine_spec.rb
Comment 5 Drew Bomhof 2016-01-25 11:16:54 EST
*** Bug 1301662 has been marked as a duplicate of this bug. ***
Comment 6 CFME Bot 2016-02-10 14:54:06 EST
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=d547fbc7ccb8202f1f6fcaf798d3ead9615c0bb2

commit d547fbc7ccb8202f1f6fcaf798d3ead9615c0bb2
Author:     Drew Bomhof <dbomhof@redhat.com>
AuthorDate: Tue Jan 19 15:35:12 2016 -0500
Commit:     Drew Bomhof <dbomhof@redhat.com>
CommitDate: Mon Jan 25 15:05:16 2016 -0500

    Added destination_image_locked? check to RHEV iso/pxe provisioning
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1298748
    
    The destination_image_locked? method was only being
    called on native RHEV provisioning.  This change slightly
    refactors the customize_destination method to enable
    the destination_image_locked? check for all RHEV
    provisioning types

 .../infra_manager/provision/state_machine.rb       |  9 +++--
 .../provision_via_iso/state_machine.rb             |  8 +---
 .../provision_via_pxe/state_machine.rb             |  7 +---
 .../infra_manager/provision/state_machine_spec.rb  | 44 ++++++++++++----------
 .../provision_via_iso/state_machine_spec.rb        | 15 +++++---
 .../provision_via_pxe/state_machine_spec.rb        | 29 ++++++++++++++
 6 files changed, 72 insertions(+), 40 deletions(-)
 create mode 100644 spec/models/manageiq/providers/redhat/infra_manager/provision_via_pxe/state_machine_spec.rb
Comment 7 Shveta 2016-04-18 21:47:08 EDT
Fixed.
Verified in 5.6.0.1-beta2.20160413141124_e25ac0e
Comment 9 errata-xmlrpc 2016-06-29 11:30:27 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1348

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