Project

General

Profile

Actions

Bug #5153

closed

Foreman-proxy fails silently when medium_id is not supplied

Added by Stefan c about 10 years ago. Updated about 8 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
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 1 (0 open1 closed)

Is duplicate of Foreman - Bug #6229: validate installation media exists for new host if pxe_buildClosedJoseph Magen06/16/2014Actions
Actions #1

Updated by Lukas Zapletal about 10 years ago

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

Thanks for reporting this.

Actions #2

Updated by Anonymous about 8 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).

Actions #3

Updated by Dominic Cleal about 8 years ago

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

Updated by Dominic Cleal about 8 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.

Actions

Also available in: Atom PDF