Setting of 99-disable-network-config.cfg is ignored

Bug #1845675 reported by Matthew Johnston
6
This bug affects 1 person
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/cloud.cfg.d/99-disable-network-config.cfg
network: {config: disabled}

Requiring /etc/cloud/cloud.cfg.d/50-curtin-networking.cfg
to be edited.
# cat 50-curtin-networking.cfg
network:
  ethernets:
    eno1:
      dhcp4: false
  version: 2

----------------------------------------
ip a
eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    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/01-netcfg.yaml
# 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/50-cloud-init.yaml
# 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/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
    ethernets:
        eno1:
            dhcp4: false
    version: 2

==========================================

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: cloud-init 19.2-24-ge7881d5c-0ubuntu1~18.04.1
ProcVersionSignature: Ubuntu 4.15.0-64.73-generic 4.15.18
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)
PackageArchitecture: all
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)

Revision history for this message
Matthew Johnston (o2kewl) wrote :
Revision history for this message
Dan Watkins (oddbloke) wrote :

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

Changed in cloud-init (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for cloud-init (Ubuntu) because there has been no activity for 60 days.]

Changed in cloud-init (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.