Description of problem: Service has parent service defined ("ancestry": "<parent_id>"). When retiring parent service, child service is not retired. Version-Release number of selected component (if applicable): 5.8.0.9-alpha2 How reproducible: Very Steps to Reproduce: 1. Create two services POST /api/services { "action": "create", "resources": [ {"name": "test_rest_1", "description": "test service 1"}, {"name": "test_rest_2", "description": "test service 2"} ] } 2. Make the first service parent to the second service POST /api/services/:second_service_id { "action": "edit", "ancestry": "<first_service_id>" } 3. Retire the first (parent) service POST /api/services/:first_service_id { "action": "retire" } Actual results: First service is retired, second service is not retired. Expected results: First service is retired, second service is also retired.
Hi Martin, Can I access your test appliance? Thanks, Tina
Hi Martin, Parent and child Service retirement works properly when the services are created through the Admin UI. UI Test Scenario: 1. Create a service catalog item. 2. Create a service catalog bundle and specify the service catalog item created in step 1 as a resource. 3. Order Service Bundle. 4. Retire Service Bundle. (You'll see that the parent and child service have been retired.) I think the combination of REST api calls in the example above may need some modifications. Were you testing retirement and decided to use the REST api, or were you specifically testing the REST api service functionality? Let me know if you have any questions. Thanks, Tina
Hi Tina, I'm specifically testing the REST API functionality.
Thanks Martin. Assigning the ticket to Alberto.
Hi Martin, Setting the parent is not sufficient for wiring the services to properly handling retirement of both, you need to add_resource of the child service onto the parent service. Although that's not currently possible, it's only for vms/templates. I'll make an enhancement for that. For step 2 above, while this works, It's very implementation specific, I'd prefer the parent_service reference: POST /api/services/:second_service_id { "action": "edit", "parent_service": { "href" : "/api/services/:first_service_id" } }
Hi Martin, Can you give https://github.com/ManageIQ/manageiq/pull/14876 a try, then attempt the retirement of the parent service. Thanks. Alberto
The enhancement mentioned in comment #6 was implemented in PR https://github.com/ManageIQ/manageiq/pull/15991.
PR https://github.com/ManageIQ/manageiq/pull/16056 also needed to be back-ported along with PR 15991.
Verified that retiring parent service also retires child service when the child service was added to parent service using add_resource.