summaryrefslogtreecommitdiffstats
path: root/lib/container/start
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2017-07-23 08:28:46 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2017-07-23 08:29:10 +0000
commit098f18a504d97fec24bbe619370cdd2ca0d5b500 (patch)
treeae6f100cedf2537ad070f3fdb9977fa6ada16bcc /lib/container/start
parentReleasing debian version 20170701-1. (diff)
downloadopen-infrastructure-compute-tools-098f18a504d97fec24bbe619370cdd2ca0d5b500.tar.xz
open-infrastructure-compute-tools-098f18a504d97fec24bbe619370cdd2ca0d5b500.zip
Merging upstream version 20170722.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/container/start')
-rwxr-xr-xlib/container/start24
1 files changed, 17 insertions, 7 deletions
diff --git a/lib/container/start b/lib/container/start
index 88f2ea6..6d2c7a9 100755
--- a/lib/container/start
+++ b/lib/container/start
@@ -308,6 +308,11 @@ then
NETWORK_VETH_EXTRA="${NETWORK_VETH_EXTRA} --network-veth-extra=${VETH}"
INTERFACE="$(echo ${VETH} | awk -F: '{ print $1 }')"
+ if [ "$(echo ${INTERFACE} | wc -c)" -gt 15 ]
+ 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
@@ -331,6 +336,11 @@ EOF
INTERFACE="$(echo ${BRIDGE_DEFINITION} | awk -F: '{ print $1 }')"
BRIDGE="$(echo ${BRIDGE_DEFINITION} | awk -F: '{ print $2 }')"
+ if [ "$(echo ${INTERFACE} | wc -c)" -gt 15 ]
+ then
+ echo "'${INTERFACE}': name exceeds maximum of 15 characters, network might be not working."
+ fi
+
if [ -n "${BRIDGE}" ] && [ -n "${INTERFACE}" ]
then
@@ -382,11 +392,11 @@ EOF
SET_PROPERTY="true"
fi
- BLOCK_IO_READ_BANDWITH="$(awk -F= '/^BlockIOReadBandwith=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
+ BLOCK_IO_READ_BANDWIDTH="$(awk -F= '/^BlockIOReadBandwidth=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
- if [ -n "${BLOCK_IO_READ_BANDWITH}" ]
+ if [ -n "${BLOCK_IO_READ_BANDWIDTH}" ]
then
- BLOCK_IO_READ_BANDWITH="BlockIOReadBandwith=${BLOCK_IO_READ_BANDWITH}"
+ BLOCK_IO_READ_BANDWIDTH="BlockIOReadBandwidth=${BLOCK_IO_READ_BANDWIDTH}"
SET_PROPERTY="true"
fi
@@ -398,11 +408,11 @@ EOF
SET_PROPERTY="true"
fi
- BLOCK_IO_WRITE_BANDWITH="$(awk -F= '/^BlockIOWriteBandwith=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
+ BLOCK_IO_WRITE_BANDWIDTH="$(awk -F= '/^BlockIOWriteBandwidth=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
- if [ -n "${BLOCK_IO_WRITE_BANDWITH}" ]
+ if [ -n "${BLOCK_IO_WRITE_BANDWIDTH}" ]
then
- BLOCK_IO_WRITE_BANDWITH="BlockIOWriteBandwith=${BLOCK_IO_WRITE_BANDWITH}"
+ BLOCK_IO_WRITE_BANDWIDTH="BlockIOWriteBandwidth=${BLOCK_IO_WRITE_BANDWIDTH}"
SET_PROPERTY="true"
fi
@@ -451,7 +461,7 @@ case "${START}" in
true)
case "${SET_PROPERTY}" in
true)
- systemctl --runtime set-property ${NAME} ${BLOCK_IO_DEVICE_WEIGHT} ${BLOCK_IO_READ_BANDWITH} ${BLOCK_IO_WEIGHT} ${BLOCK_IO_WRITE_BANDWITH} ${CPU_QUOTA} ${CPU_SHARES} ${MEMORY_LIMIT} ${TASKS_MAX}
+ systemctl --runtime set-property ${NAME} ${BLOCK_IO_DEVICE_WEIGHT} ${BLOCK_IO_READ_BANDWIDTH} ${BLOCK_IO_WEIGHT} ${BLOCK_IO_WRITE_BANDWIDTH} ${CPU_QUOTA} ${CPU_SHARES} ${MEMORY_LIMIT} ${TASKS_MAX}
;;
esac
;;