Project

General

Profile

Bug #12943

VLAN templating only works if specified in the subnet, not in the interface

Added by Ashley Penney over 3 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Templates
Target version:
Difficulty:
Triaged:
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

When adding a new host you get the option of listing the VLAN tag. Unfortunately in the networking templates we see:

<% vlan = virtual && subnet.has_vlanid? -%

Which means that the VLAN id you enter is ignored and VLAN=yes does not get created.

I'm not sure if this is as simple a fix as subnet.has_vlanid? || interface.has_vlanid? but as it's taken me an hour to figure out what's going on I just wanted to mention it.


Related issues

Related to Foreman - Tracker #2409: NetworkingNew

Associated revisions

Revision 88431412 (diff)
Added by Marek Hulán over 3 years ago

Fixes #12943 - interface vlan setting is considered too

History

#1 Updated by Dominic Cleal over 3 years ago

  • Subject changed from VLAN only works if specified in the subnet, not in the interface to VLAN templating only works if specified in the subnet, not in the interface
  • Category set to Templates

#2 Updated by Marek Hulán over 3 years ago

  • Assignee set to Marek Hulán
  • Status changed from New to Assigned

In general, you're right and we should fix the template. A bit simpler workaround without need of changing the template is to set some tag to subnet while we can still override it per interface. One can view the subnet vlanid as a default for all interfaces attached to it.

#3 Updated by Marek Hulán over 3 years ago

#4 Updated by Marek Hulán over 3 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/community-templates/pull/228 added

#5 Updated by Dominic Cleal over 3 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
  • Legacy Backlogs Release (now unused) set to 104

Also available in: Atom PDF