Project

General

Profile

Actions

Bug #5717

closed

Provisioning template selection issue

Added by Simon Murray almost 10 years ago. Updated almost 10 years ago.

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

Description

Our finish templates looked a bit like this:
Finish Bonded IF [ HostgroupA / production ]
Finish Default

A host I was provisioning was in HostgroupB, so I expected 'Finish Default' to be picked up from the operating system, but instead I got 'Finish Bonded IF'. Not good if they are on difference VLANs :)

What I believe is probably happening is when checking for an environment match it's just picking the first template in production, regardless of whether that environment is for an explicit hostgroup. The pseudo code logic should be (to my mind!):

for_each template
if template.hostgroup hostgroup and template.env env
use template
for_each template
if template.hostgroup hostgroup and ! isset(template.env)
use template
for_each template
if ! isset(template.hostgroup) and template.env env
use template
use os.template

cheers!


Related issues 1 (0 open1 closed)

Is duplicate of Foreman - Bug #4287: Template associations on HG & Env is brokenClosedGreg Sutcliffe02/06/2014Actions
Actions #1

Updated by Dominic Cleal almost 10 years ago

  • Is duplicate of Bug #4287: Template associations on HG & Env is broken added
Actions #2

Updated by Dominic Cleal almost 10 years ago

  • Status changed from New to Duplicate

This has been fixed in Foreman 1.5.0 via #4287, thanks for the report!

Actions

Also available in: Atom PDF