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.
#2 Updated by Dmitri Dolguikh over 3 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).