diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2017-07-23 08:28:38 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2017-07-23 08:28:38 +0000 |
commit | 67dd59d5d9d8efb620ba8b65c7a661a8ae6a1365 (patch) | |
tree | 43300ba57e2427696d7d9b0b6ff14275d991f912 /lib/container/start | |
parent | Adding upstream version 20170701. (diff) | |
download | open-infrastructure-compute-tools-67dd59d5d9d8efb620ba8b65c7a661a8ae6a1365.tar.xz open-infrastructure-compute-tools-67dd59d5d9d8efb620ba8b65c7a661a8ae6a1365.zip |
Adding upstream version 20170722.upstream/20170722
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/container/start')
-rwxr-xr-x | lib/container/start | 24 |
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 ;; |