Project

General

Profile

Actions

Bug #11869

open

Wrong URLs generated for pxe templates on smart proxy

Added by Vladimir Stackov over 9 years ago. Updated over 9 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Templates
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Description of problem:
foreman-proxy generating wrong URLs using foreman_url() for pxe* templates.
They are pointing to Foreman, not smart proxy.

Steps to Reproduce:
  1. Add smart proxy with enabled templates plugin;
  2. Create test provision template containing following lines:
    foreman_url: <%= foreman_url %>
    foreman_url('provision'): <%= foreman_url('provision') %>
    
  3. Create test PXELinux template containing following lines:
    foreman_url: <%= foreman_url %>
    foreman_url('provision'): <%= foreman_url('provision') %>
    
  4. Create test host, assign test templates and put it to build mode;
  5. Execute following commands:
    # curl 'http://smartproxy:8000/unattended/provision?token=cd1cb7ba-d642-4cc0-a5dd-f30e15490611' | grep foreman_url
    # curl 'http://smartproxy:8000/unattended/PXELinux?token=cd1cb7ba-d642-4cc0-a5dd-f30e15490611' | grep foreman_url
    

Actual results:

# curl 'http://smartproxy:8000/unattended/provision?token=cd1cb7ba-d642-4cc0-a5dd-f30e15490611' | grep foreman_url
foreman_url: http://smartproxy:8000/unattended/built?token=cd1cb7ba-d642-4cc0-a5dd-f30e15490611
foreman_url('provision'): http://smartproxy:8000/unattended/provision?token=cd1cb7ba-d642-4cc0-a5dd-f30e15490611

# curl 'http://smartproxy:8000/unattended/PXELinux?token=cd1cb7ba-d642-4cc0-a5dd-f30e15490611' | grep foreman_url
foreman_url: http://foremanbox:80/unattended/built?token=cd1cb7ba-d642-4cc0-a5dd-f30e15490611
foreman_url('provision'): http://foremanbox:80/unattended/provision?token=cd1cb7ba-d642-4cc0-a5dd-f30e15490611

Expected results:

# curl 'http://smartproxy:8000/unattended/provision?token=cd1cb7ba-d642-4cc0-a5dd-f30e15490611' | grep foreman_url
foreman_url: http://smartproxy:8000/unattended/built?token=cd1cb7ba-d642-4cc0-a5dd-f30e15490611
foreman_url('provision'): http://smartproxy:8000/unattended/provision?token=cd1cb7ba-d642-4cc0-a5dd-f30e15490611

# curl 'http://smartproxy:8000/unattended/PXELinux?token=cd1cb7ba-d642-4cc0-a5dd-f30e15490611' | grep foreman_url
foreman_url: http://smartproxy:8000/unattended/built?token=cd1cb7ba-d642-4cc0-a5dd-f30e15490611
foreman_url('provision'): http://smartproxy:8000/unattended/provision?token=cd1cb7ba-d642-4cc0-a5dd-f30e15490611

Actions #1

Updated by Anonymous over 9 years ago

  • Project changed from Smart Proxy to Foreman
  • Category deleted (Templates)
Actions #2

Updated by Anonymous over 9 years ago

  • Project changed from Foreman to Templates
Actions #3

Updated by Anonymous over 9 years ago

  • Project changed from Templates to Foreman
Actions #4

Updated by Dominic Cleal over 9 years ago

  • Category set to Templates
Actions

Also available in: Atom PDF