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 mac assignment in host add if provided a network. #305

Merged

Conversation

terjekv
Copy link
Collaborator

@terjekv terjekv commented Oct 8, 2024

  • Now properly distinguishes between networks and ips in every case.
  • Also handles the issue where using host add with an existing mac address caused a partial creation. The host was created, but the mac wasn't assigned as it was in used and not forced. This now fails early, although there is still a race condition as someone else may have allocated same address between our commands. There is currently no easy fix for this issue.

Fixes #304

  - Now properly distinguishes between networks and ips in every case.
  - Also handles the issue where using `host add` with an existing mac address caused a partial creation. The host was created, but the mac wasn't assigned as it was in used and not forced. This now fails early, although there is still a race condition as someone else may have allocated same address between our commands. There is currently no easy fix for this issue.

Fixes #304
@terjekv terjekv self-assigned this Oct 8, 2024
Copy link
Member

@pederhan pederhan left a comment

Choose a reason for hiding this comment

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

LGTM

@terjekv terjekv merged commit 0575dd6 into master Oct 9, 2024
8 checks passed
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.

Adding a host to a network with a mac address fails.
2 participants