Bug 1320689

Summary: Post install callback doesn't always work
Product: Red Hat CloudForms Management Engine Reporter: Brandon Dunne <bdunne>
Component: ProvisioningAssignee: Brandon Dunne <bdunne>
Status: CLOSED ERRATA QA Contact: Shveta <sshveta>
Severity: high Docs Contact:
Priority: high    
Version: 5.5.0CC: bdunne, cpelland, dajohnso, fdewaley, jhardy, jprause, mfeifer, obarenbo, ssainkar, sshveta
Target Milestone: GAKeywords: ZStream
Target Release: 5.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.6.0.1 Doc Type: Bug Fix
Doc Text:
Previously, using the post install callback URL to shutdown a virtual machine doing a PXE / ISO install on RHEV & VMware did not work. This fix updates the post_install_callback logic based on new state and the issue is now resolved. The post_install_callback logic now shuts down the virtual machine and state machine moves on to next state.
Story Points: ---
Clone Of:
: 1321597 1322831 (view as bug list) Environment:
Last Closed: 2016-06-29 15:44:28 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:
Bug Depends On:    
Bug Blocks: 1321597, 1322831    
Attachments:
Description Flags
hotfix_bz_1318436_1320689.tgz none

Description Brandon Dunne 2016-03-23 18:04:34 UTC
Description of problem:
Using the post install callback url to shutdown a VM doing a PXE / ISO install on RHEV & Vmware doesn't work.

How reproducible:
Always

Steps to Reproduce:
Provision a VM via PXE or ISO on RHEV or VMware.  Ensure that the installer hits the post_install_callback_url and does not shut down when finished.

Actual results:
post_install_callback is ignored, state machine stays in poll_destination_powered_off_in_provider loop

Expected results:
VM should shut down and state machine should move on to next state.

Comment 3 Brandon Dunne 2016-03-24 15:31:15 UTC
Created attachment 1140010 [details]
hotfix_bz_1318436_1320689.tgz

Apply from within the vmdb directory.  It includes fixes from this bug as well as 1318436.

Comment 4 Brandon Dunne 2016-03-24 15:33:53 UTC
Felix, hotfix is attached.

Comment 5 CFME Bot 2016-03-24 20:01:01 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/a7632d35ec870a4d064a9896f5a73063952f434f

commit a7632d35ec870a4d064a9896f5a73063952f434f
Author:     Brandon Dunne <bdunne>
AuthorDate: Tue Mar 22 16:44:56 2016 -0400
Commit:     Brandon Dunne <bdunne>
CommitDate: Wed Mar 23 14:06:05 2016 -0400

    Update post_install_callback logic based on new state
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1320689

 app/models/miq_provision/post_install_callback.rb | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comment 6 CFME Bot 2016-03-24 20:01:04 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/2f724accec9ef1768c97ca9094c3df86ace721be

commit 2f724accec9ef1768c97ca9094c3df86ace721be
Author:     Brandon Dunne <bdunne>
AuthorDate: Wed Mar 23 13:33:18 2016 -0400
Commit:     Brandon Dunne <bdunne>
CommitDate: Wed Mar 23 14:06:06 2016 -0400

    Add tests for MiqProvision::PostInstallCallback#post_install_callback
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1320689

 .../miq_provision/post_install_callback_spec.rb    | 72 ++++++++++++++++++++++
 1 file changed, 72 insertions(+)
 create mode 100644 spec/models/miq_provision/post_install_callback_spec.rb

Comment 7 Felix Dewaleyne 2016-03-25 00:58:40 UTC
does the hotfix include the changes of bz#1318436?

Comment 8 Brandon Dunne 2016-03-28 13:44:05 UTC
Yes, it does Felix

Comment 9 Felix Dewaleyne 2016-03-30 16:39:35 UTC
the customer's test environment seems to show the fix resolves all the issues raised. he will do a final test tomorrow

Comment 12 CFME Bot 2016-04-15 14:28:07 UTC
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=93d2bb2865c4bc99fc0fe732372bda8cc006fafc

commit 93d2bb2865c4bc99fc0fe732372bda8cc006fafc
Author:     Brandon Dunne <bdunne>
AuthorDate: Tue Mar 22 16:44:56 2016 -0400
Commit:     Brandon Dunne <bdunne>
CommitDate: Thu Mar 24 10:20:40 2016 -0400

    Update post_install_callback logic based on new state
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1320689

 app/models/miq_provision/post_install_callback.rb | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comment 13 CFME Bot 2016-04-15 14:28:11 UTC
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=20b4783b4a38f3548d6f8196458b213923ab5f58

commit 20b4783b4a38f3548d6f8196458b213923ab5f58
Author:     Brandon Dunne <bdunne>
AuthorDate: Mon Mar 28 15:58:37 2016 -0400
Commit:     Brandon Dunne <bdunne>
CommitDate: Mon Mar 28 15:58:37 2016 -0400

    Add tests for MiqProvision::PostInstallCallback#post_install_callback
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1320689

 .../miq_provision/post_install_callback_spec.rb    | 79 ++++++++++++++++++++++
 1 file changed, 79 insertions(+)
 create mode 100644 spec/models/miq_provision/post_install_callback_spec.rb

Comment 14 Shveta 2016-04-19 01:46:35 UTC
Fixed.
Verified in 5.6.0.1-beta2.20160413141124_e25ac0e

Comment 16 errata-xmlrpc 2016-06-29 15:44:28 UTC
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