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: placement group logic redone, including a compatibility mode in … #1217

Merged
merged 1 commit into from
Feb 22, 2024

Conversation

valkenburg-prevue-ch
Copy link
Contributor

…order to keep existing clusters compatible with the new logic.

Fixes #1157 .

…order to keep existing clusters compatible with the new logic.
@mysticaltech
Copy link
Collaborator

@valkenburg-prevue-ch will test this tonight. So grateful about this 🙏🙏 💙

Copy link
Collaborator

@mysticaltech mysticaltech left a comment

Choose a reason for hiding this comment

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

@valkenburg-prevue-ch Super elegant man! Well done.

Just one clarification I would like to make, and asking your opinion here, we have those limitations in Hetzner:

In Hetzner Cloud, you can have up to 100 servers per network, up to 50 subnets per project, and each Placement Group can contain up to 10 servers, with a maximum of 50 Placement Groups per project.

Hence, it's pretty fast to reach the limit of max 10 servers per group. Shouldn't we:

  1. Enforce a check on the count. I think it's not done now.
  2. Impose one uniquely named placement group per nodepool.

What do you think?

Copy link
Member

@aleksasiriski aleksasiriski left a comment

Choose a reason for hiding this comment

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

Do we really need the compatibility mode? The code seems quite cluttered with it, and I don't see a real benefit.. upgrading the version of module would only result in a different arrangement of nodes via placement groups but nothing breaking would actually happen?

I'm fine with merging this and removing the compat_idx in v3 if we want to be proper semver.

@valkenburg-prevue-ch
Copy link
Contributor Author

Yeah, this is exactly what I was hoping, that we only keep the extra compatibility for a limited period, and certainly drop it for v3. I thought that not having it, would lead Terraform to replace nodes, because of the changing placement groups. But Perhaps I'm wrong there?

@aleksasiriski
Copy link
Member

Yeah, this is exactly what I was hoping, that we only keep the extra compatibility for a limited period, and certainly drop it for v3. I thought that not having it, would lead Terraform to replace nodes, because of the changing placement groups. But Perhaps I'm wrong there?

I think they won't be replaced, I'll try it on my cluster now to see what really happens.

@mysticaltech
Copy link
Collaborator

In light of #1218 that will come with v3, I think we are good to go. The Hetzner system will give an error if more than 10 nodes are used, it's good enough for now, not a lot of folks use that many nodes. And will add it to the readme. This is an important fix for this major version.

@mysticaltech mysticaltech merged commit b264b72 into master Feb 22, 2024
3 checks passed
@mysticaltech mysticaltech deleted the fix/placement-groups branch February 22, 2024 00:30
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.

Placement group contains already 10 servers
3 participants