Skip to content

Commit

Permalink
refactor(negative): Power off volume node of statefulset * for * mins
Browse files Browse the repository at this point in the history
ref: 7034

Signed-off-by: Chin-Ya Huang <[email protected]>
  • Loading branch information
c3y1huang committed Nov 27, 2023
1 parent f7c59a3 commit 40fb6da
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
5 changes: 0 additions & 5 deletions e2e/keywords/node.resource
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ Power off node ${idx} for ${power_off_time_in_min} mins
Power off all worker nodes for ${power_off_time_in_min} mins
reboot_all_worker_nodes ${power_off_time_in_min}

Power off volume node of statefulset ${idx} for ${power_off_time_in_min} mins
${volume_name} = get_workload_volume_name ${statefulset_list}[${idx}]
${node_name} = get_replica_node_attached_to_volume ${volume_name}
reboot_node_by_name ${node_name} ${power_off_time_in_min}

Wait for longhorn ready
wait_for_all_instance_manager_running
wait_for_workload_pods_stable deployment
Expand Down
3 changes: 3 additions & 0 deletions e2e/keywords/workload.resource
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ Library ../libs/keywords/workload_keywords.py
Keep writing data to pod of ${workload_kind} ${workload_name}
keep_writing_workload_pod_data ${workload_kind} ${workload_name}

Power off volume node of ${workload_kind} ${workload_name} for ${duration} minutes
reboot_workload_volume_node ${workload_name} ${duration}

Reboot volume node of ${workload_kind} ${workload_name}
reboot_workload_volume_node ${workload_name}

Expand Down
4 changes: 2 additions & 2 deletions e2e/libs/keywords/node_keywords.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ def reboot_all_worker_nodes(self, power_off_time_in_min=1):
def reboot_all_nodes(self):
self.node.reboot_all_nodes()

def reboot_node_by_name(self, node_name, power_off_time_in_min=1):
self.node.reboot_node(node_name, int(power_off_time_in_min) * 60)
def reboot_node_by_name(self, node_name, downtime_in_min=1):
self.node.reboot_node(node_name, int(downtime_in_min) * 60)

def wait_for_all_instance_manager_running(self):
wait_for_all_instance_manager_running()
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/node_reboot.robot
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ Power Off Volume Node For More Than Pod Eviction Timeout While Workload Heavy Wr
FOR ${i} IN RANGE ${LOOP_COUNT}
And Keep writing data to pod of statefulset sts-0

When Power off volume node of statefulset 0 for 6 mins
When Power off volume node of statefulset sts-0 for 6 minutes
And Wait for volume of statefulset sts-0 healthy
And Wait for statefulset sts-0 stable

Expand Down

0 comments on commit 40fb6da

Please sign in to comment.