mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 18:35:46 +02:00
fix: Fix cluster_mgr.py
(#3730)
We updated the reply of `SLOT-MIGRATION-STATUS`, so `cluster_mgr.py` needs to be adjusted as well.
This commit is contained in:
parent
a115bc2b9f
commit
1c6be62a0b
2 changed files with 3 additions and 2 deletions
|
@ -19,11 +19,11 @@ async def check_cluster_data(cluster_client: redis.RedisCluster):
|
|||
|
||||
|
||||
def run_cluster_mgr(args):
|
||||
print(f"Running cluster_mgr.py {args}")
|
||||
result = subprocess.run(["../tools/cluster_mgr.py", *args])
|
||||
return result.returncode == 0
|
||||
|
||||
|
||||
@pytest.mark.xfail
|
||||
@dfly_args({"proactor_threads": 2, "cluster_mode": "yes"})
|
||||
async def test_cluster_mgr(df_factory):
|
||||
NODES = 3
|
||||
|
|
|
@ -409,7 +409,8 @@ def migrate(args):
|
|||
sync_status = []
|
||||
while True:
|
||||
sync_status = send_command(target_node, ["DFLYCLUSTER", "SLOT-MIGRATION-STATUS"])
|
||||
if sync_status == "NO_STATE":
|
||||
if len(sync_status) == 0:
|
||||
# Migration didn't start yet
|
||||
continue
|
||||
if len(sync_status) != 1:
|
||||
die_with_err(f"Unexpected number of migrations {len(sync_status)}: {sync_status}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue