Project

General

Profile

Actions

Bug #9140

open

Templates proxy doesn't work with OpenStack (and other image-based?) instances

Added by Stephen Benjamin almost 10 years ago. Updated over 9 years ago.

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

Description

If I create an OpenStack instance, you don't select a subnet so Foreman has no way to know to use the Templates proxy on the TFTP server.


Related issues 1 (1 open0 closed)

Blocks Katello - Tracker #8172: Isolate Client Communication through a CapsuleNew

Actions
Actions #1

Updated by Stephen Benjamin almost 10 years ago

  • Related to Tracker #8172: Isolate Client Communication through a Capsule added
Actions #2

Updated by Stephen Benjamin almost 10 years ago

  • Related to deleted (Tracker #8172: Isolate Client Communication through a Capsule)
Actions #3

Updated by Stephen Benjamin almost 10 years ago

  • Blocks Tracker #8172: Isolate Client Communication through a Capsule added
Actions #4

Updated by Stephen Benjamin almost 10 years ago

And in case it's not clear, the finish scripts and user-data both make a foreman_url('built') call. This should be isolated.

Actions #5

Updated by Dominic Cleal almost 10 years ago

Stephen Benjamin wrote:

And in case it's not clear, the finish scripts and user-data both make a foreman_url('built') call. This should be isolated.

finish scripts used for image builds should not call foreman_url for anything (https://github.com/theforeman/community-templates/blob/master/kickstart/finish.erb doesn't), as the finish script is called synchronously from Foreman. Calling foreman_url blindly may cause issues like #9098 ('built' is probably OK). finish scripts used with preseed should call foreman_url, as they're asynchronous.

user-data files/scripts should also call it.

Actions #6

Updated by Ohad Levy over 9 years ago

  • Assignee set to Greg Sutcliffe
Actions #7

Updated by Greg Sutcliffe over 9 years ago

So, we can't use any clever tricks in this case. The usual case (i.e PXE-based installs) is that we have a TFTP proxy we can qury to see if it also has the Template feature, and make use of it if so. In the Openstack case, it's quite possible the host has no proxies assigned (i.e if you're not using DNS or Puppet/PuppetCA).

So, the only solution I can think of is to add a new field to the Operating System partials which is a combobox containing all known Template Proxies (and hide it if template_proxies.size == 0). We'll have to store this in the DB (on the hosts table) so that it's consistent when editing the host. We'll probably want a JS/AJAX call to pre-populate it with the appropriate proxy if a subnet is selected. Once submitted, the renderer(s) will need to use that field instead of the current guesswork around TFTP proxies.

This will have the bonus side-effect of fixing the issue when the TFTP proxy and the Template proxy are not the same entity.

Actions

Also available in: Atom PDF