2

I'm trying to deploy a 'Fedora-AtomicHost-29-20190219' image (qcow2) using 'NoCloud' to provide userdata, hostname and network settings (non dhcp). Configuring Userdata and hostname succeeds configuring network fails.

The log tells my provided data is read correctly by cloud-init but there seems to be no renderer available on the system:

2019-02-26 11:33:44,805 - stages.py[INFO]: Applying network configuration from ds bringup=False: {'version': 2, 'ethernets': {'net1': {'match': {'macaddress': '52:54:00:ab:cd:ef'}, 'dhcp4': False, 'dhcp6': False, 'addresses': ['192.168.42.100/24', '2001:db8::100/32'], 'gateway4': '192.168.42.1', 'gateway6': '2001:db8::1', 'nameservers': {'search': ['example.com'], 'addresses': ['192.168.42.53', '1.1.1.1']}}, 'net0': {'match': {'macaddress': '52:54:00:59:e0:78'}, 'dhcp4': False, 'dhcp6': False, 'addresses': ['10.170.64.95/24'], 'routes': [{'to': '10.170.0.0/16', 'via': '10.170.64.1'}, {'to': '10.270.0.0/16', 'via': '10.170.64.1', 'metric': 100}]}}}
2019-02-26 11:33:44,806 - stages.py[ERROR]: Unable to render networking. Network config is likely broken: No available network renderers found. Searched through list: ['eni', 'sysconfig', 'netplan']

The installed version of cloud-init on this image is 17.1. NetworkManager is running on machine, systemd-networkd is also installed, but disabled by systemd.

The provided configuration works on ubuntu-18.10 images.

Has someone a idea what I'm doing wrong?

Many thanks.

kstieger
  • 109
  • 1
  • 4

1 Answers1

0

I used to setup network stuff in meta-data file, and the rest in user-data.

file: meta-data

instance-id: demo01
local-hostname: demo01
network-interfaces: |
  iface eth0 inet static
  address 192.168.56.106
  network 192.168.56.0
  netmask 255.255.255.0
  broadcast 192.168.56.255
  gateway 192.168.56.254

file: user-data

#cloud-config
ssh_pwauth: True
...
  • Thanks. Yes, I also read about this way to configure. But, I like the 'generic' way of the newer configuration. Sometimes you don't know if the network interface name is 'eth0', 'ens3' or 'enps2s0'. I think it depends on the system which is used. The yaml style configuration has a feature to match the interface by macaddress and rename it. Thanks for reply, if this is the only working way I'll take this. – kstieger Feb 26 '19 at 19:06
  • If possible, I suggest to opt for eth0 on all cloud images, as seen on centos builder [CentOS-7-x86_64-GenericCloud-201606-r1.ks](https://github.com/CentOS/sig-cloud-instance-build/blob/master/cloudimg/CentOS-7-x86_64-GenericCloud-201606-r1.ks#L65). For custom image builder, append `net.ifnames=0` to force 'eth0' naming – Christophe Morio Feb 27 '19 at 08:16
  • I agree, meanwhile I fixed it like you proposed. But, it's just a workaround. I hoped there would be a more _generic_ solution. Thanks a lot. – kstieger Feb 27 '19 at 14:01