summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-04-28 10:53:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-04-28 10:53:35 +0000
commit4c5d28935483db9f07c8b5e510114a53df360ce1 (patch)
tree1769da7ab8d117ae154d3a42dd5a2fc77717a14b
parentAdding upstream version 20211231. (diff)
downloadopen-infrastructure-compute-tools-4c5d28935483db9f07c8b5e510114a53df360ce1.tar.xz
open-infrastructure-compute-tools-4c5d28935483db9f07c8b5e510114a53df360ce1.zip
Adding upstream version 20220428.upstream/20220428
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r--CHANGELOG.txt7
-rw-r--r--VERSION.txt2
-rwxr-xr-xlibexec/container/start17
-rwxr-xr-xlibexec/container/stop2
4 files changed, 19 insertions, 9 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index d992a85..6c6db18 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,3 +1,10 @@
+2022-04-28 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+
+ * Releasing version 20220428.
+
+ [ Simon Spöhel ]
+ * Using systemd-networkd to manage veth interfaces on host.
+
2021-12-31 Daniel Baumann <daniel.baumann@open-infrastructure.net>
* Releasing version 20211231.
diff --git a/VERSION.txt b/VERSION.txt
index 9e7c11d..04ee20d 100644
--- a/VERSION.txt
+++ b/VERSION.txt
@@ -1 +1 @@
-20211231
+20220428
diff --git a/libexec/container/start b/libexec/container/start
index f899446..da6be24 100755
--- a/libexec/container/start
+++ b/libexec/container/start
@@ -390,15 +390,18 @@ then
if [ -n "${BRIDGE}" ] && [ -n "${INTERFACE}" ]
then
-cat > "/etc/network/interfaces.d/${INTERFACE}" << EOF
-allow-hotplug ${INTERFACE}
-iface ${INTERFACE} inet manual
- pre-up ip link set ${INTERFACE} up
- post-up ip link set ${INTERFACE} master ${BRIDGE}
- pre-down ip link set ${INTERFACE} nomaster
- post-down ip link set ${INTERFACE} down
+ mkdir -p /run/systemd/network
+
+cat > "/run/systemd/network/${INTERFACE}.network" << EOF
+[Match]
+Name=${INTERFACE}
+
+[Network]
+Bridge=${BRIDGE}
EOF
+ networkctl reload
+
else
echo "Warning bridge definition '${BRIDGE_DEFINITION}' not recognized (expected <bridge>:<interface>): Ignoring"
fi
diff --git a/libexec/container/stop b/libexec/container/stop
index 98b2afa..d2db38e 100755
--- a/libexec/container/stop
+++ b/libexec/container/stop
@@ -220,7 +220,7 @@ case "${CLEAN}" in
for VETH in ${VETHS}
do
INTERFACE="$(echo ${VETH} | awk -F: '{ print $1 }')"
- FILE="/etc/network/interfaces.d/${INTERFACE}"
+ FILE="/run/systemd/network/${INTERFACE}.network"
if [ -f "${FILE}" ]
then