Bug 1444043
Summary: | Existing or Newly created service added to parent service via REST API or from automation is not visible in UI | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat CloudForms Management Engine | Reporter: | Neha Chugh <nchugh> | ||||
Component: | UI - OPS | Assignee: | lgalis | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Martin Kourim <mkourim> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | high | ||||||
Version: | 5.7.0 | CC: | abellott, awestbro, cpelland, dajohnso, dclarizi, gmccullo, gtanzill, hgrover, hkataria, jdeubel, jhardy, jocarter, lgalis, mkourim, mpovolny, nchugh, obarenbo, rspagnol, sacpatil, simaishi | ||||
Target Milestone: | GA | Keywords: | TestOnly, ZStream | ||||
Target Release: | 5.9.0 | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | api:rest:service | ||||||
Fixed In Version: | 5.9.0.1 | Doc Type: | If docs needed, set a value | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | 1416149 | ||||||
: | 1451827 1459977 (view as bug list) | Environment: | |||||
Last Closed: | 2018-03-06 15:03:53 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | Bug | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | CFME Core | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | 1416149 | ||||||
Bug Blocks: | 1451827, 1459977 | ||||||
Attachments: |
|
Description
Neha Chugh
2017-04-20 13:21:29 UTC
Hello Greg, Can we have a quick hot fix for this as we are getting frequent cases related to this bug. Regards, Neha Chugh Neha, Which UI are you referring to? You've stated that it's a problem in the UI and not the API, so would you mind changing the component to either "UI - OPS" or "UI - Service" to reflect that? Created attachment 1274217 [details]
screenshot
I looked at the screenshot in the case (now attached to this BZ), and it appears that this is an issue with the Ops UI not service. Sending to Dan. To confirm, this service does look totally fine in the console: irb(main):037:0> ericb = $evm.vmdb('service').find_by_name('ericb') => #<MiqAeServiceService:0x62194a8 irb(main):038:0> ericb.direct_service_children => [#<MiqAeServiceService:0x61f6264 @object=#<Service id: 9000000000177, name: "servicename" irb(main):039:0> ericb.direct_service_children[0].display => true irb(main):040:0> ericb.direct_service_children[0].parent_service.name => "ericb" Despite this, as shown in Chris's screenshot above, it doesn't show in the UI. Dan, It is a purely UI bug, we have confirmed at database level and its working fine. Can we have a quick hotfix for the same as it is getting critical at client end. Regards, Neha Chugh Dan, It is a purely UI bug, we have confirmed at database level and its working fine. Can we have a quick hotfix for the same as it is getting critical at client end. Regards, Neha Chugh Neha, Even though parent/child relationship is set, we may be missing the child service resource to the parent, can you give the PR mentioned in 1441412 a try in addition to setting parent and let us know ? Thanks, Alberto Hello Alberto, I have tried the Edit REST API as suggested in 1441412 i.e. POST /api/services/:second_service_id { "action": "edit", "parent_service": { "href" : "/api/services/:first_service_id" } } Here, I replaced :second_service_id with Child Service ID and :first_service_id replaced by parent service ID. But its throwing me below exception: {"error":{"kind":"internal_server_error","message":"Association named 'parent_service' was not found on Service; perhaps you misspelled it?","klass":"ActiveRecord::AssociationNotFoundError"}} In this thread, I have shared the test appliance where it has been tested. Please try on the same appliance and let me know the recommended way so to get the child service display under parent service. Alberto, please take it on priority as it is getting critical at client end. Regards, Neha Chugh Hi Neha, I see the issue, the appliance you have is v2.3.0 API, so it's CF 4.2/Euwe release, the code mentioned in the other PR would only apply to upstream master and CF 4.5/Fine if we backport there. that fix depends on many features added to 4.5, enhanced services edit, and the add_resource action. Alberto Hello Alberto, If I understand the issue correctly, the code has been fixed for CF 4.5/fine and it is recommended to wait till next release as lots of dependencies are associated with it. Can you please confirm if we can backport for CF 4.2/Euwe as a quick workaround, if that is possible it would be great. Regards, Neha Chugh Hello Alberto, If I understand the issue correctly, the code has been fixed for CF 4.5/fine and it is recommended to wait till next release as lots of dependencies are associated with it. Can you please confirm if we can backport for CF 4.2/Euwe as a quick workaround, if that is possible it would be great. Regards, Neha Chugh Hello Alberto, It is getting critical at client end and it would be not feasible to wait till next release, can we have a workaround as it is hampering the productivity. Please let me know the ETA for this as we need to provide hot patch for the same. Regards, Neha Chugh Hello Alberto, It is getting critical at client end and it would be not feasible to wait till next release, can we have a workaround as it is hampering the productivity. Please let me know the ETA for this as we need to provide hot patch for the same. Regards, Neha Chugh Dan - I worked through this with Alberto testing against 5.7.1.0 and master and it appears to be a UI issue. You can connect two services together in either automate or the API and set the display flags to true and you never see the child service. The following steps work on 5.7.1 but not on master. Here are the full steps I used to do this in the rails console: # Create handle to access automate service models $evm = MiqAeMethodService::MiqAeService.new(MiqAeEngine::MiqAeWorkspaceRuntime.new) # Create Parent (top-level service is always visible) parent_service = $evm.vmdb('service').create(:name => "service_a") # Create Child and mark as visible child_service = $evm.vmdb('service').create(:name => "service_b") child_service.display = true # Link Services child_service.parent_service = parent_service *** Bug 1441419 has been marked as a duplicate of this bug. *** *** Bug 1416149 has been marked as a duplicate of this bug. *** Verified that service added to parent service via REST API is visible in UI when "display" is set to "true": POST /api/services { "action" : "create", "resource" : { "name" : "test_service01", "description" : "Test Service 01", "display": true } } POST /api/services { "action" : "create", "resource" : { "name" : "test_service02", "description" : "Test Service 02", "parent_service" : { "id" : <test_service01 id> }, "display": true } } |