Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix HA tests for scheduling change #1787

Conversation

ejweber
Copy link
Contributor

@ejweber ejweber commented Feb 28, 2024

Which issue(s) this PR fixes:

longhorn/longhorn#8043

What this PR does / why we need it:

longhorn/longhorn-manager#2650 disallows scheduling a replica to a node, zone, or disk if it already contains a failed replica (unless the appropriate soft anti-affinity setting is enabled). This behavior requires minor changes to a couple of tests.

11. Enable the default disk for the host node.
12. Wait for volume2 becoming Healthy.
13. Verify data content and r/w capability for volume2.
12. Enable the default disk for the host node.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At this point, the purpose of the test is complete. We successfully recognized a failed replica during attaching and (after replica-replenishment-wait-interval) scheduled a new replica to replace it.

Previously, the test relied on replica-node-soft-anti-affinity == false to ensure the new replica could not schedule anywhere until the default disk on the test node was enabled. Once the default disk was enabled, the failed replica did not prevent scheduling to the node.

Now, the failed replica does prevent scheduling to the node. However, we can rely on replica-disk-soft-anti-affinity == false to continue to ensure it does not get scheduled until we enabled the default disk.

Longhorn 8043

Signed-off-by: Eric Weber <eric.weber@suse.com>
@ejweber ejweber force-pushed the 8043-avoid-scheduling-a-second-replica branch from 4bf5ea4 to 00e60eb Compare February 28, 2024 21:04
@ejweber
Copy link
Contributor Author

ejweber commented Mar 4, 2024

With the changes to longhorn/longhorn-manager#2650, we likely do not need this PR. I will keep it open as a draft until that one merges.

@ejweber ejweber closed this Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant