I created another instance and did 'systemctl --no-pager disable scw-
generate-net-config' before installing cloud-init.

2 reboots later and things are still fine.

I think that counts as a workaround but I don't know systemd enough to
decide if someone is wrong here :-/


root@image-builder-scw-amd64:/lib/systemd/system# cat 
/etc/systemd/system/scw-generate-net-config.service
[Unit]
Description=Generate network configuration
Before=networking.service

[Service]
Type=oneshot
ExecStart=/usr/local/sbin/scw-generate-net-config

[Install]
WantedBy=networking.service

root@image-builder-scw-amd64:/lib/systemd/system# cat 
/usr/local/sbin/scw-generate-net-config
#! /bin/bash

find /etc/network/interfaces.d/ -not -name "*.user.cfg" -type f -delete
for iface in $(ls /sys/class/net); do
    # Only configure physical interfaces
    if readlink /sys/class/net/$iface | grep --invert-match --silent 'virtual'; 
then
        echo """# Generated by $(basename $0)
auto $iface
iface $iface inet dhcp
""" > /etc/network/interfaces.d/$iface.cfg
    fi
done

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1775086

Title:
  cloud-init fails to recognize scaleway

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1775086/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to