The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxc-ci/pull/218
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === Signed-off-by: Thomas Parrott <thomas.parr...@canonical.com>
From b4b698ccb02d0626b48563734fe9f45a8afd095a Mon Sep 17 00:00:00 2001 From: Thomas Parrott <thomas.parr...@canonical.com> Date: Wed, 16 Dec 2020 14:16:29 +0000 Subject: [PATCH] bin/test-lxd-ovn: Check DHCP can be disabled selectively and instances can still start Signed-off-by: Thomas Parrott <thomas.parr...@canonical.com> --- bin/test-lxd-ovn | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/bin/test-lxd-ovn b/bin/test-lxd-ovn index 6d904dc..d622cae 100755 --- a/bin/test-lxd-ovn +++ b/bin/test-lxd-ovn @@ -272,7 +272,28 @@ lxc network set ovn-virtual-network dns.domain=testdhcp --project testovn # Look for DHCP options mentioning our testdhcp domain name, there should be two. ovn-nbctl --format=csv --no-headings --data=bare --colum=_uuid,options find dhcp_options | grep testdhcp | wc -l | grep 2 -# Check DHCP can be disabled. +# Only enable IPv6 DHCP. +lxc init images:ubuntu/20.04 u1 --project testovn +lxc network set ovn-virtual-network ipv4.dhcp=false ipv6.dhcp=true --project testovn + +# Look for DHCP options mentioning our testdhcp domain name, there should be one. +ovn-nbctl --format=csv --no-headings --data=bare --colum=_uuid,options find dhcp_options | grep testdhcp | wc -l | grep 1 + +# Check container can start with IPv4 DHCP disabled. +lxc start u1 --project testovn +lxc stop -f u1 --project testovn + +# Only enable IPv6 DHCP. +lxc network set ovn-virtual-network ipv4.dhcp=true ipv6.dhcp=false --project testovn + +# Look for DHCP options mentioning our testdhcp domain name, there should be one. +ovn-nbctl --format=csv --no-headings --data=bare --colum=_uuid,options find dhcp_options | grep testdhcp | wc -l | grep 1 + +# Check container can start with IPv6 DHCP disabled. +lxc start u1 --project testovn +lxc delete -f u1 --project testovn + +# Disable both IPv4 and IPv6 DHCP. lxc network set ovn-virtual-network ipv4.dhcp=false ipv6.dhcp=false --project testovn # Look for DHCP options mentioning our testdhcp domain name, there shouldn't be any.
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel