Skip to content

Commit

Permalink
test(robot): add node down during migration test cases
Browse files Browse the repository at this point in the history
Signed-off-by: Yang Chiu <[email protected]>
  • Loading branch information
yangchiu committed Dec 23, 2024
1 parent d318d41 commit e85edb7
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions e2e/tests/negative/live_migration.robot
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,70 @@ Migration Confirmation After Migration Node Down
Then Wait for volume 0 to migrate to node 1
And Wait for volume 0 healthy
And Check volume 0 data is intact

Migration Rollback After Migration Node Down
Given Create volume 0 with migratable=True accessMode=RWX dataEngine=${DATA_ENGINE}
And Attach volume 0 to node 0
And Wait for volume 0 healthy
And Write data to volume 0

And Attach volume 0 to node 1
And Wait for volume 0 migration to be ready

# power off migration node
When Power off node 1
# migration rollback by detaching from the migration node
And Detach volume 0 from node 1

# migration rollback succeed
Then Wait for volume 0 to stay on node 0
And Wait for volume 0 degraded
And Check volume 0 data is intact

Migration Confirmation After Original Node Down
Given Create volume 0 with migratable=True accessMode=RWX dataEngine=${DATA_ENGINE}
And Attach volume 0 to node 0
And Wait for volume 0 healthy
And Write data to volume 0

And Attach volume 0 to node 1
And Wait for volume 0 migration to be ready

# power off original node
When Power off node 0
# migration confirmation by detaching from the original node
And Detach volume 0 from node 0

# migration is stuck until the Kubernetes pod eviction controller decides to
# terminate the instance-manager pod that was running on the original node.
# then Longhorn detaches the volume and cleanly reattaches it to the migration node.
Then Wait for volume 0 to migrate to node 1
And Wait for volume 0 degraded
And Check volume 0 data is intact

Migration Rollback After Original Node Down
Given Create volume 0 with migratable=True accessMode=RWX dataEngine=${DATA_ENGINE}
And Attach volume 0 to node 0
And Wait for volume 0 healthy
And Write data to volume 0

And Attach volume 0 to node 1
And Wait for volume 0 migration to be ready

# power off original node
When Power off node 0
# migration rollback by detaching from the migration node
And Detach volume 0 from node 1

# migration is stuck until the Kubernetes pod eviction controller decides to
# terminate the instance-manager pod that was running on the original node.
# then Longhorn detaches the volume and attempts to cleanly reattach it to the original node,
# but it is stuck in attaching until the node comes back.
Then Check volume 0 kept in attaching

# power on original node
When Power on off nodes

Then Wait for volume 0 to stay on node 0
And Wait for volume 0 healthy
And Check volume 0 data is intact

0 comments on commit e85edb7

Please sign in to comment.