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: call GatherEnvironmentInfo once in NodeAddToClusterMulti to avoid race condition causing error #1411

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ligfx
Copy link

@ligfx ligfx commented Feb 21, 2024

fixes #1410

When multiple nodes are created, each call to NodeAddToCluster was calling GatherEnvironmentInfo, which was calling EnsureToolsNode() and then deleting the tools node. This causes some type of race condition. The work doesn't need to be done multiple times anyways, so just move it up to NodeAddToClusterMulti and do it once, before kicking off the goroutines.

(Also see #924 and #952 for previous similar issue)

…d race condition causing error

fixes k3d-io#1410

When multiple nodes are created, each call to NodeAddToCluster was calling GatherEnvironmentInfo,
which was calling EnsureToolsNode() and then deleting the tools node. This causes some type of race
condition. The work doesn't need to be done multiple times anyways, so just move it up to
NodeAddToClusterMulti and do it once, before kicking off the goroutines.
@iwilltry42 iwilltry42 force-pushed the fix_1410_node_create_race_condition_tools_node branch from 3b6c866 to 94a14f9 Compare April 9, 2024 15:01
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.

[BUG] removal of container k3d-tools is already in progress when adding nodes with replicas
1 participant