mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Reduce the number of test swarm minions on Amazon 2023 on Arm64
The test suite is getting OOM killed on that test. Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
parent
7eb4ffbe75
commit
ec7bcdf8e6
1 changed files with 17 additions and 4 deletions
|
@ -39,19 +39,32 @@ def salt_cli(salt_master):
|
|||
|
||||
|
||||
@pytest.fixture(scope="package")
|
||||
def minion_count():
|
||||
def _minion_count(grains):
|
||||
# Allow this to be changed via an environment variable if needed
|
||||
return int(os.environ.get("SALT_CI_MINION_SWARM_COUNT", 15))
|
||||
env_count = os.environ.get("SALT_CI_MINION_SWARM_COUNT")
|
||||
if env_count is not None:
|
||||
return int(env_count)
|
||||
# Default to 15 swarm minions
|
||||
count = 15
|
||||
if grains["osarch"] != "osarch":
|
||||
return count
|
||||
if grains["os"] != "Amazon":
|
||||
return count
|
||||
if grains["osmajorrelease"] != 2023:
|
||||
return count
|
||||
# Looks like the test suite on Amazon 2023 under ARM64 get's OOM killed
|
||||
# Let's reduce the number of swarm minions
|
||||
return count - 5
|
||||
|
||||
|
||||
@pytest.fixture(scope="package")
|
||||
def minion_swarm(salt_master, minion_count):
|
||||
def minion_swarm(salt_master, _minion_count):
|
||||
assert salt_master.is_running()
|
||||
minions = []
|
||||
# We create and arbitrarily tall context stack to register the
|
||||
# minions stop mechanism callback
|
||||
with ExitStack() as stack:
|
||||
for idx in range(minion_count):
|
||||
for idx in range(_minion_count):
|
||||
minion_factory = salt_master.salt_minion_daemon(
|
||||
random_string(f"swarm-minion-{idx}-"),
|
||||
extra_cli_arguments_after_first_start_failure=["--log-level=info"],
|
||||
|
|
Loading…
Add table
Reference in a new issue