Skip to content

Commit

Permalink
Merge branch 'master' into refine-talos
Browse files Browse the repository at this point in the history
  • Loading branch information
yangchiu authored Dec 3, 2024
2 parents 0e8c957 + 7961c1d commit da47120
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion e2e/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ directio==1.3
flake8
kubernetes==27.2.0
requests==2.32.3
boto3==1.35.69
boto3==1.35.71
pyyaml==6.0.2
minio==5.0.10
17 changes: 11 additions & 6 deletions manager/integration/tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -2536,8 +2536,9 @@ def wait_for_replica_scheduled(client, volume_name, to_nodes,
assert volume.robustness == VOLUME_ROBUSTNESS_HEALTHY

scheduled = 0
unexpect_fail = expect_fail
expect_nodes = [n for n in to_nodes]
unexpect_fail = max(0, expect_fail)

expect_nodes = set(to_nodes)
for r in volume.replicas:
try:
assert r.hostId in expect_nodes
Expand All @@ -2551,17 +2552,21 @@ def wait_for_replica_scheduled(client, volume_name, to_nodes,

scheduled += 1
except AssertionError:
unexpect_fail -= 1
if expect_fail >= 0:
unexpect_fail -= 1

if scheduled == expect_success and unexpect_fail == 0:
break

time.sleep(RETRY_INTERVAL)

assert scheduled == expect_success, f" Volume = {volume}"
assert unexpect_fail == 0, f" Volume = {volume}"
assert len(volume.replicas) == expect_success + expect_fail, \
f" Volume = {volume}"
assert unexpect_fail == 0, f"Got {unexpect_fail} unexpected fail"

if expect_fail >= 0:
assert len(volume.replicas) == expect_success + expect_fail, \
f" Volume = {volume}"

return volume


Expand Down
2 changes: 1 addition & 1 deletion manager/integration/tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -3791,7 +3791,7 @@ def test_allow_volume_creation_with_degraded_availability_restore(set_random_bac
to_nodes=[node1.name,
node2.name],
expect_success=2,
expect_fail=0,
expect_fail=-1,
chk_vol_healthy=False,
chk_replica_running=False)

Expand Down

0 comments on commit da47120

Please sign in to comment.