Added new test for EC policy #262

Merged
abereziny merged 1 commits from d.zayakin/frostfs-testcases:ec-replication-tests into master 2024-07-01 15:41:24 +00:00
Collaborator

Signed-off-by: Dmitriy Zayakin d.zayakin@yadro.com

Signed-off-by: Dmitriy Zayakin <d.zayakin@yadro.com>
d.zayakin added 1 commit 2024-06-28 16:06:50 +00:00
DCO check / Commits Check (pull_request) Has been cancelled Details
2a3eb62568
[#262] Added new test for EC policy
Signed-off-by: Dmitriy Zayakin <d.zayakin@yadro.com>
d.zayakin requested review from qa-committers 2024-06-28 16:07:37 +00:00
d.zayakin requested review from qa-developers 2024-06-28 16:07:55 +00:00
abereziny reviewed 2024-06-28 16:28:02 +00:00
@ -0,0 +99,4 @@
chunks = self.get_object_nodes(cli, cid, oid, endpoint)["data_objects"]
return Chunk(**chunks[0])
@reporter.step("Search chunk node, in netmap to node key.")
Collaborator

Search node without chunks?

`Search node without chunks`?
Poster
Collaborator

done

done
d.zayakin marked this conversation as resolved
abereziny reviewed 2024-06-28 16:37:12 +00:00
@ -0,0 +121,4 @@
def create_container(self, user_cli: FrostfsCli, endpoint: str, policy: str) -> str:
return user_cli.container.create(endpoint, policy=policy, await_mode=True).stdout.split(" ")[1].strip().split("\n")[0]
@reporter.step("Search node chunk - {chunk}")
Collaborator

Search node with chunk {chunk}

`Search node with chunk {chunk}`
Poster
Collaborator

done

done
d.zayakin marked this conversation as resolved
abereziny reviewed 2024-06-28 16:37:59 +00:00
@ -0,0 +206,4 @@
cluster_state_controller.start_node_host(chunk_node)
assert self.check_replication(4, frostfs_local_cli, cid, oid)
@allure.title("Off node this chunk parity")
Collaborator

this = with

`this` = `with`
d.zayakin marked this conversation as resolved
abereziny reviewed 2024-06-28 16:38:36 +00:00
@ -0,0 +198,4 @@
with reporter.step("Stop node this data chunk."):
cluster_state_controller.stop_node_host(chunk_node, "hard")
with reporter.step("Get object, expect success."):
Collaborator

, expect success. is redundant.

`, expect success.` is redundant.
d.zayakin marked this conversation as resolved
abereziny reviewed 2024-06-28 16:39:11 +00:00
@ -0,0 +226,4 @@
with reporter.step("Check chunk replication on 4 nodes."):
assert self.check_replication(4, frostfs_local_cli, cid, oid)
with reporter.step("Search node parity chunk"):
Collaborator

with parity chunk

`with parity chunk`
d.zayakin marked this conversation as resolved
d.zayakin force-pushed ec-replication-tests from 2a3eb62568 to 84c345005a 2024-06-28 16:40:28 +00:00 Compare
abereziny reviewed 2024-06-28 16:41:49 +00:00
@ -0,0 +283,4 @@
cluster_state_controller.stop_node_host(node_parity_chunk, "hard")
with reporter.step("Get object, expect error."):
with pytest.raises(RuntimeError):
Collaborator

with pytest.raises(Exception) - which one?

`with pytest.raises(Exception)` - which one?
d.zayakin marked this conversation as resolved
abereziny reviewed 2024-06-28 16:44:03 +00:00
@ -0,0 +287,4 @@
get_object(default_user.wallet, cid, oid, self.shell, node.storage_node.get_rpc_endpoint())
with reporter.step("Start stopped node and check replication chunk."):
cluster_state_controller.start_node_host(node_data_chunk)
Collaborator

cluster_state_controller.start_stopped_hosts will be faster and more stable

`cluster_state_controller.start_stopped_hosts` will be faster and more stable
d.zayakin marked this conversation as resolved
abereziny reviewed 2024-06-28 16:45:12 +00:00
@ -0,0 +310,4 @@
with reporter.step("Check count chunks nodes on 3."):
assert self.check_replication(3, frostfs_local_cli, cid, oid)
with reporter.step("Stop node with chunk."):
Collaborator

this = with

this = with
d.zayakin marked this conversation as resolved
abereziny reviewed 2024-06-28 16:47:13 +00:00
@ -0,0 +443,4 @@
with pytest.raises(RuntimeError, match="object already removed"):
frostfs_local_cli.object.head(self.cluster.default_rpc_endpoint, cid, chunk.object_id)
@allure.title("Request LOCK (size={object_size.name})")
Collaborator

LOCK( -> LOCK (
(size- -> (size=

`LOCK(` -> `LOCK (` `(size-` -> `(size=`
abereziny marked this conversation as resolved
abereziny reviewed 2024-06-28 16:51:49 +00:00
@ -0,0 +488,4 @@
@allure.title("Output MaxEC* params in frostfscli (type={type_shards})")
@pytest.mark.parametrize(
"type_shards", ["Maximum count of data shards", "Maximum count of parity shards"], ids=["Data Shards", "Parity Shards"]
Collaborator

ids=["Data Shards", "Parity Shards"] redundant

`ids=["Data Shards", "Parity Shards"]` redundant
d.zayakin marked this conversation as resolved
abereziny reviewed 2024-06-28 16:52:21 +00:00
@ -0,0 +502,4 @@
frostfs_local_cli: FrostfsCli,
restore_network_config: None,
) -> None:
with reporter.step("Get now params MaxECDataCount and MaxECParityCount"):
Collaborator

newlines

newlines
d.zayakin marked this conversation as resolved
abereziny reviewed 2024-06-28 16:53:06 +00:00
@ -0,0 +206,4 @@
cluster_state_controller.start_node_host(chunk_node)
assert self.check_replication(4, frostfs_local_cli, cid, oid)
@allure.title("Off node with chunk parity")
Collaborator

Off -> Lose

`Off` -> `Lose`
d.zayakin marked this conversation as resolved
abereziny reviewed 2024-06-28 16:53:21 +00:00
@ -0,0 +241,4 @@
cluster_state_controller.start_node_host(chunk_node)
assert self.check_replication(4, frostfs_local_cli, cid, oid)
@allure.title("Off node with chunk data and parity")
Collaborator

off node -> Lose nodes

`off node` -> `Lose nodes`
d.zayakin marked this conversation as resolved
abereziny reviewed 2024-06-28 16:53:48 +00:00
@ -0,0 +270,4 @@
with reporter.step("Stop node with data chunk."):
cluster_state_controller.stop_node_host(node_data_chunk, "hard")
with reporter.step("Get object, expect success."):
Collaborator

, expect success. redundant

`, expect success.` redundant
d.zayakin marked this conversation as resolved
abereziny reviewed 2024-06-28 16:54:29 +00:00
@ -0,0 +291,4 @@
cluster_state_controller.start_node_host(node_parity_chunk)
assert self.check_replication(4, frostfs_local_cli, cid, oid)
@allure.title("Check policer work with chunk")
Collaborator

Check word is redundant

`Check ` word is redundant
d.zayakin marked this conversation as resolved
abereziny reviewed 2024-06-28 16:54:46 +00:00
@ -0,0 +171,4 @@
with reporter.step("Check replication chunks."):
assert self.check_replication(rep_count, frostfs_local_cli, cid, oid)
@allure.title("Off node with chunk data")
Collaborator

off -> Lose

`off` -> `Lose`
Poster
Collaborator

Done

Done
d.zayakin marked this conversation as resolved
abereziny reviewed 2024-06-28 16:54:58 +00:00
@ -0,0 +136,4 @@
object_nodes_info = json.loads(object_nodes_info)
return len(object_nodes_info["data_objects"]) == total_chunks
@allure.step("Disable Policer all nodes")
Collaborator

on all

`on all`
Poster
Collaborator

done

done
d.zayakin marked this conversation as resolved
d.zayakin force-pushed ec-replication-tests from 84c345005a to 35accb09c4 2024-06-28 16:56:16 +00:00 Compare
d.zayakin force-pushed ec-replication-tests from 35accb09c4 to e188eb74e5 2024-06-28 17:07:06 +00:00 Compare
d.zayakin force-pushed ec-replication-tests from e188eb74e5 to 8c20aa69c1 2024-06-30 10:10:18 +00:00 Compare
abereziny approved these changes 2024-07-01 15:10:05 +00:00
abereziny requested review from qa-committers 2024-07-01 15:10:16 +00:00
anikeev-yadro approved these changes 2024-07-01 15:36:51 +00:00
abereziny merged commit 5d3d22f685 into master 2024-07-01 15:41:23 +00:00
Sign in to join this conversation.
There is no content yet.