Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-20107

Foreman inventory sync with Ansible Tower is five times slower when non-admin user with custom role\permission is used and Reports API is enabled

XMLWordPrintable

    • Important
    • No Coverage
    • None

      Description of problem:

      Following these resources, we can configure Ansible Tower to Talk to satellite and use the satellite data as the Inventory source to create dynamic inventory.

      Satellite and Ansible Tower integration part 1: Inventory integration
      https://www.redhat.com/en/blog/satellite-and-ansible-tower-integration-part-1-inventory-integration

      Use Satellite 6 as an Inventory Source in Ansible Tower
      https://www.ansible.com/blog/use-satellite-6-as-an-inventory-source-in-ansible-tower

      Now, if I configure everything and set up a non-admin user in Satellite with correct roles and permissions, then Ansible Tower will be able to use that user in the Source of Foreman Inventory but will take a huge amount of time to Load and Import all Host and Hostgroups information from Satellite.

      The same thing can be done with "admin" or an Administrator-level user of Satellite within five times less amount of time.

      This is a significant decrease in performance and It seems the non-admin user is taking a huge amount of time to generate the report from the "Ansible - Ansible Inventory" template

      Version-Release number of selected component (if applicable):

      Satellite 6.9.9

      How reproducible:

      Always with Customer DB restored

      Steps to Reproduce:

      Check internal comments for the reproducer details.

      Actual results:

      With non-admin user:

        • Default i.e. Same config as the customer where batch_size is set to 250

      ~~~
      1489.542 INFO Processing JSON output...
      1489.999 INFO Loaded 306 groups, 3565 hosts
      1529.132 INFO Inventory import completed for sat69_inventory_source in 1524.8s
      ~~~

      i.e. 25.4 minutes

        • the same config as the customer but the batch_size is increased to 500

      ~~~
      1464.983 INFO Loaded 306 groups, 3565 hosts
      1497.332 INFO Inventory import completed for sat69_inventory_source in 1492.6s
      ~~~

      i.e. 24.87 minutes

      Obviously, the batch_size is irrelevant in the case of Reports API but the duration stays between 25 - 27 mins to complete the sync.

      Now, With the "admin" user of the satellite:

      ~~~
      241.946 INFO Processing JSON output...
      242.422 INFO Loaded 306 groups, 3565 hosts
      275.385 INFO Inventory import completed for sat69_inventory_source in 271.1s
      ~~~

      4.5 mins which are five times less than what it took for the non-admin user.

      Expected results:

      Non-Admin users with correct roles\permissions should be able to get the Inventory Report generated within 4 - 5 mins

      Additional info:

      NA

              jira-bugzilla-migration RH Bugzilla Integration
              rhn-support-saydas Sayan Das
              Lukas Hellebrandt Lukas Hellebrandt
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: