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

Add proxyDHCP handler #387

Merged
merged 17 commits into from
Jan 15, 2024
Merged

Conversation

jacobweinstock
Copy link
Member

@jacobweinstock jacobweinstock commented Dec 23, 2023

Description

This add proxyDHCP support/handler. With the addition of a second handler a lot of code was moved around so that it could be used by both handlers.

With ProxyDHCP enabled Smee will respond to PXE enabled DHCP requests from clients and provide them with next boot info when netbooting. To enable this mode set -dhcp-mode=proxy.

Definition:
[A] Proxy DHCP server behaves much like a DHCP server by listening for ordinary DHCP client traffic and responding to certain client requests. However, unlike the DHCP server, the PXE Proxy DHCP server does not administer network addresses, and it only responds to clients that identify themselves as PXE clients. The responses given by the PXE Proxy DHCP server contain the mechanism by which the client locates the boot servers or the network addresses and descriptions of the supported, compatible boot servers." -- IBM

Why is this needed

Fixes: #

How Has This Been Tested?

Manually tested.

How are existing users impacted? What migration steps/scripts do we need?

Checklist:

I have:

  • updated the documentation and/or roadmap (if required)
  • added unit or e2e tests
  • provided instructions on how to upgrade

@jacobweinstock jacobweinstock added the do-not-merge Signal to Mergify to block merging of the PR. label Dec 23, 2023
@Oogy
Copy link

Oogy commented Jan 12, 2024

Have any idea for a timeline getting this in? Would very much like to use - would be happy to help test.

The DHCP library was created in order to
provide a mechanism for the DHCP functionality
to be written in a very clean and composible way.
This was not possible with the previous state of Boots
and the personnel involved at that time.

The current state of Smee is ready for this functionality
to be return and placed in a very clean and composible way
into the code base.

Moving this functionality back in will improve the development
process/experience. It is important to note that we do take on
the trade off of not having the combined commit history of the library
within Smee. The library GitHub repo will still contain history.

Signed-off-by: Jacob Weinstock <[email protected]>
This allows Smee to not have any
IPAM responsibilities, especially
during the network boot process.
This is still a WIP and will be
clean up in subsequent commits.

Signed-off-by: Jacob Weinstock <[email protected]>
Signed-off-by: Jacob Weinstock <[email protected]>
The proxy and reservation handler need
a good amount of the same code.

Signed-off-by: Jacob Weinstock <[email protected]>
Signed-off-by: Jacob Weinstock <[email protected]>
The custom user class was not being set from
the handler but from the request packet.
This was not correct.

Signed-off-by: Jacob Weinstock <[email protected]>
Signed-off-by: Jacob Weinstock <[email protected]>
Signed-off-by: Jacob Weinstock <[email protected]>
Signed-off-by: Jacob Weinstock <[email protected]>
DHCP reservation and proxy can now be
toggled between via cli flag/env var.

Signed-off-by: Jacob Weinstock <[email protected]>
Signed-off-by: Jacob Weinstock <[email protected]>
Signed-off-by: Jacob Weinstock <[email protected]>
@jacobweinstock jacobweinstock removed the do-not-merge Signal to Mergify to block merging of the PR. label Jan 15, 2024
Signed-off-by: Jacob Weinstock <[email protected]>
Signed-off-by: Jacob Weinstock <[email protected]>
Signed-off-by: Jacob Weinstock <[email protected]>
@jacobweinstock
Copy link
Member Author

Have any idea for a timeline getting this in? Would very much like to use - would be happy to help test.

Hey @Oogy. Should land today.

@jacobweinstock jacobweinstock marked this pull request as ready for review January 15, 2024 16:40
Updated the top level readme.

Signed-off-by: Jacob Weinstock <[email protected]>
Signed-off-by: Jacob Weinstock <[email protected]>
@jacobweinstock jacobweinstock added the kind/feature Categorizes issue or PR as related to a new feature. label Jan 15, 2024
@jacobweinstock jacobweinstock merged commit 437581c into tinkerbell:main Jan 15, 2024
3 checks passed
@jacobweinstock jacobweinstock deleted the proxydhcp branch January 15, 2024 18:14
@jacobweinstock jacobweinstock changed the title WIP: Add proxyDHCP handler Add proxyDHCP handler Jan 15, 2024
@jacobweinstock
Copy link
Member Author

Hey @Oogy, Would you mind reporting back here how it went if/when you have some cycles to test?

@Oogy
Copy link

Oogy commented Jan 15, 2024

@jacobweinstock will do 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants