-
Notifications
You must be signed in to change notification settings - Fork 119
Fix handling of CIDR values in warewulf.conf #1700
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
Conversation
1a7e3f3 to
d6d7365
Compare
|
Thanks for taking care of this mess and structuring it. |
It's possible I was over-zealous here. I admit, I kinda just didn't like the way it worked, but that's not a good justification. I'll re-visit and get back to you here with either a restoration or a justification. |
333f591 to
6c9164c
Compare
|
@mslacken I've added server network auto-detection back in. I'm still mixed on it, as the auto-detection wouldn't make it to I think the only way around this would be to persist the configuration back out from its auto-detected state. I don't think we should write warewulf.conf on every invocation; but maybe we could track an internal boolean on WarewulfYaml that is flagged if auto-detection occurs, and then I'll think about that some more, and maybe try to implement it later. But let me know if you have any thoughts about that. |
6c9164c to
c19bcce
Compare
I went ahead and did this, basically as described above. I'm not 100% certain I like just doing it when Let me know what you think. |
|
@anderbubble needing rebase |
- Fixes: warewulf#1541 - Fixes: warewulf#1594 Signed-off-by: Jonathon Anderson <[email protected]>
The previous method broke on ubuntu, where the value of ID was not quoted in `/etc/os-release`. This broke tests that depended on paths set on known OSes. Signed-off-by: Jonathon Anderson <[email protected]>
Signed-off-by: Jonathon Anderson <[email protected]>
c19bcce to
112d5f3
Compare
JasonYangShadow
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, feel free to merge or ask for other members' reviews.
112d5f3 to
73f34d0
Compare
|
@mslacken I'm going to go ahead and merge this, and plan to tag rc2 in the morning; but let me know if you have any concerns. |
Description of the Pull Request (PR):
warewulf.confhas historically used.Ipaddr,.Network, and.Netmasksettings to configure, primarily, the DHCP server. It is also used to configure thewarewulfhostname in/etc/hostson the server and cluster nodes.Later development added support for specifying
.Ipaddras a CIDR-style value, e.g. 192.168.0.1/24. But this made the behavior of.Networkand.Netmaskunpredictable.This PR simplifies the handling of all three fields. They remain strings for now; but if, during
Parse(),.Ipaddris found to be a CIDR-formatted value, the indicated network and netmask are written to the.Networkand.Netmaskconfiguration fields, and.Ipaddris updated to be the bare address. (If either.Networkor.Netmaskis already specified, the specified value takes precedence.)Similar updates have also been made to
.Ipaddr6and.Ipv6Net, though the behavior of.Ipaddr6already required a CIDR address with no conversion, so this behavior has been retained.Helper methods have been added--
.IpCIDR()and.NetworkCIDR()--and their values are now presented to templates. (.NetworkCIDRwas already present in the tstruct, but not populated.)Finally, this PR removes a requirements that
.Ipaddr6represent a/64or smaller subnet.This fixes or addresses the following GitHub issues:
Reviewer checklist
The reviewer checks the following items before merging the PR.
git commit --signoff) in agreement to the DCO