summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2017-10-13 13:12:20 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2017-10-13 13:12:20 +0000
commit30294d4ca44102211b9d60ac46aa76767db5f0bd (patch)
treeefb11dd210e4748e4415a6febd47fc7335b8f9f1
parentAdding upstream version 20170726. (diff)
downloadopen-infrastructure-compute-tools-upstream/20171013.tar.xz
open-infrastructure-compute-tools-upstream/20171013.zip
Adding upstream version 20171013.upstream/20171013
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--CHANGELOG.txt12
-rw-r--r--VERSION.txt2
-rwxr-xr-xlib/container/list2
-rwxr-xr-xlib/container/start23
-rwxr-xr-xlib/container/stop6
-rw-r--r--share/doc/HOST-SETUP.txt12
-rw-r--r--share/man/container-tools.7.txt2
-rwxr-xr-xshare/scripts/debconf10
8 files changed, 36 insertions, 33 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 30adeb1..cc4bada 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,3 +1,15 @@
+2017-10-13 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+
+ * Releasing version 20171013.
+
+ [ Daniel Baumann ]
+ * Using linux as fallback TERM in container list command.
+ * Using iproute instead of net-tools to setup interfaces.
+ * Using iproute instead of bridge-utils to setup bridges.
+ * Removing some dead code in network-veth-extra handling.
+ * Removing ifupdown in debconf container create script earlier by excluding it from debootstrap.
+ * Removing net-tools from container-tools manpage.
+
2017-07-26 Daniel Baumann <daniel.baumann@open-infrastructure.net>
* Releasing version 20170726.
diff --git a/VERSION.txt b/VERSION.txt
index 01f7081..9635449 100644
--- a/VERSION.txt
+++ b/VERSION.txt
@@ -1 +1 @@
-20170722
+20171013
diff --git a/lib/container/list b/lib/container/list
index cd88475..80e4e35 100755
--- a/lib/container/list
+++ b/lib/container/list
@@ -26,6 +26,8 @@ MACHINES="/var/lib/machines"
VERSION="$(container version)"
+TERM="${TERM:-linux}"
+
Parameters ()
{
GETOPT_LONGOPTIONS="all,csv-separator:,format:,host:,nwdiag-color:,nwdiag-label:,other,started,stopped,"
diff --git a/lib/container/start b/lib/container/start
index 6d2c7a9..566b4b0 100755
--- a/lib/container/start
+++ b/lib/container/start
@@ -295,15 +295,16 @@ then
MACHINE="--machine=${NAME}"
- NETWORK_VETH_EXTRA_CONF="$(awk -F= '/^network-veth-extra=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
NETWORK_VETH_EXTRA=""
- case "${NETWORK_VETH_EXTRA_CONF}" in
+ VETHS="$(awk -F= '/^network-veth-extra=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
+
+ case "${VETHS}" in
"")
;;
*)
- for VETH in ${NETWORK_VETH_EXTRA_CONF}
+ for VETH in ${VETHS}
do
NETWORK_VETH_EXTRA="${NETWORK_VETH_EXTRA} --network-veth-extra=${VETH}"
INTERFACE="$(echo ${VETH} | awk -F: '{ print $1 }')"
@@ -312,14 +313,6 @@ then
then
echo "'${INTERFACE}': name exceeds maximum of 15 characters, network might be not working."
fi
-
-cat > "/etc/network/interfaces.d/${INTERFACE}" << EOF
-allow-hotplug ${INTERFACE}
-iface ${INTERFACE} inet manual
- pre-up ifconfig ${INTERFACE} up
- post-down ifconfig ${INTERFACE} down
-EOF
-
done
;;
esac
@@ -347,10 +340,10 @@ EOF
cat > "/etc/network/interfaces.d/${INTERFACE}" << EOF
allow-hotplug ${INTERFACE}
iface ${INTERFACE} inet manual
- pre-up ifconfig ${INTERFACE} up
- post-up brctl addif ${BRIDGE} ${INTERFACE}
- pre-down brctl delif ${BRIDGE} ${INTERFACE}
- post-down ifconfig ${INTERFACE} down
+ 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
EOF
else
diff --git a/lib/container/stop b/lib/container/stop
index 12cf7fa..6b1c986 100755
--- a/lib/container/stop
+++ b/lib/container/stop
@@ -176,14 +176,14 @@ case "${CLEAN}" in
fi
# Removing network configuration
- NETWORK_VETH_EXTRA_CONF="$(awk -F= '/^network-veth-extra=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
+ VETHS="$(awk -F= '/^network-veth-extra=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
- case "${NETWORK_VETH_EXTRA_CONF}" in
+ case "${VETHS}" in
"")
;;
*)
- for VETH in ${NETWORK_VETH_EXTRA_CONF}
+ for VETH in ${VETHS}
do
INTERFACE="$(echo ${VETH} | awk -F: '{ print $1 }')"
FILE="/etc/network/interfaces.d/${INTERFACE}"
diff --git a/share/doc/HOST-SETUP.txt b/share/doc/HOST-SETUP.txt
index e172ee3..ca043c5 100644
--- a/share/doc/HOST-SETUP.txt
+++ b/share/doc/HOST-SETUP.txt
@@ -82,8 +82,8 @@ iface bridge0 inet static
gateway 10.0.0.1
netmask 255.255.255.0
- pre-up ifconfig eno1 down
- pre-up ifconfig eno1 up
+ pre-up ip link set eno1 down
+ pre-up ip link set eno1 up
bridge_ports eno1
bridge_fd 0
@@ -111,8 +111,8 @@ iface bridge0 inet static
address 10.0.0.1
netmask 255.255.255.0
- pre-up brctl addbr bridge0
- post-down brctl delbr bridge0
+ pre-up ip link add name bridge0 type bridge
+ post-down ip link delete bridge0 type bridge
bridge_fd 0
bridge_maxwait 0
@@ -140,8 +140,8 @@ iface eno3 inet manual
allow-hotplug bond0
iface bond0 inet manual
- up ifconfig bond0 0.0.0.0 up
- down ifconfig bond0 down
+ up ip link set bond0 0.0.0.0 up
+ down ip link set bond0 down
slaves eno2 eno3
diff --git a/share/man/container-tools.7.txt b/share/man/container-tools.7.txt
index 9f9aba4..86266eb 100644
--- a/share/man/container-tools.7.txt
+++ b/share/man/container-tools.7.txt
@@ -48,7 +48,7 @@ INSTALLATION
SOURCE
~~~~~~
- 1. sudo apt install asciidoc git docbook-xml docbook-xsl libxml2-utils make xsltproc dbus systemd-container net-tools
+ 1. sudo apt install asciidoc git docbook-xml docbook-xsl libxml2-utils make xsltproc dbus systemd-container
2. git clone https://sources.open-infrastructure.net/software/container-tools
3. cd container-tools && sudo make install
diff --git a/share/scripts/debconf b/share/scripts/debconf
index 0b80353..19e6e65 100755
--- a/share/scripts/debconf
+++ b/share/scripts/debconf
@@ -248,6 +248,7 @@ Debootstrap ()
{
DIRECTORY="${1}"
+ EXCLUDE="ifupdown"
INCLUDE="dbus"
if echo "${MIRROR}" | grep -qs '^https' || \
@@ -257,8 +258,8 @@ Debootstrap ()
fi
mkdir -p "$(dirname ${DIRECTORY})"
- debootstrap --verbose --arch=${ARCHITECTURE} --components=${PARENT_ARCHIVE_AREAS} --include=${INCLUDE} \
- ${PARENT_DISTRIBUTION} "${DIRECTORY}" ${PARENT_MIRROR}
+ debootstrap --verbose --arch=${ARCHITECTURE} --components=${PARENT_ARCHIVE_AREAS} \
+ --exclude=${EXCLUDE} --include=${INCLUDE} ${PARENT_DISTRIBUTION} "${DIRECTORY}" ${PARENT_MIRROR}
}
Configure_apt ()
@@ -803,11 +804,6 @@ Configure_systemd_networkd ()
DIRECTORY="${1}"
# Enable systemd-networkd
- chroot "${DIRECTORY}" apt purge --yes ifupdown || true
-
- rm -f "${DIRECTORY}/etc/network/interfaces"
- rmdir --ignore-fail-on-non-empty --parents "${DIRECTORY}"/etc/network/* > /dev/null 2>&1 || true
-
chroot "${DIRECTORY}" systemctl enable systemd-networkd
for NUMBER in $(seq 1 ${NETWORK_NUMBER})