Bug 1415106

Summary: [RFE] Add the ability to run service-related automate tasks in a specific zone
Product: Red Hat CloudForms Management Engine Reporter: Peter McGowan <pmcgowan>
Component: UI - OPSAssignee: Harpreet Kataria <hkataria>
Status: ON_QA --- QA Contact: Sudhir Mallamprabhakara <smallamp>
Severity: medium Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: medium    
Version: 5.7.0CC: bmidwood, brant.evans, cbolz, gmccullo, greartes, hkataria, jcutter, jhardy, jocarter, lavenel, lufu, mfeifer, mkanoor, mpovolny, obarenbo, phoffmann, simaishi, tfitzger
Target Milestone: GAKeywords: FutureFeature, RFE
Target Release: 5.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: zone
Fixed In Version: 5.11.0.10 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Peter McGowan 2017-01-20 09:55:02 UTC
Description of problem:
When we launch a service, we currently have no control over which zone the service-related automate methods/tasks run in. It would be very useful to be able to select the zone to run in when we define a service catalog item or bundle.

Additional info:
In a multi-appliance or multi-zone CFME installation, it is usual for enterprise firewall rules to be set to only allow specific CFME appliances access to external applications. In CFME we often have service-related workflows that include connectivity/integration points to such applications (such as a CMDB for example), and at present some of these workflows 'randomly' fail, depending which zone/appliance happens to be running the service_template_provision_task.

A workaround is for the service_template_provision_task to schedule the main workflow using $evm.execute('create_automation_request', ...), specifying the zone to run in, but this is nasty. Being able to specify the zone or permissible zones when we define the service would be much better.

Comment 2 Greg McCullough 2017-04-04 21:19:51 UTC
https://www.pivotaltracker.com/story/show/143080079

Comment 6 CFME Bot 2019-03-29 13:57:19 UTC
New commit detected on ManageIQ/manageiq-schema/master:

https://github.com/ManageIQ/manageiq-schema/commit/d2008ef81b7af90432061ef6ebb607cf15acc922
commit d2008ef81b7af90432061ef6ebb607cf15acc922
Author:     Lucy Fu <lufu@redhat.com>
AuthorDate: Tue Mar 26 11:46:00 2019 -0400
Commit:     Lucy Fu <lufu@redhat.com>
CommitDate: Tue Mar 26 11:46:00 2019 -0400

    Add zone to service templates.

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

 db/migrate/20190318190517_add_zone_to_service_templates.rb | 5 +
 1 file changed, 5 insertions(+)

Comment 7 CFME Bot 2019-03-30 12:15:41 UTC
New commit detected on ManageIQ/manageiq/master:

https://github.com/ManageIQ/manageiq/commit/156eda571e5a68b68cf5571f363194eae696f35e
commit 156eda571e5a68b68cf5571f363194eae696f35e
Author:     Lucy Fu <lufu@redhat.com>
AuthorDate: Tue Mar 19 10:59:04 2019 -0400
Commit:     Lucy Fu <lufu@redhat.com>
CommitDate: Tue Mar 19 10:59:04 2019 -0400

    Add zone to service provisioning.

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

 app/models/mixins/miq_request_mixin.rb | 12 +
 app/models/service_template.rb | 7 +
 app/models/service_template_provision_request.rb | 1 +
 app/models/service_template_provision_task.rb | 8 +-
 spec/models/service_template_provision_task_spec.rb | 84 +-
 5 files changed, 81 insertions(+), 31 deletions(-)

Comment 8 Greg McCullough 2019-03-30 13:25:47 UTC
Passing ticket to UI as backend work is merged.  Please sync with Lucy/Tina on UI details.

Comment 9 Lucy Fu 2019-04-01 13:25:28 UTC
UI change is required: add a drop down list for zone selection when adding a new catalog item.
There is no change for adding a new catalog bundle.

Comment 10 Lucy Fu 2019-04-04 13:53:42 UTC
Oops, forgot about UI changes.

Comment 14 CFME Bot 2019-06-19 10:42:22 UTC
New commits detected on ManageIQ/manageiq-ui-classic/master:

https://github.com/ManageIQ/manageiq-ui-classic/commit/95be089d66a7f82ce33b81c9fbc6130b1edd8fd3
commit 95be089d66a7f82ce33b81c9fbc6130b1edd8fd3
Author:     Harpreet Kataria <hkataria@redhat.com>
AuthorDate: Thu May 23 18:08:13 2019 -0400
Commit:     Harpreet Kataria <hkataria@redhat.com>
CommitDate: Thu May 23 18:08:13 2019 -0400

    Added Zone drop down to angular and non-angular catalog item editor

    This commit adds a zone drop down to angular and non-angular catalog item add/edit forms.

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

 app/assets/javascripts/controllers/catalog/catalog_item_form_controller.js | 6 +-
 app/assets/javascripts/controllers/playbook-reusable-code-mixin.js | 8 +
 app/controllers/catalog_controller.rb | 10 +-
 app/views/catalog/_form_basic_info.html.haml | 11 +
 app/views/catalog/_st_angular_form.html.haml | 11 +
 5 files changed, 44 insertions(+), 2 deletions(-)


https://github.com/ManageIQ/manageiq-ui-classic/commit/f396e6bc4f23f3b1d875611bf52576f4d25cf62e
commit f396e6bc4f23f3b1d875611bf52576f4d25cf62e
Author:     Harpreet Kataria <hkataria@redhat.com>
AuthorDate: Thu May 23 18:20:00 2019 -0400
Commit:     Harpreet Kataria <hkataria@redhat.com>
CommitDate: Thu May 23 18:20:00 2019 -0400

    Add Zone information on details screen

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

 app/views/catalog/_sandt_tree_show.html.haml | 6 +
 1 file changed, 6 insertions(+)


https://github.com/ManageIQ/manageiq-ui-classic/commit/0d0e9ddec4879c5de0261067d3ea62b6bfc8249d
commit 0d0e9ddec4879c5de0261067d3ea62b6bfc8249d
Author:     Harpreet Kataria <hkataria@redhat.com>
AuthorDate: Fri May 24 10:49:20 2019 -0400
Commit:     Harpreet Kataria <hkataria@redhat.com>
CommitDate: Fri May 24 10:49:20 2019 -0400

    Fixed broken spec test.

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

 spec/javascripts/controllers/catalog/catalog_item_form_controller_spec.js | 1 +
 spec/views/catalog/_form.html.haml_spec.rb | 1 +
 2 files changed, 2 insertions(+)


https://github.com/ManageIQ/manageiq-ui-classic/commit/3e009b110586b49a99c779b6fdc97e66aba03e1c
commit 3e009b110586b49a99c779b6fdc97e66aba03e1c
Author:     Harpreet Kataria <hkataria@redhat.com>
AuthorDate: Wed May 29 13:40:04 2019 -0400
Commit:     Harpreet Kataria <hkataria@redhat.com>
CommitDate: Wed May 29 13:40:04 2019 -0400

    Added Zone support for Automation Task schedules

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

 app/assets/javascripts/controllers/schedule/schedule_form_controller.js | 38 +-
 app/controllers/ops_controller/settings/schedules.rb | 4 +-
 app/views/ops/_schedule_form_filter.html.haml | 22 +-
 3 files changed, 61 insertions(+), 3 deletions(-)


https://github.com/ManageIQ/manageiq-ui-classic/commit/18e1e847860323bf6875381b98a937ed54e188e7
commit 18e1e847860323bf6875381b98a937ed54e188e7
Author:     Harpreet Kataria <hkataria@redhat.com>
AuthorDate: Tue Jun  4 12:45:49 2019 -0400
Commit:     Harpreet Kataria <hkataria@redhat.com>
CommitDate: Tue Jun  4 12:45:49 2019 -0400

    Addressed PR feedback

    When initially loading the form  wait for all the fields, and zones API request to finish, and then turn the spinner off. When action type is changed, it will do the 2 requests in parallel, and wait for requests to complete and then turn spinner off.
    Fixed view to show Filters drop down for non-automate task schedule that broke with previous commit in this PR.
    Fixed sort on Zone API call.

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

 app/assets/javascripts/controllers/playbook-reusable-code-mixin.js | 2 +-
 app/assets/javascripts/controllers/schedule/schedule_form_controller.js | 37 +-
 app/views/ops/_schedule_form_filter.html.haml | 12 +-
 3 files changed, 15 insertions(+), 36 deletions(-)


https://github.com/ManageIQ/manageiq-ui-classic/commit/24fdde1f1e3b86e8c6ea79296ed7a7664ed2bafc
commit 24fdde1f1e3b86e8c6ea79296ed7a7664ed2bafc
Author:     Harpreet Kataria <hkataria@redhat.com>
AuthorDate: Tue Jun 18 11:52:39 2019 -0400
Commit:     Harpreet Kataria <hkataria@redhat.com>
CommitDate: Tue Jun 18 11:52:39 2019 -0400

    Removed empty `ng-change`

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

 app/views/ops/_schedule_form_filter.html.haml | 1 -
 1 file changed, 1 deletion(-)