EphemeralIPv4Network: when device has requested existing network config, but link is down, network setup does not bring link up
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Expired
|
Medium
|
Unassigned |
Bug Description
EphemeralIPv4Ne
When run against a network interfaces which already has the requested ip configuration and routes but hapeens to be "link down", EphemeralIPv4Ne
EphemeralIPv4Ne
Steps to reproduce:
echo > ephemeral_test.py <<EOF
#!/usr/bin/python3
from cloudinit import log
from cloudinit.net.dhcp import EphemeralDHCPv4
from cloudinit.cmd.devel import addLogHandlerCLI
LOG = log.getLogger(
addLogHandlerCL
with EphemeralDHCPv4() as lease:
print('LEASE: %s' % lease)
EOF
chmod 755 ephemeral_test.py
lxc launch ubuntu-daily:bionic b1
lxc file push ephemeral_test.py b1/
# lxc has already completed configured the device, so we expect to only see the following ip commands
# 'ip', '-family', 'inet', 'addr', 'add' ...
# 'ip', 'route', 'show', '0.0.0.0/0'
lxc exec b1 /ephemeral_test.py | grep Running
# bringing down the link, I'd want to see EphemeralIPv4Ne
lxc exec b1 ip link eth0 down
lxc exec b1 /ephemeral_test.py | grep Running
Changed in cloud-init: | |
status: | New → Triaged |
importance: | Undecided → Medium |
Tracked in Github Issues as https:/ /github. com/canonical/ cloud-init/ issues/ 3278