[lxc-devel] [lxc-ci/master] bin/test-lxd-ovn: Check DHCP can be disabled selectively and instances can still start
tomponline on Github
lxc-bot at linuxcontainers.org
Wed Dec 16 14:17:19 UTC 2020
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 365 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20201216/ed683a11/attachment.bin>
-------------- next part --------------
From b4b698ccb02d0626b48563734fe9f45a8afd095a Mon Sep 17 00:00:00 2001
From: Thomas Parrott <thomas.parrott at 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.parrott at 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.
More information about the lxc-devel
mailing list