Bug 1318032 - Cloud instance lacks owner after self-service provisioning
Summary: Cloud instance lacks owner after self-service provisioning
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.5.0
Hardware: All
OS: All
high
high
Target Milestone: GA
: 5.6.0
Assignee: Bill Wei
QA Contact: Jeff Teehan
URL:
Whiteboard: service:provision
: 1353932 (view as bug list)
Depends On:
Blocks: 1318753
TreeView+ depends on / blocked
 
Reported: 2016-03-15 19:26 UTC by David La Motta
Modified: 2016-07-13 20:33 UTC (History)
9 users (show)

Fixed In Version: 5.6.0.1
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1318753 (view as bug list)
Environment:
Last Closed: 2016-06-29 15:43:04 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1348 0 normal SHIPPED_LIVE CFME 5.6.0 bug fixes and enhancement update 2016-06-29 18:50:04 UTC

Description David La Motta 2016-03-15 19:26:10 UTC
Description of problem:
When a catalog item is created for spinning up an instance in either Azure or OpenStack, the user ordering that item should be the owner of the resulting instance.  

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

How reproducible:
100%

Steps to Reproduce:
1. Create a Heat template in OpenStack and import to CFME, or use the Azure single-vm orchestration template that comes with.
2. Use the orchestration stack to create a service dialog and ultimately a catalog item.
3. Tag the catalog item so that only certain groups can see it.
4. Using a user from one of the groups that can see the tag, login to CFME and select the previously-created catalog item.  Make sure the user has an email address associated with the account.
5. Click order, fill any pertinent details and click submit.

Actual results:
The instance is provisioned correctly, both in Azure or in OpenStack.  The instance, however, does not have an owner.

Expected results:
The instance is provisioned correctly and the user that ordered from the self-service catalog is the rightful owner of the instance.

Additional info:
This behavior may be seen with AWS CloudFormation stacks as well.

Comment 3 CFME Bot 2016-04-04 20:40:59 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/9b360464ce0e56d76ba03d32042410125f020e28

commit 9b360464ce0e56d76ba03d32042410125f020e28
Author:     Bill Wei <bilwei>
AuthorDate: Tue Mar 22 09:33:56 2016 -0400
Commit:     Bill Wei <bilwei>
CommitDate: Mon Apr 4 10:53:54 2016 -0400

    Set owners for VMs created by an orchestration stack
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1318032
    
    Introduced new method post_provision_configure in the service class, where VMs inherit
    owner from the service.

 app/models/service_orchestration.rb                  |  7 +++++++
 .../Methods.class/__methods__/postprovision.rb       |  5 ++++-
 .../miq_ae_service_service_orchestration.rb          |  1 +
 .../orchestration_postprovision_spec.rb              | 12 ++++++++++++
 spec/models/service_orchestration_spec.rb            | 20 +++++++++++++++++++-
 5 files changed, 43 insertions(+), 2 deletions(-)
 create mode 100644 spec/automation/unit/method_validation/orchestration_postprovision_spec.rb

Comment 5 Jeff Teehan 2016-04-19 19:12:00 UTC
I created a group/user/catalog/item/vm all named qepuke, logged out and in, and spun up the Azure image via Orchestration.  Image deployed just fine.  When I go to Cloud/Instances and click on Instances | Own global filter, is see just the single instance of qepuke.

I'm in qe, so I can get away with the naming convention. :)

It appears to be associating the owner to the instance as expected.

Moving to verified.  You can check it out on my Beta 2 appliance for the rest of this week at https://10.16.7.174/vm_cloud/explorer if you'd like using user/pw qepuke/qepuke.

Comment 6 CFME Bot 2016-04-20 21:44:39 UTC
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=94b5de0a48f100863fcf701089e437b43bab3160

commit 94b5de0a48f100863fcf701089e437b43bab3160
Author:     Bill Wei <bilwei>
AuthorDate: Tue Mar 22 09:33:56 2016 -0400
Commit:     Bill Wei <bilwei>
CommitDate: Wed Apr 20 14:30:00 2016 -0400

    Set owners for VMs created by an orchestration stack
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1318032
    
    Introduced new method post_provision_configure in the service class, where VMs inherit
    owner from the service.

 app/models/service_orchestration.rb                  |  7 +++++++
 .../Methods.class/__methods__/postprovision.rb       |  5 ++++-
 .../miq_ae_service_service_orchestration.rb          |  1 +
 .../orchestration_postprovision_spec.rb              | 12 ++++++++++++
 spec/models/service_orchestration_spec.rb            | 20 +++++++++++++++++++-
 5 files changed, 43 insertions(+), 2 deletions(-)
 create mode 100644 spec/automation/unit/method_validation/orchestration_postprovision_spec.rb

Comment 7 CFME Bot 2016-04-20 21:44:44 UTC
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=ffaa64210d166a519888860c5198a90f95b69208

commit ffaa64210d166a519888860c5198a90f95b69208
Merge: bfe7200 94b5de0
Author:     Greg McCullough <gmccullo>
AuthorDate: Wed Apr 20 17:08:54 2016 -0400
Commit:     Greg McCullough <gmccullo>
CommitDate: Wed Apr 20 17:08:54 2016 -0400

    Merge branch '5.5.z-vm-owner' into '5.5.z'
    
    Set owners for VMs created by an orchestration stack
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1318032
    
    Introduced new method post_provision_configure in the service class, where VMs inherit
    owner from the service.
    
    Original PR: https://github.com/ManageIQ/manageiq/pull/7557
    5.5.z BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1318753
    
    See merge request !903

 app/models/service_orchestration.rb                  |  7 +++++++
 .../Methods.class/__methods__/postprovision.rb       |  5 ++++-
 .../miq_ae_service_service_orchestration.rb          |  1 +
 .../orchestration_postprovision_spec.rb              | 12 ++++++++++++
 spec/models/service_orchestration_spec.rb            | 20 +++++++++++++++++++-
 5 files changed, 43 insertions(+), 2 deletions(-)

Comment 11 errata-xmlrpc 2016-06-29 15:43:04 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

Comment 12 Bill Wei 2016-07-13 20:33:09 UTC
*** Bug 1353932 has been marked as a duplicate of this bug. ***


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