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

New dhcp lib #326

Closed
wants to merge 20 commits into from
Closed

Conversation

jacobweinstock
Copy link
Member

@jacobweinstock jacobweinstock commented Apr 3, 2023

Description

Why is this needed

Fixes: #266
Fixes: #195

How Has This Been 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 Apr 3, 2023
@codecov
Copy link

codecov bot commented Apr 3, 2023

Codecov Report

Merging #326 (12ef024) into main (6f22d28) will increase coverage by 50%.
The diff coverage is 63%.

❗ Current head 12ef024 differs from pull request most recent head 6369cfc. Consider uploading reports for the commit 6369cfc to get more accurate results

@@         Coverage Diff          @@
##           main   #326    +/-   ##
====================================
+ Coverage    18%    68%   +50%     
====================================
  Files        17      5    -12     
  Lines      1073    229   -844     
====================================
- Hits        197    157    -40     
+ Misses      862     58   -804     
  Partials     14     14            
Impacted Files Coverage Δ
http/ipxe/ipxe.go 100% <ø> (ø)
http/http.go 55% <45%> (ø)
http/middleware.go 75% <61%> (ø)
http/xff.go 71% <71%> (ø)
http/ipxe/auto.go 71% <75%> (ø)

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Signed-off-by: Jacob Weinstock <[email protected]>
The dhcp4-go and pkg libraries are old and
unmaintained. Code is refactored and organized
around 4 functions.

1. iPXE binary serving (tftp and http)
2. iPXE script serving (http)
3. dhcp service (udp)
4. syslog service (udp)

Signed-off-by: Jacob Weinstock <[email protected]>
We are only serving the auto.ipxe at / so
it is now explicitly being served at /auto.ipxe.
This enables iPXE binaries to be served at / and
we can entirely remove the prefix.

Also, added the ability to disable syslog and dhcp
services.

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]>
New version removes the use of netaddr library.
netaddr is deprecated and causes issues.

Signed-off-by: Jacob Weinstock <[email protected]>
Use github.com/tinkerbell/dhcp backends.

Signed-off-by: Jacob Weinstock <[email protected]>
Also, add some ipxe script tests.

Signed-off-by: Jacob Weinstock <[email protected]>
Signed-off-by: Jacob Weinstock <[email protected]>
Upgrade dependencies. Remove pkg/errors dep
as the repo has been archived.

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]>
Signed-off-by: Jacob Weinstock <[email protected]>
@jacobweinstock jacobweinstock force-pushed the new-dhcp-lib branch 4 times, most recently from 8d04de7 to 3adc07c Compare April 5, 2023 16:12
The default size of /run/user/1001 is about 1.4G.
Boots needs more. I don't why Boots needs more
than this. Will investigate. This workarounds the
failed builds for now.

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]>
Signed-off-by: Jacob Weinstock <[email protected]>
@jacobweinstock
Copy link
Member Author

redundant with #337

@jacobweinstock jacobweinstock deleted the new-dhcp-lib branch August 5, 2023 04:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge Signal to Mergify to block merging of the PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consolidate data model selection, add supporting flags for env vars. misbehaving DHCP client can crash boots
1 participant