Skip to content

Fixes #39550 - Add vendor_data template kind - #11115

Open
sbernhard wants to merge 1 commit into
theforeman:developfrom
ATIX-AG:fixes_39550
Open

Fixes #39550 - Add vendor_data template kind#11115
sbernhard wants to merge 1 commit into
theforeman:developfrom
ATIX-AG:fixes_39550

Conversation

@sbernhard

Copy link
Copy Markdown
Contributor

Add a new vendor_data TemplateKind alongside a dedicated /userdata/:mac/vendor-data endpoint to serve vendor-data during image-based provisioning.

Unlike user-data, vendor-data is optional: if no template is configured for the host's OS, the endpoint returns an empty response instead of 404.

Add a new vendor_data TemplateKind alongside a dedicated
/userdata/:mac/vendor-data endpoint to serve vendor-data during
image-based provisioning.

Unlike user-data, vendor-data is optional: if no template is
configured for the host's OS, the endpoint returns an empty response
instead of 404.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sbernhard

Copy link
Copy Markdown
Contributor Author

Initial request was, to fix issues like:
https://community.theforeman.org/t/ubuntu-22-04-uefi-booting-not-working/32924/22
https://community.theforeman.org/t/vendor-data-missing/31729
https://community.theforeman.org/t/foreman-3-3-and-ubuntu-22-04/32451/2

It would also be possible, to add a route which would simply return nothing and maybe log the request - but, this would not be very helpful. Then I thought, it might be helpful to have the possbility to have real vendor-data templates and add additional scripts here. So, here it is :)

@sbernhard
sbernhard requested a review from ShimShtein July 27, 2026 18:16
@stejskalleos stejskalleos self-assigned this Aug 5, 2026
@stejskalleos
stejskalleos self-requested a review August 5, 2026 06:39
- Ubuntu
description: |
This template is served as vendor-data during image based provisioning alongside the user-data
template. It contains Foreman-specific configuration that is the responsibility of Foreman as

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This description does not reflect the content of the template.

Right now there is only echo, and that's all. IMO, we should add stuff similar to other default templates, like in cloud_init default or user data default.

description: |
This template is served as vendor-data during image based provisioning alongside the user-data
template. It contains Foreman-specific configuration that is the responsibility of Foreman as
the infrastructure vendor: notifying Foreman when the host is built.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

notifying Foreman when the host is built.

That's not true with the current content.

"finish" => N_("Post-install script for preseed-based or cloud instance. Connection is made via SSH, credentials or key must exist and inventory IP address must match. Only used when 'user data' is not set."),
"script" => N_("An arbitrary script, must be manually downloaded using wget/curl."),
"user_data" => N_("Template with seed data for virtual or cloud instances when 'user data' flag is set, typically cloud-init or ignition format."),
"vendor_data" => N_("Template with vendor data for virtual or cloud instances, typically cloud-init format."),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the benefit of adding a new kind that's (in my eyes) very similar to or almost the same as user data and cloud-init?

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.

2 participants