Project

General

Profile

Actions

Bug #33322

open

VLAN tagging on provision interface

Added by Gerald Vogt over 2 years ago. Updated over 2 years ago.

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

Description

I have noticed that the template "Preseed default PXELinux" doesn't work nicely for ubuntu 20.04 lts in our network. It's due to these lines:

  if @host.provision_interface.vlanid.present?
    options << "netcfg/use_vlan=true netcfg/vlan_id=#{@host.provision_interface.vlanid}" 
  end

We have many networks and a network is access tagged on some clients and untagged on others, depending how they are connected to the switch.

However, checking for vlanid.present? means that a vlanid is present, but doesn't check for the virtual flag on the interface. Looking at the interface configuration I think it should check for the virtual flag on the interface and not if the network assigned has a vlanid assigned.

In other words: instead of "@host.provision_interface.vlanid.present?" the condition should be "@host.provision_interface.virtual?" or maybe check for both. Only an interface which has been configured as virtual should use tagging. If it's not configured virtual, it's untagged.

Actions

Also available in: Atom PDF