Bug 1658709 - DB not updated with retirement status for child catalog items after retiring parent service
Summary: DB not updated with retirement status for child catalog items after retiring ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.9.6
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.9.7
Assignee: Tina Fitzgerald
QA Contact: Nandini Chandra
Red Hat CloudForms Documentation
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-12 17:43 UTC by Nandini Chandra
Modified: 2019-02-12 18:22 UTC (History)
10 users (show)

Fixed In Version: 5.9.7.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-01-24 14:33:32 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Nandini Chandra 2018-12-12 17:43:30 UTC
Description of problem:
-----------------------
I ran into this issue while verifying https://bugzilla.redhat.com/show_bug.cgi?id=1656169

I created a service bundle (bz-bundle) of 2 service items(vsphere service item,vsphere65-service-bundle that creates a VM and an Ansible job, nan-ansible-job2-bundle )
I then provisioned that service bundle.When I attempted to retire the service bundle, it failed with this error message:

[----] E, [2018-12-06T18:05:47.858091 #23693:5f89da0] ERROR -- : <AEMethod update_service_retirement_status> Service Retirement Error: Server [EVM] Service [bz-bundle] Step [CheckServiceRetired] Status [Error Checking Service retirement] 

I'd like to add that the VM that got created through the vsphere service item did get retired.(See attached screen shot). However, the result of the following query doesn't reflect that and the DB doesn't correctly show the retirement status of child services.

I'm reporting this BZ so that this issue(DB should correctly show the retirement status of child services) is fixed .

vmdb_production=# select id, name, retirement_state, ancestry from services order by id;
 id |           name           | retirement_state | ancestry 
----+--------------------------+------------------+----------
  1 | nan-job1                 | retired          | 
  2 | bz-bundle                | error            | 
  3 | vsphere65-service-bundle |                  | 2
  4 | nan-ansible-job2-bundle  |                  | 2



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


How reproducible:
----------------
Always


Steps to Reproduce:
-------------------
1.
2.
3.


Actual results:
---------------
DB doesn't correctly show the retirement status of child services after a parent service is retired.


Expected results:
----------------
DB should correctly show the retirement status of child services after a parent service is retired.


Additional info:
----------------

Comment 4 Tina Fitzgerald 2019-01-02 16:01:48 UTC
Hi Nandini,

Can you provide a reproducer environment?

Thanks,
Tina

Comment 7 Tina Fitzgerald 2019-01-16 17:24:43 UTC
Hi Nandini,

Can you reproduce the issue?

Thanks,
Tina

Comment 8 Tina Fitzgerald 2019-01-17 17:00:07 UTC
Hi John,

We're waiting on QA to reproduce this issue.

Thanks,
Tina

Comment 9 Nandini Chandra 2019-01-17 20:06:01 UTC
I just reproduced the issue again on the same appliance from comment #6.

vmdb_production=# select id, name, retirement_state, ancestry from services order by id;
 id |     name     | retirement_state | ancestry 
----+--------------+------------------+----------
  1 | bundle       | retiring         | 
  2 | bz-catalog-1 |                  | 1
  3 | bz-catalog-2 |                  | 1


I created a service bundle (bz-bundle) of 2 vsphere service items(bz-catalog-1 and bz-catalog-2 , each of these services creates a VM ).
I then attempted to retire the service bundle.The UI shows that the 2 VMs that were created from the child services have been retired. 

At the moment, the DB query shows that the 'bundle' service is retiring. The retirement state will eventually change from 'retiring' to 'error'.

Expected Results:
1)The 'retirement_state' field returned by the above query should show 'retired' for the parent service .
2)The 'retirement_state' field returned by the above query should show 'retired' for the child services as well .

Comment 10 Tina Fitzgerald 2019-01-17 21:41:51 UTC
Hi Nandini,

Thanks for setting up the reproducer environment.

The fix for this issue was committed on December 18th. (https://github.com/ManageIQ/manageiq/commit/dd72793edf2f7301a9db8559250f19eec35f99dc)
The reproducer environment was built on 12/17/18.(5.9.7.0.20181217174909_1f8a1d7)
Can you retest on a later 5.9.7 appliance?

Thanks,
Tina

Comment 11 William Fitzgerald 2019-01-17 22:17:31 UTC
I tested on version 5.9.7.2.20190109154935_c0d03d6 and this worked.

Service bundle_2vmwares retired successfully and the 2 vm's attached were retired also.

Billy

Comment 12 William Fitzgerald 2019-01-17 22:19:12 UTC
Reproducer: 10.16.5.104

Comment 13 Nandini Chandra 2019-01-18 18:24:01 UTC
I re-tested on a 5.9.7.2 appliance and the fix[0] resolved this issue.

vmdb_production=# select id, name, retirement_state, ancestry from services order by id;
 id |    name    | retirement_state | ancestry 
----+------------+------------------+----------
  3 | cat-bundle | retired          | 
  4 | cat-item   | retired          | 3
  5 | cat-item2  | retired          | 3

[0]https://github.com/ManageIQ/manageiq/commit/dd72793edf2f7301a9db8559250f19eec35f99dc)


John/Satoe,

Could this BZ be moved to POST->ON_QA so that I can mark this BZ as VERIFIED.

Comment 14 Nandini Chandra 2019-01-18 21:29:42 UTC
Verified in 5.9.7.2


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