Support the kea-dhcp-server lease file format - #98
Draft
mwindower wants to merge 1 commit into
Draft
Conversation
metal-bmc could only read the lease file of the isc-dhcp-server. Which dhcp server wrote the lease file is now selectable from the outside with METAL_BMC_LEASE_FORMAT (isc or kea), next to the already existing METAL_BMC_LEASE_FILE. The default stays isc, so existing deployments are unaffected. The kea memfile is a csv file whose columns are looked up by name from the header line, because kea appended columns over the versions and does not rewrite the memfile on an upgrade. It is written append-only, so the last entry of an address wins, a valid lifetime of zero means that the lease was removed and only leases in state 0 are handed out to a client. Both parsers follow the same error convention: a malformed file fails the whole parse, an entry that is merely incomplete is logged and skipped. An unknown format is rejected by Config.Validate at startup, the reporter resolves it once in New. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
|
Looks promising, to have a full picture, a kea deployment at least in the mini-lab is required. |
Contributor
Author
|
capms and dell flavor of mini-lab already deploy kea-dhcp but metal-bmc is not used in the mini-lab at all. |
Contributor
Sure, but the migrating the existing isc-dhcp deployments would also help. Maintaining two flavours is time consuming. |
Contributor
Author
|
I'm not sure what the expectations are here:
For both I do not see why metal-bmc should do that. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
metal-bmc could only read the lease file of the isc-dhcp-server. Which dhcp server wrote the lease file is now selectable from the outside with METAL_BMC_LEASE_FORMAT (isc or kea), next to the already existing METAL_BMC_LEASE_FILE. The default stays isc, so existing deployments are unaffected.
The kea memfile is a csv file whose columns are looked up by name from the header line, because kea appended columns over the versions and does not rewrite the memfile on an upgrade. It is written append-only, so the last entry of an address wins, a valid lifetime of zero means that the lease was removed and only leases in state 0 are handed out to a client.
Both parsers follow the same error convention: a malformed file fails the whole parse, an entry that is merely incomplete is logged and skipped.
An unknown format is rejected by Config.Validate at startup, the reporter resolves it once in New.
Used AI-Tools ✨