netdev_pformat key error on FreeBSD with 18.3
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
Medium
|
Unassigned |
Bug Description
i am running cloud-init on commit id c42a926ae730994
2018-07-02 11:40:18,158 - util.py[DEBUG]: Cloud-init v. 18.3 running 'init' at Mon, 02 Jul 2018 11:40:18 +0000. Up 20.11459589 seconds.
2018-07-02 11:40:18,159 - main.py[DEBUG]: No kernel command line url found.
2018-07-02 11:40:18,159 - main.py[DEBUG]: Closing stdin.
2018-07-02 11:40:18,172 - util.py[DEBUG]: Writing to /var/log/
2018-07-02 11:40:18,175 - util.py[DEBUG]: Changing the ownership of /var/log/
2018-07-02 11:40:18,175 - util.py[DEBUG]: Running command ['ifconfig', '-a'] with allowed return codes [0, 1] (shell=False, capture=True)
2018-07-02 11:40:18,195 - util.py[WARNING]: failed stage init
2018-07-02 11:40:18,196 - util.py[DEBUG]: failed stage init
Traceback (most recent call last):
File "/usr/local/
ret = functor(name, args)
File "/usr/local/
sys.
File "/usr/local/
netdev_lines = netdev_
File "/usr/local/
(dev, data["up"], addr["ip"], empty, addr["scope6"],
KeyError: 'scope6'
2018-07-02 11:40:18,204 - util.py[DEBUG]: cloud-init mode 'init' took 0.142 seconds (0.14)
2018-07-02 11:40:18,205 - handlers.py[DEBUG]: finish: init-network: SUCCESS: searching for network datasources
The interface setup on the host is like:
root@host-
vtnet0: flags=8843<
options=
ether fa:16:3e:14:1f:99
hwaddr fa:16:3e:14:1f:99
inet 10.1.80.61 netmask 0xfffff000 broadcast 10.1.95.255
nd6 options=
media: Ethernet 10Gbase-T <full-duplex>
status: active
pflog0: flags=0<> metric 0 mtu 33160
pfsync0: flags=0<> metric 0 mtu 1500
syncpeer: 0.0.0.0 maxupd: 128 defer: off
lo0: flags=8049<
options=
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4
inet 127.0.0.1 netmask 0xff000000
nd6 options=
with previous 18.2 release i did not have any problems.
Related branches
- Chad Smith: Approve
- Server Team CI bot: Approve (continuous-integration)
-
Diff: 104 lines (+47/-2)4 files modifiedcloudinit/netinfo.py (+5/-2)
cloudinit/tests/test_netinfo.py (+14/-0)
tests/data/netinfo/freebsd-ifconfig-output (+17/-0)
tests/data/netinfo/freebsd-netdev-formatted-output (+11/-0)
tags: | added: freebsd |
Changed in cloud-init: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
The regex on scopeid is to blame. If scope is necessary, maybe it's best to determine scope from the ipv6 address itself, instead of from ifconfig output. link for fe80, site for fec0, node for ::1, and global for everything else.