Project

General

Profile

Bug #5153

Foreman-proxy fails silently when medium_id is not supplied

Added by Stefan c over 5 years ago. Updated over 3 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

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.

Specs:
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.


Related issues

Is duplicate of Foreman - Bug #6229: validate installation media exists for new host if pxe_buildClosed2014-06-16

History

#1 Updated by Lukas Zapletal over 5 years ago

  • Project changed from Foreman to Smart Proxy
  • Category changed from API to TFTP

Thanks for reporting this.

#2 Updated by Dmitri Dolguikh over 3 years ago

  • Project changed from Smart Proxy to Foreman
  • Category deleted (TFTP)

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 3 years ago

  • Is duplicate of Bug #6229: validate installation media exists for new host if pxe_build added

#4 Updated by Dominic Cleal over 3 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.

Also available in: Atom PDF