Setting of 99-disable-network-config.cfg is ignored
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init (Ubuntu) |
Expired
|
Undecided
|
Unassigned |
Bug Description
Trying to configure a static IP after an initial install using DHCP fails. DHCP is still queried and applied.
The following value is ignored:
# cat /etc/cloud/
network: {config: disabled}
Requiring /etc/cloud/
to be edited.
# cat 50-curtin-
network:
ethernets:
eno1:
dhcp4: false
version: 2
-------
ip a
eno1: <BROADCAST,
link/ether fc:aa:14:98:bf:60 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.124/24 brd 192.168.0.255 scope global eno1
valid_lft forever preferred_lft forever
inet 192.168.0.121/24 brd 192.168.0.255 scope global secondary dynamic eno1
valid_lft 86170sec preferred_lft 86170sec
-------
# cat /etc/netplan/
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
version: 2
renderer: networkd
ethernets:
eno1:
dhcp4: no
dhcp6: no
addresses: [192.168.0.124/24]
gateway4: 192.168.0.1
nameservers:
addresses: [192.168.0.3]
=======
# cat /etc/netplan/
# This file is generated from information provided by
# the datasource. Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/
# network: {config: disabled}
network:
ethernets:
eno1:
dhcp4: false
version: 2
=======
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: cloud-init 19.2-24-
ProcVersionSign
Uname: Linux 4.15.0-64-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.7
Architecture: amd64
Date: Fri Sep 27 10:54:23 2019
InstallationDate: Installed on 2019-09-26 (1 days ago)
InstallationMedia: Ubuntu-Server 18.04.3 LTS "Bionic Beaver" - Release amd64 (20190805)
PackageArchitec
ProcEnviron:
LANG=en_US.UTF-8
SHELL=/bin/bash
TERM=xterm
PATH=(custom, no user)
SourcePackage: cloud-init
UpgradeStatus: No upgrade log present (probably fresh install)
Hi Matthew,
Thanks for using Ubuntu, and for filing this bug! Reading through the logs, it looks to me like cloud-init only wrote out 50-cloud-init.yaml once, before the disable file had been written to the disk. cloud-init won't _remove_ 50-cloud-init.yaml if its networking support is disabled (because it is possible that the configuration in that file _is_ necessary for the user to gain access to the system, we leave it entirely to the user to handle removing/ reconfiguring it). Did you see the file get recreated after the disable file was put in place? Does just removing it solve your problem?
(Once you've answered those questions, please move the bug status back to New.)
Thanks again!
Dan