New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sysconfig renders vlan with TYPE=Ethernet #3225
Comments
Launchpad user Christian Roessner(christian-roessner-net) wrote on 2020-08-26T12:42:35.622248+00:00 I also hit this bug. We have late 2020 and I wonder, why this bug still is open? In current master branch of cloud-init in file: net/sysconfig.py: ... 701 iface_cfg.drop('TYPE') I think, line 701 should be a fix, right? Tested it and it works for me: net.json:network: config:
python3 ./net_convert.py --network-data /root/vm-setup/gitlab.roessner-net.de-network.cfg --kind yaml --output-kind sysconfig -D centos -d target cat target/etc/sysconfig/network-scripts/ifcfg-eth0.100 Created by cloud-init on instance boot automatically, do not edit.BOOTPROTO=none This way, TYPE is removed and all works as expected. Kind regards Christian |
Launchpad user Quique Llorente(quiquell) wrote on 2020-11-05T08:38:08.543383+00:00 Same here with version: 2 networkData ifcfg |
Launchpad user Quique Llorente(quiquell) wrote on 2020-11-05T08:56:37.039417+00:00 I think this is fixed 8439b19 |
Launchpad user Chad Smith(chad.smith) wrote on 2020-11-24T17:58:37.973737+00:00 This bug is believed to be fixed in cloud-init in version 20.4. If this is still a problem for you, please make a comment and set the state back to New Thank you. |
This bug was originally filed in Launchpad as LP: #1788915
Launchpad details
Launchpad user Dan Cripe(dncripe) wrote on 2018-08-24T18:30:02.195683+00:00
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).
The text was updated successfully, but these errors were encountered: