diff --git a/awx/main/models/ha.py b/awx/main/models/ha.py index a061a638f6..e17c03e6e4 100644 --- a/awx/main/models/ha.py +++ b/awx/main/models/ha.py @@ -160,7 +160,7 @@ class Instance(HasPolicyEditsMixin, BaseModel): default=100, editable=False, ) - capacity_adjustment = models.DecimalField(default=Decimal(1.0), max_digits=3, decimal_places=2, validators=[MinValueValidator(Decimal(0.0))]) + capacity_adjustment = models.DecimalField(default=Decimal(0.75), max_digits=3, decimal_places=2, validators=[MinValueValidator(Decimal(0.0))]) enabled = models.BooleanField(default=True) managed_by_policy = models.BooleanField(default=True) diff --git a/awx/main/tests/functional/models/test_ha.py b/awx/main/tests/functional/models/test_ha.py index bf8c5309c7..52e45d8b9f 100644 --- a/awx/main/tests/functional/models/test_ha.py +++ b/awx/main/tests/functional/models/test_ha.py @@ -39,7 +39,7 @@ def test_dispatcher_max_workers_reserve(settings, fake_redis): plus reserve worker count """ with override_settings(**settings): - i = Instance.objects.create(hostname='test-1', node_type='hybrid') + i = Instance.objects.create(hostname='test-1', node_type='hybrid', capacity_adjustment=1.0) i.local_health_check() assert get_auto_max_workers() == i.capacity + 7, (i.cpu, i.memory, i.cpu_capacity, i.mem_capacity) diff --git a/awx/main/tests/functional/test_jobs.py b/awx/main/tests/functional/test_jobs.py index e71420f737..fd6046b1a0 100644 --- a/awx/main/tests/functional/test_jobs.py +++ b/awx/main/tests/functional/test_jobs.py @@ -44,8 +44,8 @@ def test_job_capacity_and_with_inactive_node(): i = Instance.objects.create(hostname='test-1') i.save_health_data('18.0.1', 2, 8000) assert i.enabled is True - assert i.capacity_adjustment == 1.0 - assert i.capacity == 62 + assert i.capacity_adjustment == 0.75 + assert i.capacity == 48.5 i.enabled = False i.save() with override_settings(CLUSTER_HOST_ID=i.hostname):