Change DC configs for scalability

To better adjust with scalability improvements, this commit changes
the number of dcmanager-audit workers from 4 to 8, dcmanager-state
workers from 4 to 8 and increase the limit of maximum number of
subclouds in a group and parallel orchestration.

Test plan:
  - PASS: Verify changes in number of workers were applied correctly
          when the config was not present on dcmanager.conf
  - PASS: Verify it's possible to create a group with new subcloud limit
  - PASS: Verify it's possible to create a sw-deploy-strategy with
          new subcloud limit in parallel

Story: 2011106
Task: 51020

Change-Id: I075f06f82639c2d5c2e48257a9cf326b6d105dca
Signed-off-by: Victor Romano <victor.gluzromano@windriver.com>
This commit is contained in:
Victor Romano 2024-09-10 12:30:43 -03:00
parent 31d5c3c99a
commit 5b97cc148b
5 changed files with 12 additions and 7 deletions

View File

@ -45,7 +45,7 @@ SUPPORTED_GROUP_APPLY_TYPES = [
MAX_SUBCLOUD_GROUP_NAME_LEN = 255 MAX_SUBCLOUD_GROUP_NAME_LEN = 255
MAX_SUBCLOUD_GROUP_DESCRIPTION_LEN = 255 MAX_SUBCLOUD_GROUP_DESCRIPTION_LEN = 255
MIN_SUBCLOUD_GROUP_MAX_PARALLEL_SUBCLOUDS = 1 MIN_SUBCLOUD_GROUP_MAX_PARALLEL_SUBCLOUDS = 1
MAX_SUBCLOUD_GROUP_MAX_PARALLEL_SUBCLOUDS = 500 MAX_SUBCLOUD_GROUP_MAX_PARALLEL_SUBCLOUDS = 5000
class SubcloudGroupsController(restcomm.GenericPathController): class SubcloudGroupsController(restcomm.GenericPathController):

View File

@ -52,6 +52,8 @@ FORCE_ALL_TYPES = [
consts.SW_UPDATE_TYPE_PRESTAGE, consts.SW_UPDATE_TYPE_PRESTAGE,
] ]
MAX_PARALLEL_SUBCLOUDS_LIMIT = 5000
class SwUpdateStrategyController(object): class SwUpdateStrategyController(object):
@ -186,7 +188,10 @@ class SwUpdateStrategyController(object):
max_parallel_subclouds = int(max_parallel_subclouds_str) max_parallel_subclouds = int(max_parallel_subclouds_str)
except ValueError: except ValueError:
pecan.abort(400, _("max-parallel-subclouds invalid")) pecan.abort(400, _("max-parallel-subclouds invalid"))
if max_parallel_subclouds < 1 or max_parallel_subclouds > 500: if (
max_parallel_subclouds < 1
or max_parallel_subclouds > MAX_PARALLEL_SUBCLOUDS_LIMIT
):
pecan.abort(400, _("max-parallel-subclouds invalid")) pecan.abort(400, _("max-parallel-subclouds invalid"))
stop_on_failure = payload.get("stop-on-failure") stop_on_failure = payload.get("stop-on-failure")

View File

@ -156,10 +156,10 @@ scheduler_opts = [
common_opts = [ common_opts = [
cfg.IntOpt("workers", default=1, help="number of workers"), cfg.IntOpt("workers", default=1, help="number of workers"),
cfg.IntOpt("orch_workers", default=1, help="number of orchestrator workers"), cfg.IntOpt("orch_workers", default=1, help="number of orchestrator workers"),
cfg.IntOpt("state_workers", default=4, help="number of state workers"), cfg.IntOpt("state_workers", default=8, help="number of state workers"),
cfg.IntOpt("audit_workers", default=1, help="number of audit workers"), cfg.IntOpt("audit_workers", default=1, help="number of audit workers"),
cfg.IntOpt( cfg.IntOpt(
"audit_worker_workers", default=4, help="number of audit-worker workers" "audit_worker_workers", default=8, help="number of audit-worker workers"
), ),
cfg.StrOpt("host", default="localhost", help="hostname of the machine"), cfg.StrOpt("host", default="localhost", help="hostname of the machine"),
cfg.IntOpt( cfg.IntOpt(

View File

@ -231,7 +231,7 @@ class TestSubcloudGroupPost(BaseTestSubcloudGroupController, PostJSONMixin):
The acceptable range is between 1 and 500 The acceptable range is between 1 and 500
""" """
invalid_values = [0, 501, -1, "fake"] invalid_values = [0, 5001, -1, "fake"]
for index, invalid_value in enumerate(invalid_values, start=1): for index, invalid_value in enumerate(invalid_values, start=1):
self.params["max_parallel_subclouds"] = invalid_value self.params["max_parallel_subclouds"] = invalid_value
@ -442,7 +442,7 @@ class TestSubcloudGroupPatch(BaseTestSubcloudGroupController, UpdateMixin):
def test_patch_fails_with_invalid_max_parallel_subclouds(self): def test_patch_fails_with_invalid_max_parallel_subclouds(self):
"""Test patch fails with invalid max parallel subclouds""" """Test patch fails with invalid max parallel subclouds"""
invalid_values = [0, 501, -1, "fake"] invalid_values = [0, 5001, -1, "fake"]
for index, invalid_value in enumerate(invalid_values, start=1): for index, invalid_value in enumerate(invalid_values, start=1):
self.params = {"max_parallel_subclouds": str(invalid_value)} self.params = {"max_parallel_subclouds": str(invalid_value)}

View File

@ -286,7 +286,7 @@ class TestSwUpdateStrategyPost(BaseTestSwUpdateStrategyPost):
def test_post_fails_with_invalid_max_parallel_subclouds(self): def test_post_fails_with_invalid_max_parallel_subclouds(self):
"""Test post fails with invalid max parallel subclouds""" """Test post fails with invalid max parallel subclouds"""
invalid_values = ["fake", 0, 501, -2] invalid_values = ["fake", 0, 5001, -2]
for index, invalid_value in enumerate(invalid_values, start=1): for index, invalid_value in enumerate(invalid_values, start=1):
self.params["max-parallel-subclouds"] = invalid_value self.params["max-parallel-subclouds"] = invalid_value