Bug 1387342

Summary: Cloud instance does not have relation to service
Product: Red Hat CloudForms Management Engine Reporter: vaclav.miller
Component: ProvisioningAssignee: Bill Wei <bilwei>
Status: CLOSED CURRENTRELEASE QA Contact: Dmitry Misharov <dmisharo>
Severity: medium Docs Contact:
Priority: high    
Version: 5.6.0CC: cpelland, gmccullo, jhardy, mfalesni, obarenbo
Target Milestone: GAKeywords: TestOnly
Target Release: 5.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: cloud:service
Fixed In Version: 5.8.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1391709 1391710 (view as bug list) Environment:
Last Closed: 2017-06-12 16:42:07 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 1391709, 1391710    

Description vaclav.miller 2016-10-20 16:30:48 UTC
Description of problem:
Cloud instance is provisioned through service catalog item using orchestration template.
New service (called by catalog item name) is then created, it knows it owns provisioned instance.

When looking to instance detail, e.g. through Object Walker, there is missing VM relation to service:
$evm.root['vm'].guid = cc890a14-96df-11e6-a86a-525400a1d9ad
$evm.root['vm'].direct_service (type: Association (empty))
$evm.root['vm'].service (type: Association (empty))

Is it correct behavior (do not have relation to service) or not (VM have to be assigned to service)?
- having in mind it is possible to assign VM to service manually using automation method: vm.add_to_service(myService)
- UI shows at VM screen relation to service: "Service" - "OpenStack basic VM - Client & SM" 


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


How reproducible:


Steps to Reproduce:
1. provision instance through service item using orchestration template
2. check provisioned service details - VM is included as part of service
3. check provisioned VM relation to service vm.service (ObjectWalker) - relation to service does not exist
 

Actual results:


Expected results:
there is VM to service relation at vm.service


Additional info:

Comment 3 CFME Bot 2016-11-02 13:16:39 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/acf55edb1391d345217db35f7b47be41da040777

commit acf55edb1391d345217db35f7b47be41da040777
Author:     Bill Wei <bilwei>
AuthorDate: Mon Oct 31 17:34:17 2016 -0400
Commit:     Bill Wei <bilwei>
CommitDate: Tue Nov 1 18:14:48 2016 -0400

    Link an instance to the service through the stack
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1387342

 app/helpers/vm_helper/textual_summary.rb           |  2 +-
 app/models/manageiq/providers/cloud_manager/vm.rb  |  8 ++++
 app/models/orchestration_stack.rb                  |  4 +-
 .../cloud_manager/orchestration_stack_spec.rb      | 43 +++++++++++++++-------
 .../manageiq/providers/cloud_manager/vm_spec.rb    | 28 ++++++++++++++
 5 files changed, 69 insertions(+), 16 deletions(-)

Comment 6 Milan Falešník 2017-03-14 13:44:17 UTC
Verified in 5.8.0.4. I deployed an openstack stack as a service and after the provisioning finished, the resulting instance had the service linked.