Skip to content

Add TFTP download settings to Foremanctl (SAT-50974) - #1003

Draft
lzap wants to merge 1 commit into
theforeman:masterfrom
lzap:tftp-preflight-39765
Draft

lzap wants to merge 1 commit into
theforeman:masterfrom
lzap:tftp-preflight-39765

Conversation

@lzap

@lzap lzap commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Why are you introducing these changes? (Problem description, related links)

Extend the Smart Proxy TFTP module to fetch and prepare bootloader files in a bootloader-universe directory. The existing /tftp/fetch_boot_file endpoint remains available. The new /tftp/fetch_and_process endpoint accepts direct downloads to exact destinations or an archive plus an extraction map. Downloads and extraction run asynchronously; the supported archive extractors are ISO and TGZ, and the API exposes a readiness check for Foreman PXE setup.

HTTP(S) downloads perform a configurable HEAD preflight before the transfer. It is enabled by default and can be disabled with tftp_http_download_preflight for sources that do not support HEAD. Each curl transfer attempt is limited by tftp_download_max_time, which defaults to 3600 seconds; transient failures are retried up to three times and the timeout applies per attempt. See the Managed Bootloader Universe discussion.

Related issue: Redmine #39765. These settings configure the behavior introduced in Smart Proxy PR #958.

What are the changes introduced in this pull request?

  • Expose --tftp-http-download-preflight (default true) and --tftp-download-max-time (default 3600) as Foremanctl options.
  • Render both values into settings.d/tftp.yml.
  • Update TFTP documentation and verify the generated settings in the TFTP feature test.

How to test this pull request

Steps to reproduce:

  • Deploy the TFTP feature with foremanctl deploy-proxy --add-feature tftp --tftp-http-download-preflight false --tftp-download-max-time 7200.
  • Verify /etc/foreman-proxy/settings.d/tftp.yml contains :tftp_http_download_preflight: false and :tftp_download_max_time: 7200.

The feature test requires a deployed VM and was not run locally.

Checklist

  • Tests added/updated (if applicable)
  • Documentation updated (if applicable)

@coderabbitai

coderabbitai Bot commented Nov 24, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@lzap lzap changed the title Add TFTP preflight option to Foremanctl (SAT-50974) Add TFTP download settings to Foremanctl (SAT-50974) Nov 24, 2026
@lzap
lzap force-pushed the tftp-preflight-39765 branch from e06cc2d to 2ecce07 Compare November 24, 2026 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant