cloud-init does not recognize initramfs provided network config in all cases

Bug #1752391 reported by Scott Moser
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Fix Released
Medium
Unassigned
cloud-init (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Cloud-init relies on the 'ip=' or 'ip6=' parameter to be present in the
kernel command line in order to consider /run/net-*.conf files. Those files
are written by the initramfs indicating that network is was configured.

When 'ip=' or 'ip6=' is found on the command line, cloud-init will consider
that to be "kernel command line provided" network, and renders a network
configuration like:
  # control-manual ens3
  iface ens3 inet dhcp
      broadcast 10.0.3.255
      dns-nameservers 169.254.169.254
      gateway 10.0.3.1

The key there being that it is not marked 'auto'. If cloud-init does
not recognize this, it will render:
  auto ens3
  iface ens3 inet dhcp

There are some iscsi-root where initramfs configures networking
but the ip= parameter is not present. 2 such cases are:
 a.) static config in /etc/iscsi/iscsi.initramfs (copied into the initramfs)
 b.) iBft

If the devices are marked 'auto', then 'networking.service' takes
the device down during shutdown. That causes any filesystem activity
to hang and block shutdown/reboot.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: cloud-init 17.1-46-g7acc9e68-0ubuntu1~16.04.1 [modified: usr/lib/python3/dist-packages/cloudinit/net/cmdline.py usr/lib/python3/dist-packages/cloudinit/sources/helpers/openstack.py]
ProcVersionSignature: Ubuntu 4.4.0-108.131-generic 4.4.98
Uname: Linux 4.4.0-108-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.15
Architecture: amd64
CloudName: OpenStack
Date: Wed Feb 28 18:35:50 2018
PackageArchitecture: all
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: cloud-init
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
Scott Moser (smoser) wrote :
Scott Moser (smoser)
Changed in cloud-init:
status: New → Confirmed
Changed in cloud-init (Ubuntu):
status: New → Confirmed
Changed in cloud-init:
importance: Undecided → Medium
Changed in cloud-init (Ubuntu):
importance: Undecided → Medium
Chad Smith (chad.smith)
Changed in cloud-init:
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 18.1-23-gde34dc7c-0ubuntu1

---------------
cloud-init (18.1-23-gde34dc7c-0ubuntu1) bionic; urgency=medium

  * New upstream snapshot.
    - net: recognize iscsi root cases without ip= on kernel command line.
      (LP: #1752391)
    - tests: fix flakes warning for unused variable
    - tests: patch leaked stderr messages from snap unit tests
    - cc_snap: Add new module to install and configure snapd and snap
      packages.
    - tests: Make pylint happy and fix python2.6 uses of assertRaisesRegex.
    - netplan: render bridge port-priority values (LP: #1735821)

 -- Chad Smith <email address hidden> Fri, 16 Mar 2018 15:48:04 -0600

Changed in cloud-init (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Chad Smith (chad.smith) wrote : Fixed in Cloud-init 18.2

This bug is believed to be fixed in cloud-init in 18.2. If this is still a problem for you, please make a comment and set the state back to New

Thank you.

Changed in cloud-init:
status: Fix Committed → Fix Released
Revision history for this message
James Falcon (falcojr) wrote :
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.