netdev_pformat does not show unconfigured devices

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

Bug Description

The changes in commit 6d48d265a05 made netdevinfo.netdev_pformat() stop
showing information about network devices that do not have an address.

see below:

$ git checkout --quiet 6d48d265a05^
$ git rev-parse HEAD
4c573d0e0173d2b1e99a383c54a0a6c957aa1cbb
$ python3 -c 'from cloudinit import netinfo; print(netinfo.netdev_pformat())'
+++++++++++++++++++++++++++Net device info++++++++++++++++++++++++++++
+--------+-------+-----------+-----------+-------+-------------------+
| Device | Up | Address | Mask | Scope | Hw-Address |
+--------+-------+-----------+-----------+-------+-------------------+
| eth0: | False | . | . | . | 00:16:3e:de:51:a6 |
| lo: | True | 127.0.0.1 | 255.0.0.0 | . | . |
| lo: | True | . | . | d | . |
+--------+-------+-----------+-----------+-------+-------------------+
$ git checkout --quiet master master
error: pathspec 'master' did not match any file(s) known to git.
$ git checkout --quiet master
$ git rev-parse HEAD
4ed164592fe8cb15758cacf3cb3f8c7d5ab7c82e
$ python3 -c 'from cloudinit import netinfo; print(netinfo.netdev_pformat())'
+++++++++++++++++++++++Net device info++++++++++++++++++++++++
+--------+------+-----------+-----------+-------+------------+
| Device | Up | Address | Mask | Scope | Hw-Address |
+--------+------+-----------+-----------+-------+------------+
| lo | True | 127.0.0.1 | 255.0.0.0 | host | . |
| lo | True | ::1/128 | . | host | . |
+--------+------+-----------+-----------+-------+------------+

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: cloud-init 18.2-14-g6d48d265-0ubuntu1 [modified: usr/lib/python3/dist-packages/cloudinit/netinfo.py]
ProcVersionSignature: Ubuntu 4.15.0-13.14-generic 4.15.10
Uname: Linux 4.15.0-13-generic x86_64
ApportVersion: 2.20.9-0ubuntu5
Architecture: amd64
CloudName: LXD
Date: Mon Apr 23 16:39:48 2018
PackageArchitecture: all
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 LANG=C.UTF-8
SourcePackage: cloud-init
UpgradeStatus: No upgrade log present (probably fresh install)
user_data.txt:
 #cloud-config
 {}

Related branches

Revision history for this message
Scott Moser (smoser) wrote :
Scott Moser (smoser)
Changed in cloud-init (Ubuntu):
status: New → Confirmed
importance: Undecided → Low
importance: Low → Medium
assignee: nobody → Scott Moser (smoser)
Revision history for this message
Chad Smith (chad.smith) wrote :

An upstream commit landed for this bug.

To view that commit see the following URL:
https://git.launchpad.net/cloud-init/commit/?id=14cb4924

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

This bug was fixed in the package cloud-init - 18.2-41-g3b712fce-0ubuntu1

---------------
cloud-init (18.2-41-g3b712fce-0ubuntu1) cosmic; urgency=medium

  * debian/new-upstream-snapshot: Remove script, now maintained elsewhere.
  * New upstream snapshot.
    - tests: do not rely on host /proc/cmdline in test_net.py
      [Lars Kellogg-Stedman] (LP: #1769952)
    - ds-identify: Remove dupe call to is_ds_enabled, improve debug message.
    - SmartOS: fix get_interfaces for nics that do not have addr_assign_type.
    - tests: fix package and ca_cert cloud_tests on bionic (LP: #1769985)
    - ds-identify: make shellcheck 0.4.6 happy with ds-identify.
    - pycodestyle: Fix deprecated string literals, move away from flake8.
    - azure: Add reported ready marker file. [Joshua Chan] (LP: #1765214)
    - tools: Support adding a release suffix through packages/bddeb.
    - FreeBSD: Invoke growfs on ufs filesystems such that it does not prompt.
      [Harm Weites] (LP: #1404745)
    - tools: Re-use the orig tarball in packages/bddeb if it is around.
    - netinfo: fix netdev_pformat when a nic does not have an address
      assigned. (LP: #1766302)
    - collect-logs: add -v flag, write to stderr, limit journal to single
      boot. (LP: #1766335)
    - IBMCloud: Disable config-drive and nocloud only if IBMCloud is enabled.
      (LP: #1766401)
    - Add reporting events and log_time around early source of blocking time

 -- Scott Moser <email address hidden> Fri, 11 May 2018 16:37:02 -0400

Changed in cloud-init (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Scott Moser (smoser) wrote : Fixed in cloud-init version 18.3.

This bug is believed to be fixed in cloud-init in version 18.3. 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.