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

Off-by-one error when setting node bad actors #3787

Open
simonwo opened this issue Apr 12, 2024 · 0 comments
Open

Off-by-one error when setting node bad actors #3787

simonwo opened this issue Apr 12, 2024 · 0 comments
Labels
type/bug Type: Something is not working as expected

Comments

@simonwo
Copy link
Contributor

simonwo commented Apr 12, 2024

When using the --bad-compute-actors or --bad-requester-actors flags on devstack, you always get one more node than requested.

The logic here is a classic off-by-one error:

isBadComputeActor := (stackConfig.NumberOfBadComputeActors > 0) && (i >= computeNodeCount-stackConfig.NumberOfBadComputeActors)
isBadRequesterActor := (stackConfig.NumberOfBadRequesterActors > 0) && (i >= requesterNodeCount-stackConfig.NumberOfBadRequesterActors)

@simonwo simonwo added the type/bug Type: Something is not working as expected label Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Type: Something is not working as expected
Projects
Status: Inbox
Development

No branches or pull requests

1 participant