sysconfig renders vlan with TYPE=Ethernet

Bug #1788915 reported by Dan Cripe on 2018-08-24
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Medium
Unassigned

Bug Description

Distribution: Fedora 28
Cloud provider: None
Network content of /etc/cloud/cloud.cfg.d/99_datasource.cfg (omitting users, etc.):
network:
  version: 1
  config:
    - type: physical
      name: lan1
      mac_address: 0c:c4:7a:db:dc:b0
    - type: vlan
      name: lan1.100
      vlan_link: lan1
      vlan_id: 100
      subnets:
        - type: static
          address: 192.168.0.2/24
          gateway: 192.168.0.1
          dns_nameservers:
            - 8.8.8.8
            - 8.8.4.4
    - type: vlan
      name: lan1.3900
      vlan_link: lan1
      vlan_id: 3900
      subnets:
        - type: static
          address: 10.1.0.2/16
          gateway:

I am unable to attach logs (no network connection).

$ cloud-init --version
/usr/bin/cloud-init 17.1

The sysconfig renderer leaves the configured "kind" set to the default (ethernet), which results in a config file with "TYPE=Ethernet", which is incorrect and results in the VLAN interface not being created.

$ cat ifcfg-lan1.100
# Created by cloud-init on instance boot automatically, do not edit.
#
BOOTPROTO=none
DEFROUTE=yes
DEVICE=lan1.100
GATEWAY=192.168.0.1
IPADDR=192.168.0.2
NETMASK=255.255.255.0
ONBOOT=yes
PHYSDEV=lan1
TYPE=Ethernet
USERCTL=no
VLAN=yes

$ ifup lan1.100
Error: Connection activation failed: No suitable device found for this connection.

Removing the offending "TYPE=Ethernet" line from the config file resolves the problem (as does changing it to "TYPE=Vlan").

I altered my configuration to use version 2 of the network configuration data with identical results (problem is in renderer).

Related branches

Scott Moser (smoser) on 2018-08-28
Changed in cloud-init:
status: New → Confirmed
importance: Undecided → Medium
status: Confirmed → Triaged
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers