Project

General

Profile

Actions

Bug #6833

closed

PXE default menu doesn't honour unattended_url setting

Added by Dominic Cleal over 9 years ago. Updated over 9 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Unattended installations
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1124386
Description of problem:
When usng the API to create a default PXE menu, from the server itself - the URL points at localhost

Version-Release number of selected component (if applicable):

How reproducible100%

Steps to Reproduce:
1. Log onto the Satellite via ssh
2. Call the API to set the Default PXE menu (curl -K /opt/hoici/etc/curl-hoici.conf -XGET --data-urlencode per_page=9999 https://localhost/api/v2/config_templates/build_pxe_default)
3. cat /var/lib/tftpboot/pxelinux.cfg/default

Actual results:

DEFAULT menu

PROMPT 0

MENU TITLE PXE Menu

TIMEOUT 200

TOTALTIMEOUT 6000

ONTIMEOUT local

LABEL local

MENU LABEL (local)
MENU DEFAULT
LOCALBOOT 0

LABEL HOI-6.5.0-ci-Library - crash/IPS-Satellite6

kernel boot/RedHat-6.5-x86_64-vmlinuz
append initrd=boot/RedHat-6.5-x86_64-initrd.img ks=https://localhost/unattended/template/HOI-6.5.0-ci-Library/IPS-Satellite6 ksdevice=bootif network kssendmac
ipappend 2

Expected results:
The kickstart should contain the hostname of the tftp capsule

Additional info:
Below is a posible fix copied from the host_template_helpers.rb

/usr/share/foreman/app/controllers/api/v2/config_templates_controller.rb line 90

def default_template_url template, hostgroup
  # Get basic stuff
config = URI.parse(Setting[:unattended_url])
protocol = config.scheme || 'http'
port = config.port || request.port
host = config.host || request.host
url_for :only_path => false, :action => :template, :controller => '/unattended',
:protocol => protocol, :host => host, :port => port,
:id => template.name, :hostgroup => hostgroup.name
End

Related issues 1 (0 open1 closed)

Is duplicate of Foreman - Bug #4463: Default profiles templates default to https:// connection for kickstartClosedStephen Benjamin02/26/2014Actions
Actions #1

Updated by Dominic Cleal over 9 years ago

  • Category set to Unattended installations
  • Assignee deleted (Dominic Cleal)
Actions #2

Updated by Dominic Cleal over 9 years ago

  • Is duplicate of Bug #4463: Default profiles templates default to https:// connection for kickstart added
Actions #3

Updated by Dominic Cleal over 9 years ago

  • Status changed from New to Duplicate

Actually, #4463 adequately covers this.

Actions

Also available in: Atom PDF