cloud-init
cloud-init copied to clipboard
integration-test failure: netplan 0.106 lunar++ test_ovs_member_interfaces_not_excluded
Bug report
Jenkins tests are failing on cloud-init 23.1.2 on lxd_vm due to defaults for networking setup not including setting ipv4 default routes. This does not affect kinetic and newer. this is likely an integration test issue and also affects tip of main branch.
Steps to reproduce the problem
CLOUD_INIT_OS_IMAGE=lunar CLOUD_INIT_PLATFORM=lxd_vm CLOUD_INIT_KEEP_INSTANCE=1 tox -e integration-tests tests/integration_tests/bugs/test_lp1898997.py::TestInterfaceListingWithOpenvSwitch::test_ovs_member_interfaces_not_excluded
Jenkins errors:
=================================== FAILURES ===================================
_ TestInterfaceListingWithOpenvSwitch.test_ovs_member_interfaces_not_excluded __
self = <test_lp1898997.TestInterfaceListingWithOpenvSwitch object at 0x7f277fd01690>
client = <tests.integration_tests.instances.IntegrationInstance object at 0x7f277feb6c10>
def test_ovs_member_interfaces_not_excluded(self, client):
# We need to install openvswitch for our provided network configuration
# to apply (on next boot), so DHCP on our default interface to fetch it
client.execute("dhclient enp5s0")
client.execute("apt update -qqy")
client.execute("apt-get install -qqy openvswitch-switch")
# Now our networking config should successfully apply on a clean reboot
client.execute("cloud-init clean --logs")
client.restart()
cloudinit_output = client.read_from_file("/var/log/cloud-init.log")
# Confirm that the network configuration was applied successfully
verify_clean_log(cloudinit_output)
# Confirm that the applied network config created the OVS bridge
assert "ovs-br" in client.execute("ip addr")
# Test that we can ping our gateway using our bridge
gateway = client.execute(
"ip -4 route show default | awk '{ print $3 }'"
)
ping_result = client.execute(
"ping -c 1 -W 1 -I ovs-br {}".format(gateway)
)
> assert ping_result.ok
E AssertionError: assert False
E + where False = ''.ok
tests/integration_tests/bugs/test_lp1898997.py:83: AssertionError
The response from ip -4 route show default on the Kinetic vs Lunar launched lxd_vm shows empty:
csmith@midtown:~/src/cloud-init$ lxc exec cloudinit-0713-1633173mkmg57i -- ip -4 route show default
default via 10.125.221.1 dev ovs-br proto dhcp src 10.125.221.61 metric 100
csmith@midtown:~/src/cloud-init$ lxc exec cloudinit-0713-162959yk74h2oh -- ip -4 route show default
Environment details
- Cloud-init version: 23.1.2
- Operating System Distribution: Ubuntu Lunar
- Cloud provider, platform or installer type: lxd_vm
cloud-init logs
No failures warnings or traces in cloud-init logs seen cloud-init.log.txt