mirror of
https://github.com/ansible/awx.git
synced 2026-02-12 15:14:45 -03:30
make the max host default to 100
Make the max host default 100. We are seeing with moderate number of hosts i.e. 500 hosts having a few host variable each runs into max size of nginx message and nginx rejects the request. we are therefor keeping the value small so that it doesn't fail with decent number of host variables as well. remove the 999 hosts test because the default max is 100 fix the credential check fix the instance groups and execution env permission checks
This commit is contained in:
committed by
Elijah DeLee
parent
bca0f2dd47
commit
47b7bbeda7
@@ -4642,6 +4642,9 @@ class BulkJobLaunchSerializer(BaseSerializer):
|
||||
if requested_use_inventories or 'inventory' in attrs:
|
||||
self.check_inventory_permission(attrs, request, requested_use_inventories)
|
||||
|
||||
if requested_use_credentials:
|
||||
self.check_credential_permission(request, requested_use_credentials)
|
||||
|
||||
if requested_use_labels:
|
||||
self.check_label_permission(request, requested_use_labels)
|
||||
|
||||
@@ -4649,7 +4652,8 @@ class BulkJobLaunchSerializer(BaseSerializer):
|
||||
self.check_instance_group_permission(request, requested_use_instance_groups)
|
||||
|
||||
if requested_use_execution_environments:
|
||||
self.check_instance_group_permission(request, requested_use_instance_groups)
|
||||
self.check_execution_environment_permission(request, requested_use_instance_groups)
|
||||
|
||||
|
||||
# all of the unified job templates and related items have now been checked, we can now grab the objects from the DB
|
||||
jobs_object = self.get_objectified_jobs(
|
||||
@@ -4814,6 +4818,8 @@ class BulkJobLaunchSerializer(BaseSerializer):
|
||||
if requested_use_instance_groups - accessible_use_instance_groups:
|
||||
not_allowed = requested_use_instance_groups - accessible_use_instance_groups
|
||||
raise serializers.ValidationError(_(f"Instance Groups {not_allowed} not found or you don't have permissions to access it"))
|
||||
else:
|
||||
raise serializers.ValidationError(_(f"Instance Groups {requested_use_instance_groups} not found or you don't have permissions to access it"))
|
||||
|
||||
def check_execution_environment_permission(self, request, requested_use_execution_environments):
|
||||
accessible_execution_env = {
|
||||
|
||||
Reference in New Issue
Block a user