Bug 1511126 - [PRD][RFE][M-5] Ansible Next Gen - Ansible Reporting
Summary: [PRD][RFE][M-5] Ansible Next Gen - Ansible Reporting
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.10.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.10.0
Assignee: drew uhlmann
QA Contact: Nikhil Dhandre
URL:
Whiteboard:
Depends On:
Blocks: 1498997 1634053
TreeView+ depends on / blocked
 
Reported: 2017-11-08 18:05 UTC by John Hardy
Modified: 2019-02-07 23:00 UTC (History)
14 users (show)

Fixed In Version: 5.10.0.28
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1634053 (view as bug list)
Environment:
Last Closed: 2019-02-07 23:00:36 UTC
Category: ---
Cloudforms Team: Ansible
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:0212 None None None 2019-02-07 23:00:47 UTC

Comment 4 Greg Blomquist 2018-07-16 18:58:21 UTC
Tom, look over the design in comment #3, and review with GregM and Jason Frey if necessary.

Comment 5 Greg McCullough 2018-07-16 19:31:41 UTC
Tomas - The design doc goes a little further then what we are expecting to deliver in the first phase of this feature.  It would be limited to the items that are available when launching the request.  For example, Button name, user and start time.  Phase 1 would not require enhancements at the automate layer to update the event record.

Comment 8 CFME Bot 2018-08-22 12:31:09 UTC
New commits detected on ManageIQ/manageiq/master:

https://github.com/ManageIQ/manageiq/commit/c7c0189e54153cd64c49805337d268e97e9bdba1
commit c7c0189e54153cd64c49805337d268e97e9bdba1
Author:     Lucy Fu <lufu@redhat.com>
AuthorDate: Mon Aug 20 17:35:42 2018 -0400
Commit:     Lucy Fu <lufu@redhat.com>
CommitDate: Mon Aug 20 17:35:42 2018 -0400

    Add association to CustomButtonEvent.

    https://bugzilla.redhat.com/show_bug.cgi?id=1511126

 app/models/mixins/custom_actions_mixin.rb | 1 +
 1 file changed, 1 insertion(+)


https://github.com/ManageIQ/manageiq/commit/cef223ae87d4c9c519278275750127e3f516915f
commit cef223ae87d4c9c519278275750127e3f516915f
Author:     Lucy Fu <lufu@redhat.com>
AuthorDate: Mon Aug 20 17:36:45 2018 -0400
Commit:     Lucy Fu <lufu@redhat.com>
CommitDate: Mon Aug 20 17:36:45 2018 -0400

    Add username, button id/name and automate entry point to CustomButtonEvent.

    https://bugzilla.redhat.com/show_bug.cgi?id=1511126

 app/models/custom_button.rb | 5 +-
 app/models/custom_button_event.rb | 10 +
 app/models/resource_action.rb | 1 +
 spec/models/resource_action_spec.rb | 1 +
 4 files changed, 16 insertions(+), 1 deletion(-)


https://github.com/ManageIQ/manageiq/commit/4b2afee883fb61516f176d361277ded3e6361c45
commit 4b2afee883fb61516f176d361277ded3e6361c45
Author:     Lucy Fu <lufu@redhat.com>
AuthorDate: Tue Aug 21 13:10:36 2018 -0400
Commit:     Lucy Fu <lufu@redhat.com>
CommitDate: Tue Aug 21 13:10:36 2018 -0400

    Add test cases.

    https://bugzilla.redhat.com/show_bug.cgi?id=1511126

 spec/models/custom_button_event_spec.rb | 42 +
 1 file changed, 42 insertions(+)

Comment 12 CFME Bot 2018-08-24 21:21:17 UTC
New commit detected on ManageIQ/manageiq/master:

https://github.com/ManageIQ/manageiq/commit/54c0388eda97c6891525e81796984cb706008c71
commit 54c0388eda97c6891525e81796984cb706008c71
Author:     Lucy Fu <lufu@redhat.com>
AuthorDate: Fri Aug 24 08:31:03 2018 -0400
Commit:     Lucy Fu <lufu@redhat.com>
CommitDate: Fri Aug 24 08:31:03 2018 -0400

    Populate timestamp of CustomButtonEvent.

    A timestamp without value would break MiqReport.

    https://bugzilla.redhat.com/show_bug.cgi?id=1511126

 app/models/custom_button.rb | 1 +
 spec/models/custom_button_spec.rb | 5 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

Comment 15 CFME Bot 2018-08-29 20:02:06 UTC
New commit detected on ManageIQ/manageiq/master:

https://github.com/ManageIQ/manageiq/commit/5c06f88565cbeb25c9770e40876f4f776db57ee7
commit 5c06f88565cbeb25c9770e40876f4f776db57ee7
Author:     Lucy Fu <lufu@redhat.com>
AuthorDate: Wed Aug 29 13:44:12 2018 -0400
Commit:     Lucy Fu <lufu@redhat.com>
CommitDate: Wed Aug 29 13:44:12 2018 -0400

    Add CustomButtonEvent association to GenericObject.

    https://bugzilla.redhat.com/show_bug.cgi?id=1511126

 app/models/generic_object.rb | 1 +
 spec/models/generic_object_spec.rb | 8 +
 2 files changed, 9 insertions(+)

Comment 18 CFME Bot 2018-09-04 13:47:38 UTC
New commits detected on ManageIQ/manageiq-ui-classic/master:

https://github.com/ManageIQ/manageiq-ui-classic/commit/548e7e7356461c1979054cfbad368b4c0d962928
commit 548e7e7356461c1979054cfbad368b4c0d962928
Author:     Dávid Halász <dhalasz@redhat.com>
AuthorDate: Tue Aug 21 11:15:11 2018 -0400
Commit:     Dávid Halász <dhalasz@redhat.com>
CommitDate: Tue Aug 21 11:15:11 2018 -0400

    Propagate the :clickable attribute further from GenericShow to GTLs

    https://bugzilla.redhat.com/show_bug.cgi?id=1511126

 app/controllers/mixins/generic_show_mixin.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


https://github.com/ManageIQ/manageiq-ui-classic/commit/a5aa786ef0489d1e1c1738482a243c2451d2dd5d
commit a5aa786ef0489d1e1c1738482a243c2451d2dd5d
Author:     Dávid Halász <dhalasz@redhat.com>
AuthorDate: Tue Aug 21 11:21:09 2018 -0400
Commit:     Dávid Halász <dhalasz@redhat.com>
CommitDate: Tue Aug 21 11:21:09 2018 -0400

    Add report, textual summary mixin and decorator for CustomButtonEvents

    https://bugzilla.redhat.com/show_bug.cgi?id=1511126

 app/controllers/mixins/generic_show_mixin.rb | 5 +
 app/decorators/custom_button_event_decorator.rb | 5 +
 app/helpers/textual_mixins/textual_custom_button_events.rb | 13 +
 product/views/CustomButtonEvent.yaml | 77 +
 4 files changed, 100 insertions(+)


https://github.com/ManageIQ/manageiq-ui-classic/commit/3a16616625fc02285536e0781e81750a6d398115
commit 3a16616625fc02285536e0781e81750a6d398115
Author:     Dávid Halász <dhalasz@redhat.com>
AuthorDate: Mon Aug 27 08:10:22 2018 -0400
Commit:     Dávid Halász <dhalasz@redhat.com>
CommitDate: Mon Aug 27 08:10:22 2018 -0400

    Enable custom button events link for entities on non-explorer screens

    https://bugzilla.redhat.com/show_bug.cgi?id=1511126

 app/controllers/availability_zone_controller.rb | 2 +-
 app/controllers/cloud_network_controller.rb | 2 +-
 app/controllers/cloud_object_store_container_controller.rb | 2 +-
 app/controllers/cloud_subnet_controller.rb | 2 +-
 app/controllers/cloud_tenant_controller.rb | 2 +-
 app/controllers/cloud_volume_controller.rb | 2 +-
 app/controllers/ems_cluster_controller.rb | 2 +-
 app/controllers/host_controller.rb | 2 +-
 app/controllers/load_balancer_controller.rb | 2 +-
 app/controllers/mixins/containers_common_mixin.rb | 2 +-
 app/controllers/network_router_controller.rb | 2 +-
 app/controllers/orchestration_stack_controller.rb | 2 +-
 app/controllers/security_group_controller.rb | 2 +-
 app/helpers/application_helper.rb | 2 +-
 app/helpers/availability_zone_helper/textual_summary.rb | 3 +-
 app/helpers/cloud_network_helper/textual_summary.rb | 3 +-
 app/helpers/cloud_object_store_container_helper/textual_summary.rb | 3 +-
 app/helpers/cloud_subnet_helper/textual_summary.rb | 3 +-
 app/helpers/cloud_tenant_helper/textual_summary.rb | 2 +
 app/helpers/cloud_volume_helper/textual_summary.rb | 3 +-
 app/helpers/container_group_helper/textual_summary.rb | 3 +-
 app/helpers/container_image_helper/textual_summary.rb | 3 +-
 app/helpers/container_node_helper/textual_summary.rb | 3 +-
 app/helpers/container_project_helper/textual_summary.rb | 3 +-
 app/helpers/container_template_helper/textual_summary.rb | 3 +-
 app/helpers/ems_cluster_helper/textual_summary.rb | 3 +-
 app/helpers/ems_storage_helper/textual_summary.rb | 9 +-
 app/helpers/host_helper/textual_summary.rb | 6 +-
 app/helpers/load_balancer_helper/textual_summary.rb | 3 +-
 app/helpers/network_router_helper/textual_summary.rb | 3 +-
 app/helpers/orchestration_stack_helper/textual_summary.rb | 1 +
 app/helpers/persistent_volume_helper/textual_summary.rb | 3 +-
 app/helpers/security_group_helper/textual_summary.rb | 3 +-
 app/views/cloud_object_store_container/show.html.haml | 2 +-
 app/views/cloud_subnet/show.html.haml | 2 +-
 app/views/cloud_tenant/show.html.haml | 2 +-
 app/views/cloud_volume/show.html.haml | 2 +-
 app/views/container_group/show.html.haml | 2 +-
 app/views/container_image/show.html.haml | 2 +-
 app/views/container_node/show.html.haml | 2 +-
 app/views/container_project/show.html.haml | 2 +-
 app/views/container_template/show.html.haml | 2 +-
 app/views/ems_cluster/show.html.haml | 2 +-
 app/views/host/show.html.haml | 2 +-
 app/views/load_balancer/show.html.haml | 2 +-
 app/views/miq_template/show.html.haml | 2 +-
 app/views/network_router/show.html.haml | 2 +-
 app/views/orchestration_stack/show.html.haml | 2 +-
 app/views/persistent_volume/show.html.haml | 2 +-
 app/views/security_group/show.html.haml | 2 +-
 spec/helpers/orchestration_stack_helper/textual_summary_spec.rb | 2 +-
 51 files changed, 76 insertions(+), 51 deletions(-)


https://github.com/ManageIQ/manageiq-ui-classic/commit/854bda3319a79c371633e2ae0ae1de8126c7f82a
commit 854bda3319a79c371633e2ae0ae1de8126c7f82a
Author:     Dávid Halász <dhalasz@redhat.com>
AuthorDate: Mon Aug 27 08:30:42 2018 -0400
Commit:     Dávid Halász <dhalasz@redhat.com>
CommitDate: Mon Aug 27 08:30:42 2018 -0400

    Enable custom button events link for VMs and templates

    https://bugzilla.redhat.com/show_bug.cgi?id=1511126

 app/controllers/vm_common.rb | 6 +
 app/helpers/textual_mixins/textual_custom_button_events.rb | 2 +-
 app/helpers/vm_helper/textual_summary.rb | 7 +-
 3 files changed, 11 insertions(+), 4 deletions(-)


https://github.com/ManageIQ/manageiq-ui-classic/commit/9884ea7c918c35e4a0411bcf926a8af2fbd872d6
commit 9884ea7c918c35e4a0411bcf926a8af2fbd872d6
Author:     Dávid Halász <dhalasz@redhat.com>
AuthorDate: Tue Aug 28 08:28:14 2018 -0400
Commit:     Dávid Halász <dhalasz@redhat.com>
CommitDate: Tue Aug 28 08:28:14 2018 -0400

    Enable custom button events for infra datastores

    https://bugzilla.redhat.com/show_bug.cgi?id=1511126

 app/controllers/storage_controller.rb | 2 +-
 app/helpers/ems_storage_helper/textual_summary.rb | 9 +-
 app/helpers/storage_helper/textual_summary.rb | 13 +-
 app/views/storage/show.html.haml | 2 +-
 4 files changed, 18 insertions(+), 8 deletions(-)


https://github.com/ManageIQ/manageiq-ui-classic/commit/5f9b1dcafff71865bc15c42f21dd0c67012e9bc2
commit 5f9b1dcafff71865bc15c42f21dd0c67012e9bc2
Author:     Dávid Halász <dhalasz@redhat.com>
AuthorDate: Tue Aug 28 10:08:10 2018 -0400
Commit:     Dávid Halász <dhalasz@redhat.com>
CommitDate: Tue Aug 28 10:08:10 2018 -0400

    Enable custom button events for ems providers

    https://bugzilla.redhat.com/show_bug.cgi?id=1511126

 app/controllers/ems_common.rb | 1 +
 app/helpers/application_helper/toolbar_chooser.rb | 1 +
 app/helpers/ems_cloud_helper/textual_summary.rb | 3 +-
 app/helpers/ems_container_helper/textual_summary.rb | 4 +-
 app/helpers/ems_infra_helper/textual_summary.rb | 13 +-
 app/helpers/ems_network_helper/textual_summary.rb | 3 +-
 app/helpers/ems_physical_infra_helper/textual_summary.rb | 6 +-
 app/helpers/textual_mixins/textual_custom_button_events.rb | 8 +-
 8 files changed, 33 insertions(+), 6 deletions(-)


https://github.com/ManageIQ/manageiq-ui-classic/commit/fbfdebb42eb0d8bf1f15dcf2b10982a69d3e608a
commit fbfdebb42eb0d8bf1f15dcf2b10982a69d3e608a
Author:     Dávid Halász <dhalasz@redhat.com>
AuthorDate: Wed Aug 29 04:10:17 2018 -0400
Commit:     Dávid Halász <dhalasz@redhat.com>
CommitDate: Wed Aug 29 04:10:17 2018 -0400

    Enable custom button events for infra networking switches

    https://bugzilla.redhat.com/show_bug.cgi?id=1511126

 app/controllers/infra_networking_controller.rb | 11 +
 app/helpers/infra_networking_helper/textual_summary.rb | 14 +-
 config/routes.rb | 1 +
 3 files changed, 25 insertions(+), 1 deletion(-)


https://github.com/ManageIQ/manageiq-ui-classic/commit/5038147ecdf894bdd69c96d79e21a003ac2a024f
commit 5038147ecdf894bdd69c96d79e21a003ac2a024f
Author:     Dávid Halász <dhalasz@redhat.com>
AuthorDate: Wed Aug 29 07:32:01 2018 -0400
Commit:     Dávid Halász <dhalasz@redhat.com>
CommitDate: Wed Aug 29 07:32:01 2018 -0400

    Display custom button events for services

    https://bugzilla.redhat.com/show_bug.cgi?id=1511126

 app/controllers/service_controller.rb | 8 +-
 app/helpers/service_helper/textual_summary.rb | 14 +-
 app/views/service/show.html.haml | 2 +-
 3 files changed, 20 insertions(+), 4 deletions(-)


https://github.com/ManageIQ/manageiq-ui-classic/commit/7238bc801fa1828fb6727caa99ed39e6f2ff5822
commit 7238bc801fa1828fb6727caa99ed39e6f2ff5822
Author:     Dávid Halász <dhalasz@redhat.com>
AuthorDate: Wed Aug 29 13:55:00 2018 -0400
Commit:     Dávid Halász <dhalasz@redhat.com>
CommitDate: Wed Aug 29 13:55:00 2018 -0400

    Enable custom button events for generic objects on services/automate

    https://bugzilla.redhat.com/show_bug.cgi?id=1511126

 app/controllers/generic_object_controller.rb | 4 +-
 app/controllers/service_controller.rb | 2 +-
 app/helpers/generic_object_helper/textual_summary.rb | 15 +
 app/views/generic_object/show.html.haml | 2 +-
 4 files changed, 19 insertions(+), 4 deletions(-)


https://github.com/ManageIQ/manageiq-ui-classic/commit/774a178526639d23a18c268f168c658dada5c893
commit 774a178526639d23a18c268f168c658dada5c893
Author:     Dávid Halász <dhalasz@redhat.com>
AuthorDate: Thu Aug 30 08:27:20 2018 -0400
Commit:     Dávid Halász <dhalasz@redhat.com>
CommitDate: Thu Aug 30 08:27:20 2018 -0400

    Massively fix totally specs for CustomButtonEvents

    https://bugzilla.redhat.com/show_bug.cgi?id=1511126

 spec/helpers/availability_zone_helper/textual_summary_spec.rb | 2 +-
 spec/helpers/cloud_network_helper/textual_summary_spec.rb | 1 +
 spec/helpers/cloud_object_store_container_helper/textual_summary_spec.rb | 2 +-
 spec/helpers/cloud_subnet_helper/textual_summary_spec.rb | 1 +
 spec/helpers/cloud_tenant_helper/textual_summary_spec.rb | 1 +
 spec/helpers/cloud_volume_helper/textual_summary_spec.rb | 1 +
 spec/helpers/container_group_helper/textual_summary_spec.rb | 1 +
 spec/helpers/container_image_helper/textual_summary_spec.rb | 1 +
 spec/helpers/container_node_helper/textual_summary_spec.rb | 1 +
 spec/helpers/container_project_helper/textual_summary_spec.rb | 1 +
 spec/helpers/container_template_helper/textual_summary_spec.rb | 2 +-
 spec/helpers/ems_cloud_helper/textual_summary_spec.rb | 1 +
 spec/helpers/ems_cluster_helper/textual_summary_spec.rb | 1 +
 spec/helpers/ems_cotainer_helper/textual_summary_spec.rb | 1 +
 spec/helpers/ems_infra_helper/textual_summary_spec.rb | 1 +
 spec/helpers/ems_network_helper/textual_summary_spec.rb | 1 +
 spec/helpers/ems_physical_infra_helper/textual_summary_spec.rb | 1 +
 spec/helpers/ems_storage_helper/textual_summary_spec.rb | 1 +
 spec/helpers/host_helper/textual_summary_spec.rb | 1 +
 spec/helpers/infra_networking_helper/textual_summary_spec.rb | 2 +-
 spec/helpers/load_balancer_helper/textual_summary_spec.rb | 1 +
 spec/helpers/network_router_helper/textual_summary_spec.rb | 1 +
 spec/helpers/orchestration_stack_helper/textual_summary_spec.rb | 2 +-
 spec/helpers/persistent_volume_helper/textual_summary_spec.rb | 2 +-
 spec/helpers/security_group_helper/textual_summary_spec.rb | 1 +
 spec/helpers/service_helper/textual_summary_spec.rb | 2 +-
 spec/helpers/storage_helper/textual_summary_spec.rb | 1 +
 spec/helpers/vm_helper/textual_summary_spec.rb | 4 +-
 28 files changed, 30 insertions(+), 8 deletions(-)

Comment 19 CFME Bot 2018-09-04 14:01:19 UTC
New commit detected on ManageIQ/manageiq/master:

https://github.com/ManageIQ/manageiq/commit/06057fb0bf21a5d9b8d433171e52b4383be04eb7
commit 06057fb0bf21a5d9b8d433171e52b4383be04eb7
Author:     Dávid Halász <dhalasz@redhat.com>
AuthorDate: Tue Sep  4 07:06:09 2018 -0400
Commit:     Dávid Halász <dhalasz@redhat.com>
CommitDate: Tue Sep  4 07:06:09 2018 -0400

    Add product feature for displaying custom button events

    https://bugzilla.redhat.com/show_bug.cgi?id=1511126

 db/fixtures/miq_product_features.yml | 11 +
 1 file changed, 11 insertions(+)

Comment 20 Sudhir Mallamprabhakara 2018-09-12 17:53:21 UTC
Nikhil - Pls co-ordinate with Satyajit to validate this as this involves custom buttons and ansible

Comment 26 Nikhil Dhandre 2018-10-18 10:30:30 UTC
As per above observation and I tried to test it on 5.10.0.20. Yes, playbook execution is failing on it. but still, I am expecting custom button events. Moving to assign state. let me know if anything I missed in testing.

Comment 28 Tomas Coufal 2018-10-18 10:56:03 UTC
The custom button events should be located in a separate model "CustomButtonEvent", do you see any entries there? The event_type property varies and is never set just to plain custom_button_event. The doc you're referring to is outdated unfortunately (It was used for the first kick off only).

For further details please see the discussion on  https://github.com/ManageIQ/manageiq/pull/17764

To find out if the events reach the database, please run either:
- "CustomButtonEvent.all" in rails console
- "select * from event_streams where type = 'CustomButtonEvent';" in psql

Hope it helps. If you don't see any, we have a problem on the backend side.

Comment 29 Tomas Coufal 2018-10-18 10:57:02 UTC
Let's see if the comment 28 can help us debug it. ^

Comment 31 drew uhlmann 2018-10-19 19:30:46 UTC
Hey Nikhil! So I spent a bit of time today looking at this ticket and I'll get back to it on Monday but I thought it prudent to note my findings here: 

Your appliance was missing a recent change in the custom button model (https://github.com/ManageIQ/manageiq/commit/f5dcc96c62ce8f2a8a131b07ca84c09bc8cf217f) that I applied. I am now seeing that CustomButtonEvents are created but not on custom buttons that run Order_Ansible_Playbook for the request. If the request gets changed to InspectMe, you'll see the event creation. This means that the invoke method on custom buttons isn't being triggered for ansible playbooks.

Comment 33 drew uhlmann 2018-10-24 19:59:05 UTC
Hey John, Nikhil, sorry, there wasn't a question, I was just writing notes for my future self to remember about this.

Comment 34 drew uhlmann 2018-11-06 16:53:40 UTC
https://github.com/ManageIQ/manageiq-api/pull/506 should help with this issue. 

Also, Nikhil, both of the appliances you provided as reproducers for this have been missing the change that I talked about in comment 31 and that is a necessary change in order for this to get fixed, just fyi.

Comment 36 drew uhlmann 2018-11-29 13:58:36 UTC
Hey Nikhil! The two PRs that should fix the issue you ran into while testing this are merged. Please test again. Thanks!!

Comment 37 CFME Bot 2018-11-30 15:33:53 UTC
New commit detected on ManageIQ/manageiq-api/hammer:

https://github.com/ManageIQ/manageiq-api/commit/6f554bd793117f613a359369f6c466bdca618e97
commit 6f554bd793117f613a359369f6c466bdca618e97
Author:     Gregg Tanzillo <gtanzill@redhat.com>
AuthorDate: Thu Nov 29 08:55:28 2018 -0500
Commit:     Gregg Tanzillo <gtanzill@redhat.com>
CommitDate: Thu Nov 29 08:55:28 2018 -0500

    Merge pull request #506 from d-m-u/bz1511126

    Custom Buttons with dialogs should be running invoke

    (cherry picked from commit d8e8f30bd2e1e0501ba706e93d692c450448bf54)

    https://bugzilla.redhat.com/show_bug.cgi?id=1511126

 app/controllers/api/base_controller/generic.rb | 1 +
 spec/requests/custom_actions_spec.rb | 3 +
 2 files changed, 4 insertions(+)

Comment 40 errata-xmlrpc 2019-02-07 23:00:36 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/RHSA-2019:0212


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