Description of problem: Service Dialogs are slow Version-Release number of selected component (if applicable): 5.8.5 and 5.9.4 (These are reproducer env, not the customer ver) How reproducible: Steps to Reproduce: 1. Chcek load times for david-test catalog items 2. 3. Actual results: Expected results: Additional info:
Created attachment 1494090 [details] dialog performance enhancement Automate domain Domain contains dynamic dialog Automate methods.
Hi David, I've attached an Automate domain that contains the /Integration/VMWare/DynamicDialogs class and folder_name_region, folder_name_site, folder_name_product instances and methods. The methods have been modified to be more performant. Can you compare the dialog times with the original dialog(without the LDAP fields)? 1. Order the david-test2 Service, check load and refresh times. 2. Import and enable the dialog_performance_enhancement domain. 3. Order the david-test2 Service, check load and refresh times. I modified the dialog values for the region, site, and product to set the ID of the folder instead of the name, so the customer will have to modify the vmware_preprovision method as follows: /IGT/Infrastructure/VM/Provisioning/StateMachines/Methods/vmware_preprovision around line 25: datacenter = @template.v_owning_datacenter root_directory = "Datacenters/WG/vm/" desired_folder = @task.get_option(:folder_path_product) <---- comment out this line desired_folder = $evm.vmdb('ems_folder', @task.get_option(:folder_path_product)) <------- insert this line desired_folder.slice!(root_directory) Please let me know if you have any questions, Thanks, Tina
Hi David, I forgot to mention that the customer will need a hot fix to expose the EmsFolders folder. Can you get the timings on the 5.8 (10.10.96.78) appliance which contains the necessary code change while I make a PR? Thanks, Tina
https://github.com/ManageIQ/manageiq-automation_engine/pull/256
New commit detected on ManageIQ/manageiq-automation_engine/master: https://github.com/ManageIQ/manageiq-automation_engine/commit/d802d5824a346243e8338eaa904a9b704705aabe commit d802d5824a346243e8338eaa904a9b704705aabe Author: Tina Fitzgerald <tfitzger> AuthorDate: Mon Oct 15 13:24:56 2018 -0400 Commit: Tina Fitzgerald <tfitzger> CommitDate: Mon Oct 15 13:24:56 2018 -0400 Expose folders https://bugzilla.redhat.com/show_bug.cgi?id=1637660 lib/miq_automation_engine/service_models/miq_ae_service_ems_folder.rb | 5 +- 1 file changed, 3 insertions(+), 2 deletions(-)
New commit detected on ManageIQ/manageiq-automation_engine/hammer: https://github.com/ManageIQ/manageiq-automation_engine/commit/cdbcf67c26890eebe376d89c2fc5961b0f43d0db commit cdbcf67c26890eebe376d89c2fc5961b0f43d0db Author: Greg McCullough <gmccullo> AuthorDate: Mon Oct 15 15:16:17 2018 -0400 Commit: Greg McCullough <gmccullo> CommitDate: Mon Oct 15 15:16:17 2018 -0400 Merge pull request #256 from tinaafitz/expose_folder_to_emsfolder Expose folders to ems_folder service model. (cherry picked from commit 305f45fd49434ee2dab0d0402ef9a35f6fc3b1b7) https://bugzilla.redhat.com/show_bug.cgi?id=1637660 lib/miq_automation_engine/service_models/miq_ae_service_ems_folder.rb | 5 +- 1 file changed, 3 insertions(+), 2 deletions(-)
Hi David, I see that the customer has a custom vmname method that uses the dialog product values to set the vm name. Since this value is now an ID instead of the product name, the vmname method needs to modified in the same way as the preprovision method. /IGT/Infrastructure/VM/Provisioning/Naming/vmname method: line 19: folder_path = dialog_options["dialog_folder_path_product"] <---- comment out this line folder_path = $evm.vmdb('ems_folder', dialog_options["dialog_folder_path_product"]) <------- insert this line Let me know if you have any questions. Thanks, Tina
Hi David, The customer also has the option to disable the performance domain, and revert the change described in comment 9. Disabling the domain, and reverting the change will make the changes described in comment 19 unnecessary. Thanks, Tina
Hi David, Thanks for the update. Just an fyi, they're going to have provisioning issues if they don't revert the change described in comment 9. Thanks, Tina
Hi Niyaz, There's a lot going on in this ticket. The only product change was to expose folders to the ems_folders service model. None of our ManageIQ Automate domain methods use the ems_folders service model, so the best way to test this fix is to create a small Automate method to reference ems_folders folders. Sample Automate method: ########################################## root_folder = $evm.vmdb('ems_folder').first $evm.log(:info, "Root Folder #{root_folder.inspect}") root_folder.folders.each do |folder| $evm.log(:info, "Adding Folder: #{folder.name} with ID: #{folder.id}") end ########################################## Create a writeable domain. Create an inline method called "test_folder" in the /System/Request class. Create an instance called "test_folder" in the /System/Request class, setting a method entry to "test_folder" to call the method. Use Simulate, and specify "test_folder" as the request. (see attached screen shot)
Created attachment 1504817 [details] simulate screen shot
Hi Niyaz, Yes, the logging shown in comment 26 validates the fix for this issue. Let me know if you have any questions. Thanks, Tina
Thanks Tina, I am verifying this bz
Verified in Version 5.10.0.23.20181106165157_92dd189