Unable to load inventory from the source due to error "You have already reached the maximum number of hosts allowed for your organization"
Environment
- Red Hat® Ansible Automation Platform 2.x
Issue
-
Inventory import job Details tab page showing below error on the status field.
Status : You have already reached the maximum number of hosts allowed for your organization. Contact your System Administrator for Assistance
Resolution
-
Ensure Max Hosts limit set on the Organization:
Organizations -> <select the organization> -> Edit -> Max Hosts: XXis not less than the hosts getting imported from the source.- Example: If inventory plugin is able to import 500 hosts from the source, then the 'Max Hosts' value should be > 500.
-
Compare this with the
org_host_limit_errorin the below api endpoint:
https://<gateway_fqdn>/api/controller/v2/inventory_updates/N. Where N is the inventory id. -
Inventory will not load hosts beyond the "Max Host" variable if is set to a non-zero number.
Root Cause
-
Max Host is the maximum number of hosts allowed to be managed by this organization. Value defaults to 0 which means no limit.
-
If the "Max Host" variable is assigned a non-zero value, the inventory will restrict loading to that specific number of hosts.
Diagnostic Steps
-
Check for the failed inventory source api output:
https://<gateway_fqdn>/api/controller/v2/inventory_updates/N
Where N is the inventory id."id": 22127, "type": "inventory_update", "url": "/api/v2/inventory_updates/22127/", "related": { "created_by": "/api/v2/users/1/", "credential": "/api/v2/credentials/79/", "unified_job_template": "/api/v2/inventory_sources/717/", "stdout": "/api/v2/inventory_updates/22127/stdout/", "inventory_source": "/api/v2/inventory_sources/717/", "cancel": "/api/v2/inventory_updates/22127/cancel/", "notifications": "/api/v2/inventory_updates/22127/notifications/", "events": "/api/v2/inventory_updates/22127/events/", "source_project_update": "/api/v2/project_updates/22128/", "inventory": "/api/v2/inventories/160/", "credentials": "/api/v2/inventory_updates/22127/credentials/", "source_project": "/api/v2/projects/716/" Output Trimmed "job_explanation": "", "execution_node": "<tower-node>", "result_traceback": "", "event_processing_finished": true, "inventory": 160, "inventory_source": 717, "license_error": false, "org_host_limit_error": true, <<<<<<<<<<<<<<<<<<<<< Here "source_project_update": 22128, "source_project": 716 } - "org_host_limit_error": true is indicating the Host Limit Error.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments