← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1746361] Re: AttributeError: 'NoneType' object has no attribute 'version'

 

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

** Changed in: cloud-init
       Status: Incomplete => Expired

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1746361

Title:
  AttributeError: 'NoneType' object has no attribute 'version'

Status in cloud-init:
  Expired

Bug description:
  When deploying LXD containers using Juju and MAAS, the LXD containers
  launch with no network connectivity because cloud-init fails with the
  following stack trace:

  Cloud-init v. 17.1 running 'init-local' at Tue, 30 Jan 2018 22:12:46 +0000. Up 1.00 seconds.
  2018-01-30 22:12:47,040 - util.py[WARNING]: failed stage init-local
  failed run of stage init-local
  ------------------------------------------------------------
  Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/cloudinit/cmd/main.py", line 638, in status_wrapper
      ret = functor(name, args)
    File "/usr/lib/python3/dist-packages/cloudinit/cmd/main.py", line 357, in main_init
      init.apply_network_config(bring_up=bool(mode != sources.DSMODE_LOCAL))
    File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 654, in apply_network_config
      return self.distro.apply_network_config(netcfg, bring_up=bring_up)
    File "/usr/lib/python3/dist-packages/cloudinit/distros/__init__.py", line 170, in apply_network_config
      dev_names = self._write_network_config(netconfig)
    File "/usr/lib/python3/dist-packages/cloudinit/distros/debian.py", line 119, in _write_network_config
      return self._supported_write_network_config(netconfig)
    File "/usr/lib/python3/dist-packages/cloudinit/distros/__init__.py", line 86, in _supported_write_network_config
      renderer.render_network_config(network_config=network_config)
    File "/usr/lib/python3/dist-packages/cloudinit/net/renderer.py", line 53, in render_network_config
      network_state=parse_net_config_data(network_config), target=target)
    File "/usr/lib/python3/dist-packages/cloudinit/net/netplan.py", line 193, in render_network_state
      content = self._render_content(network_state)
    File "/usr/lib/python3/dist-packages/cloudinit/net/netplan.py", line 227, in _render_content
      if network_state.version == 2:
  AttributeError: 'NoneType' object has no attribute 'version'
  ------------------------------------------------------------
  No /sbin/ifup, assuming that it's a netplan system.
  Cloud-init v. 17.1 running 'init' at Tue, 30 Jan 2018 22:12:48 +0000. Up 2.00 seconds.
  ci-info: +++++++++++++++++++++++++++Net device info+++++++++++++++++++++++++++
  ci-info: +--------+------+-----------+-----------+-------+-------------------+
  ci-info: | Device |  Up  |  Address  |    Mask   | Scope |     Hw-Address    |
  ci-info: +--------+------+-----------+-----------+-------+-------------------+
  ci-info: | eth0:  | True |     .     |     .     |   .   | 00:16:3e:8e:77:d5 |
  ci-info: | eth0:  | True |     .     |     .     |   d   | 00:16:3e:8e:77:d5 |
  ci-info: |  lo:   | True | 127.0.0.1 | 255.0.0.0 |   .   |         .         |
  ci-info: |  lo:   | True |     .     |     .     |   d   |         .         |
  ci-info: +--------+------+-----------+-----------+-------+-------------------+

  This problem only seems to affect Juju and MAAS when deploying LXD
  containers on Ubuntu 17.10 systems (which use Netplan) but not on
  16.04.03 LTS systems.

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


References