tinkerbell icon indicating copy to clipboard operation
tinkerbell copied to clipboard

tftp assets from disk + pxelinux.cfg from Hardware

Open rpardini opened this issue 2 months ago • 1 comments

tftp assets from disk + pxelinux.cfg from Hardware

  • tftp: hardware +PXELinux, TFTP getting a Backend
  • smee: tftp: introduce tftp-asset-dir flag (string)
    • if non-empty, should be path (in-pod) from where non-embedded assets can be served out by Smee's TFTP
    • flag: tftp-asset-dir
    • env: TINKERBELL_TFTP_ASSET_DIR
    • helm: deployment.envs.smee.tftpAssetDir
  • smee: tftp: actually serve files from AssetDir if found
  • helm/tinkerbell: bump tftpBlockSize from 512 to 8192
    • vmlinuz and initrd's are much larger than ipxe
  • smee: tftp: stream directly from disk for assets from assetDir
  • smee: tftp: log actual params (blockSize/sizePort/timeout) when starting tftp
  • smee: tftp: EnableTFTPSinglePort: true -> false
  • smee: tftp: introduce tftp-single-port flag (bool, default true)
    • helm: deployment.envs.smee.tftpSinglePort (default true)
    • env: TINKERBELL_TFTP_SINGLE_PORT
  • smee: tftp: serve pxelinux.cfg from Hardware, by MAC or IP

rpardini avatar Nov 15 '25 02:11 rpardini

Codecov Report

:x: Patch coverage is 1.05263% with 94 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 52.24%. Comparing base (844148a) to head (eb1e9e2).

Files with missing lines Patch % Lines
smee/internal/ipxe/binary/tftp.go 0.00% 87 Missing :warning:
smee/smee.go 0.00% 3 Missing :warning:
pkg/backend/kube/smee.go 33.33% 1 Missing and 1 partial :warning:
smee/internal/ipxe/script/ipxe.go 0.00% 2 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #444      +/-   ##
==========================================
- Coverage   52.83%   52.24%   -0.59%     
==========================================
  Files         107      107              
  Lines        7203     7290      +87     
==========================================
+ Hits         3806     3809       +3     
- Misses       3111     3195      +84     
  Partials      286      286              

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Nov 15 '25 02:11 codecov[bot]

Reworked after I split the tftp-single-port flag to a separate PR.

This is not ready yet:

  1. Commit xx has a TODO for the RPi EEPROM netboot stuff (with a serial# prefix) which I'd like to make more generic, and would need input as how to model it in Hardware object.
  2. This is generally just adding a lot of conditionals while trying to appease cyclops et al, while proper "route" support for TFTP would probably be best.

rpardini avatar Dec 17 '25 01:12 rpardini