Foreman-proxy fails silently when medium_id is not supplied
Description of issue:
When using the foreman api v1 to create a host, and ommiting the medium_id, theforeman proxy fails immediatly and silenty without logging in proxy.log that I haven't told it about a medium_id.
Foreman 1.4.2 installed via foreman puppet modules
centos 6.4 x64
Foreman-proxy: DHCP and TFTP enabled, everything else disabled ( proxy installed via puppet modules )
How to reproduce:
- install foreman 1.4.2
- install foreman-proxy and enable just DHCP and TFTP
- create a new host via the API and don't supply the medium_id, supply just these parameters(adjusting the values for your setup):
architecture_id: 1, operatingsystem_id: '1', enabled: true, build: true, domain_id: 1, environment_id: '1', ptable_id: 6, subnet_id: 1
Output of logs:
- from foreman
- from foreman-proxy
- output via HTTP body from the API
you'll find all 3 in this gist https://gist.github.com/stefancocora/10369030
After ohadlevy advised over irc to add medium_id the TFTP build process started and completed successfuly.
#1 Updated by Lukas Zapletal about 9 years ago
- Project changed from Foreman to Smart Proxy
- Category changed from API to TFTP
Thanks for reporting this.
#2 Updated by Anonymous over 7 years ago
- Project changed from Smart Proxy to Foreman
- Category deleted (
This looks like an issue in Foreman either api parameter validation, or orchestration (https://github.com/theforeman/foreman/blob/develop/app/models/concerns/orchestration/tftp.rb#L76).
#3 Updated by Dominic Cleal over 7 years ago
- Is duplicate of Bug #6229: validate installation media exists for new host if pxe_build added
#4 Updated by Dominic Cleal over 7 years ago
- Status changed from New to Duplicate
This should have been fixed in Foreman 1.6 or higher via #6229. If not, please re-open. Thanks for the report.