summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-05-05 16:33:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-05-05 16:33:34 +0000
commitf3f0fb8c0dfed591c3c03ff7f2d00ebb8b52d4ae (patch)
tree241cc9d6148fe3d9b131bf7e344027df7eb59a8d
parentAdding upstream version 20220430. (diff)
downloadopen-infrastructure-compute-tools-f3f0fb8c0dfed591c3c03ff7f2d00ebb8b52d4ae.tar.xz
open-infrastructure-compute-tools-f3f0fb8c0dfed591c3c03ff7f2d00ebb8b52d4ae.zip
Adding upstream version 20220505.upstream/20220505
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r--CHANGELOG.txt12
-rw-r--r--Makefile3
-rw-r--r--VERSION.txt2
-rwxr-xr-xbin/container4
-rwxr-xr-xbin/container-shell2
-rwxr-xr-xlibexec/container/auto2
-rwxr-xr-xlibexec/container/build2
-rwxr-xr-xlibexec/container/console2
-rwxr-xr-xlibexec/container/enter2
-rwxr-xr-xlibexec/container/get2
-rwxr-xr-xlibexec/container/info2
-rwxr-xr-xlibexec/container/key2
-rwxr-xr-xlibexec/container/limit2
-rwxr-xr-xlibexec/container/list6
-rwxr-xr-xlibexec/container/log2
-rwxr-xr-xlibexec/container/move2
-rwxr-xr-xlibexec/container/rebuild152
-rwxr-xr-xlibexec/container/remove2
-rwxr-xr-xlibexec/container/restart2
-rwxr-xr-xlibexec/container/start38
-rwxr-xr-xlibexec/container/stop20
-rwxr-xr-xlibexec/container/top2
-rwxr-xr-xlibexec/container/update2
-rwxr-xr-xlibexec/container/version2
-rw-r--r--share/bash-completion/container20
-rwxr-xr-xshare/build-scripts/debconf2
-rwxr-xr-xshare/build-scripts/debconf.d/0001-preseed-file2
-rwxr-xr-xshare/build-scripts/debconf.d/0002-preseed-debconf2
-rwxr-xr-xshare/build-scripts/debconf.d/0003-debconf2
-rwxr-xr-xshare/build-scripts/debootstrap2
-rwxr-xr-xshare/doc/examples/container-images.sh2
-rw-r--r--share/doc/host-setup.old.txt230
-rw-r--r--share/doc/host-setup.txt9
-rwxr-xr-xshare/get-scripts/curl2
-rwxr-xr-xshare/get-scripts/curl.d/0001-debconf2
-rwxr-xr-xshare/hooks/post-start.chown-nvidia.sh2
-rwxr-xr-xshare/hooks/pre-build.git-pull.sh2
-rwxr-xr-xshare/hooks/pre-get.git-pull.sh2
-rwxr-xr-xshare/hooks/pre-start.unlink-console.sh2
-rw-r--r--share/man/Makefile2
-rw-r--r--share/man/compute-tools.7.rst2
-rw-r--r--share/man/container-auto.1.rst2
-rw-r--r--share/man/container-build-debconf.1.rst2
-rw-r--r--share/man/container-build-debootstrap.1.rst2
-rw-r--r--share/man/container-build.1.rst2
-rw-r--r--share/man/container-console.1.rst2
-rw-r--r--share/man/container-enter.1.rst2
-rw-r--r--share/man/container-get-curl.1.rst2
-rw-r--r--share/man/container-get.1.rst2
-rw-r--r--share/man/container-info.1.rst2
-rw-r--r--share/man/container-key.1.rst2
-rw-r--r--share/man/container-limit.1.rst2
-rw-r--r--share/man/container-list.1.rst2
-rw-r--r--share/man/container-log.1.rst2
-rw-r--r--share/man/container-move.1.rst2
-rw-r--r--share/man/container-rebuild.1.rst93
-rw-r--r--share/man/container-remove.1.rst2
-rw-r--r--share/man/container-restart.1.rst2
-rw-r--r--share/man/container-run.1.rst2
-rw-r--r--share/man/container-shell.1.rst2
-rw-r--r--share/man/container-start.1.rst2
-rw-r--r--share/man/container-status.1.rst2
-rw-r--r--share/man/container-stop.1.rst2
-rw-r--r--share/man/container-top.1.rst2
-rw-r--r--share/man/container-update.1.rst2
-rw-r--r--share/man/container-version.1.rst2
-rw-r--r--share/man/container.1.rst5
-rw-r--r--share/man/man.in2
68 files changed, 630 insertions, 74 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 615934c..6591c7c 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,3 +1,15 @@
+2022-05-05 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+
+ * Releasing version 20220505.
+
+ [ Daniel Baumann ]
+ * Adding container rebuild command.
+ * Correcting wrong shortlink for container restart command (rs instead of rt).
+ * Updating copyright notices for 2022.
+ * Showing all IP address for stopped containers in container list command.
+ * Supporting both ifupdown and systemd-networkd for the time being, depending on the existence of /etc/network/interfaces.
+ * Readding old ifupdown documentation for the time being.
+
2022-04-30 Daniel Baumann <daniel.baumann@open-infrastructure.net>
* Releasing version 20220430.
diff --git a/Makefile b/Makefile
index 7442ab2..95524db 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
# Open Infrastructure: compute-tools
-# Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
@@ -133,6 +133,7 @@ install: build
ln -sf list $(DESTDIR)/usr/libexec/$(PROGRAM)/ls
ln -sf move $(DESTDIR)/usr/libexec/$(PROGRAM)/mv
ln -sf remove $(DESTDIR)/usr/libexec/$(PROGRAM)/rm
+ ln -sf rebuild $(DESTDIR)/usr/libexec/$(PROGRAM)/rb
ln -sf restart $(DESTDIR)/usr/libexec/$(PROGRAM)/rs
ln -sf start $(DESTDIR)/usr/libexec/$(PROGRAM)/s
ln -sf status $(DESTDIR)/usr/libexec/$(PROGRAM)/st
diff --git a/VERSION.txt b/VERSION.txt
index bbfd1ea..75b32b6 100644
--- a/VERSION.txt
+++ b/VERSION.txt
@@ -1 +1 @@
-20220430
+20220505
diff --git a/bin/container b/bin/container
index 68e3965..582fe08 100755
--- a/bin/container
+++ b/bin/container
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
@@ -68,7 +68,7 @@ do
OPTIONS="$(echo "${OPTIONS}" | sed -e 's|--no-notification||')"
else
case "${COMMAND}" in
- build|b|get|g|move|mv|remove|rm|restart|rt|start|s|stop|t|update|u)
+ build|b|get|g|move|mv|remove|rm|rebuild|rb|restart|rs|start|s|stop|t|update|u)
if [ -z "${CONTAINER_USER}" ]
then
CONTAINER_USER="${SUDO_USER:-${USER}}"
diff --git a/bin/container-shell b/bin/container-shell
index 98ece06..d63c3c0 100755
--- a/bin/container-shell
+++ b/bin/container-shell
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/libexec/container/auto b/libexec/container/auto
index de5f292..927eae0 100755
--- a/libexec/container/auto
+++ b/libexec/container/auto
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/libexec/container/build b/libexec/container/build
index d6c938c..48f2d4b 100755
--- a/libexec/container/build
+++ b/libexec/container/build
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/libexec/container/console b/libexec/container/console
index 31da60d..be2b897 100755
--- a/libexec/container/console
+++ b/libexec/container/console
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/libexec/container/enter b/libexec/container/enter
index f1dae7f..b366ba6 100755
--- a/libexec/container/enter
+++ b/libexec/container/enter
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/libexec/container/get b/libexec/container/get
index 2b41ba8..0d0f420 100755
--- a/libexec/container/get
+++ b/libexec/container/get
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/libexec/container/info b/libexec/container/info
index d030780..699a253 100755
--- a/libexec/container/info
+++ b/libexec/container/info
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/libexec/container/key b/libexec/container/key
index e35c56c..5deff0d 100755
--- a/libexec/container/key
+++ b/libexec/container/key
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/libexec/container/limit b/libexec/container/limit
index 2c87b78..b7f6e9b 100755
--- a/libexec/container/limit
+++ b/libexec/container/limit
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/libexec/container/list b/libexec/container/list
index 2600bab..a56c1f8 100755
--- a/libexec/container/list
+++ b/libexec/container/list
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
@@ -387,10 +387,10 @@ do
*)
if ls "${MACHINES}/${CONTAINER}/etc/systemd/network"/*.network > /dev/null 2>&1
then
- ADDRESS="$(awk -FAddress= '/^Address/ { print $2 }' ${MACHINES}/${CONTAINER}/etc/systemd/network/*.network | head -n1)"
+ ADDRESS="$(for IP in $(awk -FAddress= '/^Address/ { print $2 }' ${MACHINES}/${CONTAINER}/etc/systemd/network/*.network); do echo -n "${IP} "; done)"
elif [ -e "${MACHINES}/${CONTAINER}/etc/network/interfaces" ]
then
- ADDRESS="$(awk '/address/ { print $2 }' ${MACHINES}/${CONTAINER}/etc/network/interfaces | head -n1)"
+ ADDRESS="$(for IP in $(awk '/address/ { print $2 }' ${MACHINES}/${CONTAINER}/etc/network/interfaces); do echo -n "${IP} "; done)"
fi
ADDRESS="${ADDRESS:-n/a}"
diff --git a/libexec/container/log b/libexec/container/log
index 9d11fd6..b7a000d 100755
--- a/libexec/container/log
+++ b/libexec/container/log
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/libexec/container/move b/libexec/container/move
index d41c995..fdc19e6 100755
--- a/libexec/container/move
+++ b/libexec/container/move
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/libexec/container/rebuild b/libexec/container/rebuild
new file mode 100755
index 0000000..e526520
--- /dev/null
+++ b/libexec/container/rebuild
@@ -0,0 +1,152 @@
+#!/bin/sh
+
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+#
+# SPDX-License-Identifier: GPL-3.0+
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+set -e
+
+PROJECT="open-infrastructure"
+SOFTWARE="compute-tools"
+PROGRAM="container"
+COMMAND="$(basename ${0})"
+
+HOOKS="/etc/${SOFTWARE}/hooks"
+MACHINES="/var/lib/machines"
+
+Parameters ()
+{
+ OPTIONS_ALL=""
+
+ GETOPT_LONGOPTIONS="name:,force,verbose,"
+ GETOPT_OPTIONS="n:,f,v,"
+
+ PARAMETERS="$(getopt --longoptions ${GETOPT_LONGOPTIONS} --name=${COMMAND} --options ${GETOPT_OPTIONS} --shell sh -- ${@})"
+
+ if [ "${?}" != "0" ]
+ then
+ echo "'${COMMAND}': getopt exit" >&2
+ exit 1
+ fi
+
+ eval set -- "${PARAMETERS}"
+
+ while true
+ do
+ case "${1}" in
+ -n|--name)
+ NAME="${2}"
+ shift 2
+ ;;
+
+ -f|--force)
+ FORCE="true"
+ shift 1
+
+ OPTIONS_ALL="${OPTIONS_ALL} --force"
+ ;;
+
+ -v|--verbose)
+ VERBOSE="true"
+ shift 1
+
+ OPTIONS_ALL="${OPTIONS_ALL} --verbose"
+ ;;
+
+ --)
+ shift 1
+ break
+ ;;
+
+ *)
+ echo "'${COMMAND}': getopt error" >&2
+ exit 1
+ ;;
+ esac
+ done
+}
+
+Usage ()
+{
+ echo "Usage: ${PROGRAM} ${COMMAND} -n|--name NAME [-f|--force] [-v|--verbose]" >&2
+ echo
+ echo "See ${COMMAND}(1), ${PROGRAM}(1) and ${PROJECT}(7) for more information."
+
+ exit 1
+}
+
+Parameters "${@}"
+
+if [ -z "${NAME}" ]
+then
+ Usage
+fi
+
+case "${NAME}" in
+ ALL)
+ NAMES="$(${PROGRAM} list --format shell --started)"
+
+ for NAME in ${NAMES}
+ do
+ ${PROGRAM} rebuild,start --name ${NAME} ${OPTIONS_ALL} || true
+ done
+
+ exit 0
+ ;;
+esac
+
+if [ ! -e "${MACHINES}/${NAME}" ]
+then
+ echo "'${NAME}': no such container" >&2
+ exit 1
+fi
+
+# Pre hooks
+for FILE in "${HOOKS}/pre-${COMMAND}".* "${HOOKS}/${NAME}.pre-${COMMAND}"
+do
+ if [ -x "${FILE}" ]
+ then
+ "${FILE}"
+ fi
+done
+
+# Run
+case "${VERBOSE}" in
+ true)
+ echo -n "Rebuilding container ${NAME}..."
+ ;;
+esac
+
+${PROGRAM} stop ${OPTIONS_ALL} --name ${NAME} || true
+sleep 0.5
+${PROGRAM} remove ${OPTIONS_ALL} --name ${NAME} || true
+sleep 0.5
+${PROGRAM} build --name ${NAME} || true
+
+case "${VERBOSE}" in
+ true)
+ echo " done."
+ ;;
+esac
+
+# Post hooks
+for FILE in "${HOOKS}/post-${COMMAND}".* "${HOOKS}/${NAME}.post-${COMMAND}"
+do
+ if [ -x "${FILE}" ]
+ then
+ "${FILE}"
+ fi
+done
diff --git a/libexec/container/remove b/libexec/container/remove
index 03303a7..86f237d 100755
--- a/libexec/container/remove
+++ b/libexec/container/remove
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/libexec/container/restart b/libexec/container/restart
index c172731..fcb28b8 100755
--- a/libexec/container/restart
+++ b/libexec/container/restart
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/libexec/container/start b/libexec/container/start
index da6be24..1b53628 100755
--- a/libexec/container/start
+++ b/libexec/container/start
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
@@ -191,6 +191,13 @@ case "${HOST_ARCHITECTURE}" in
;;
esac
+if systemctl status systemd-networkd > /dev/null 2>&1
+then
+ NETWORK_SUBSYSTEM="systemd-networkd"
+else
+ NETWORK_SUBSYSTEM="ifupdown"
+fi
+
case "${START}" in
start)
;;
@@ -390,7 +397,22 @@ then
if [ -n "${BRIDGE}" ] && [ -n "${INTERFACE}" ]
then
- mkdir -p /run/systemd/network
+ case "${NETWORK_SUBSYSTEM}" in
+ ifupdown)
+
+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
+EOF
+
+ ;;
+
+ systemd-networkd)
+ mkdir -p /run/systemd/network
cat > "/run/systemd/network/${INTERFACE}.network" << EOF
[Match]
@@ -398,10 +420,18 @@ Name=${INTERFACE}
[Network]
Bridge=${BRIDGE}
+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
EOF
- networkctl reload
-
+ networkctl reload
+ ;;
+ esac
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 d2db38e..cb85c8d 100755
--- a/libexec/container/stop
+++ b/libexec/container/stop
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
@@ -146,6 +146,13 @@ then
exit 1
fi
+if systemctl status systemd-networkd > /dev/null 2>&1
+then
+ NETWORK_SUBSYSTEM="systemd-networkd"
+else
+ NETWORK_SUBSYSTEM="ifupdown"
+fi
+
# Pre hooks
for FILE in "${HOOKS}/pre-${COMMAND}".* "${HOOKS}/${NAME}.pre-${COMMAND}"
do
@@ -220,7 +227,16 @@ case "${CLEAN}" in
for VETH in ${VETHS}
do
INTERFACE="$(echo ${VETH} | awk -F: '{ print $1 }')"
- FILE="/run/systemd/network/${INTERFACE}.network"
+
+ case "${NETWORK_SUBSYSTEM}" in
+ ifupdown)
+ FILE="/etc/network/interfaces.d/${INTERFACE}"
+ ;;
+
+ systemd-networkd)
+ FILE="/run/systemd/network/${INTERFACE}.network"
+ ;;
+ esac
if [ -f "${FILE}" ]
then
diff --git a/libexec/container/top b/libexec/container/top
index 20e2a29..268da9a 100755
--- a/libexec/container/top
+++ b/libexec/container/top
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/libexec/container/update b/libexec/container/update
index c5ff6c2..e2d9c80 100755
--- a/libexec/container/update
+++ b/libexec/container/update
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/libexec/container/version b/libexec/container/version
index 3b33a4d..e580688 100755
--- a/libexec/container/version
+++ b/libexec/container/version
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/share/bash-completion/container b/share/bash-completion/container
index 24205d7..7792201 100644
--- a/share/bash-completion/container
+++ b/share/bash-completion/container
@@ -1,6 +1,6 @@
# Open Infrastructure: compute-tools
-# Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
@@ -264,7 +264,23 @@ _container()
esac
;;
- restart|rt)
+ rebuild|rb)
+ case "${prev}" in
+ -n|--name)
+ opts="$(container list -f shell)"
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+ return 0
+ ;;
+
+ *)
+ opts="-n --name -f --force -v --verbose"
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+ return 0
+ ;;
+ esac
+ ;;
+
+ restart|rs)
case "${prev}" in
-n|--name)
opts="$(container list -s -f shell)"
diff --git a/share/build-scripts/debconf b/share/build-scripts/debconf
index 39856ae..1689a79 100755
--- a/share/build-scripts/debconf
+++ b/share/build-scripts/debconf
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/share/build-scripts/debconf.d/0001-preseed-file b/share/build-scripts/debconf.d/0001-preseed-file
index c1a311d..8409486 100755
--- a/share/build-scripts/debconf.d/0001-preseed-file
+++ b/share/build-scripts/debconf.d/0001-preseed-file
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/share/build-scripts/debconf.d/0002-preseed-debconf b/share/build-scripts/debconf.d/0002-preseed-debconf
index 4bc4da6..fcb9006 100755
--- a/share/build-scripts/debconf.d/0002-preseed-debconf
+++ b/share/build-scripts/debconf.d/0002-preseed-debconf
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/share/build-scripts/debconf.d/0003-debconf b/share/build-scripts/debconf.d/0003-debconf
index c1c4e79..2b0ea76 100755
--- a/share/build-scripts/debconf.d/0003-debconf
+++ b/share/build-scripts/debconf.d/0003-debconf
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/share/build-scripts/debootstrap b/share/build-scripts/debootstrap
index 4c047ee..2cfa328 100755
--- a/share/build-scripts/debootstrap
+++ b/share/build-scripts/debootstrap
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/share/doc/examples/container-images.sh b/share/doc/examples/container-images.sh
index e6947e3..27c05fc 100755
--- a/share/doc/examples/container-images.sh
+++ b/share/doc/examples/container-images.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/share/doc/host-setup.old.txt b/share/doc/host-setup.old.txt
new file mode 100644
index 0000000..69368d1
--- /dev/null
+++ b/share/doc/host-setup.old.txt
@@ -0,0 +1,230 @@
+compute-tools: Host Setup (with ifupdown)
+=========================================
+
+
+1. Debian Packages
+-------------------
+
+apt install bridge-utils ifenslave vlan
+
+
+2. Boot Parameters
+------------------
+
+2.1 CGroup Memory Controller (optional)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+In order to enable the memory controller the following boot parameter needs to be used:
+
+ cgroup_enable=memory
+
+
+2.2 CGroup Swap Controller (optional)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+In order to enable the swap controller the following boot parameter needs to be used:
+
+ swapaccount=1
+
+2.3 vsyscall (legacy)
+~~~~~~~~~~~~~~~~~~~~~
+
+In order to be able to execute binaries linked to older libc versions
+(<= wheezy) on newer linux versions (>= buster), add the following boot
+parameter (see #881813 for more information):
+
+ vsyscall=emulate
+
+
+3. Networking
+~~~~~~~~~~~~~
+
+3.1 Configure Network Bridge
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+3.1.1 Bridge: 1 Interface, standalone, DHCP
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+cat > /etc/network/interfaces << EOF
+# /etc/network/interfaces
+
+source /etc/network/interfaces.d/*
+
+auto lo
+iface lo inet loopback
+
+iface eno1 inet manual
+
+auto bridge0
+iface bridge0 inet dhcp
+ bridge_ports eno1
+ bridge_fd 0
+ bridge_maxwait 0
+ bridge_stp 0
+EOF
+
+
+3.1.2 Bridge: 1 Interface, standalone, static
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+cat > /etc/network/interfaces << EOF
+# /etc/network/interfaces
+
+source /etc/network/interfaces.d/*
+
+auto lo
+iface lo inet loopback
+
+iface eno1 inet manual
+
+auto bridge0
+iface bridge0 inet static
+ address 10.0.0.2
+ gateway 10.0.0.1
+ netmask 24
+
+ pre-up ip link set eno1 down
+ pre-up ip link set eno1 up
+
+ bridge_ports eno1
+ bridge_fd 0
+ bridge_maxwait 0
+ bridge_stp 0
+EOF
+
+
+3.1.3 Bridge: 2 logical Interfaces, subnet, static
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+cat > /etc/network/interfaces << EOF
+# /etc/network/interfaces
+
+source /etc/network/interfaces.d/*
+
+auto lo
+iface lo inet loopback
+
+allow-hotplug eno1
+iface eno1 inet dhcp
+
+auto bridge0
+iface bridge0 inet static
+ address 10.0.0.1
+ netmask 24
+
+ pre-up ip link add name bridge0 type bridge
+ post-down ip link delete bridge0 type bridge
+
+ bridge_fd 0
+ bridge_maxwait 0
+ bridge_stp 0
+EOF
+
+
+3.1.4 Bridge: 3 physical Interfaces, vlan, bonding, static
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+cat > /etc/network/interfaces << EOF
+# /etc/network/interfaces
+
+source /etc/network/interfaces.d/*
+
+auto lo
+iface lo inet loopback
+
+allow-hotplug eno1
+iface eno1 inet dhcp
+
+iface eno2 inet manual
+
+iface eno3 inet manual
+
+auto bond0
+iface bond0 inet manual
+ up ip link set bond0 up
+ down ip link set bond0 down
+
+ slaves eno2 eno3
+
+ bond-mode 4
+ bond-miimon 100
+ bond-downdelay 200
+ bond-updelay 200
+ bond-lacp-rate 1
+ bond-xmit-hash-policy layer2+3
+
+iface bond0.100 inet manual
+ vlan-raw-device bond0
+
+auto bridge-100
+iface bridge-100 inet static
+ address 10.100.0.2
+ netmask 24
+
+ bridge_ports bond0.100
+ bridge_fd 0
+ bridge_maxwait 0
+ bridge_stp 0
+EOF
+
+
+4. Enabling user namespace for unprivileged containers
+------------------------------------------------------
+
+Linux supports unprivileged containers with the user namespace.
+By default the user namespace is disabled on Debian systems (see #898446).
+To enable user namespace, edit the following file for a permant change:
+
+ /etc/sysctl.d/zz-compute-tools.conf
+ sysctl -p
+
+or enable it manually with:
+
+ echo 1 > /proc/sys/kernel/unprivileged_userns_clone
+
+Note that containers need to be started with the correct
+configuration in /etc/compute-tools/container/config to run unpriviled
+(private-users option).
+
+
+5. Enabling container-shell
+---------------------------
+
+Managing privileged containers requires root privileges. In order to allow
+unprivileged users to manage privileged containers without granting them
+privileges or accounts, the container-shell can be used together with sudo
+and a container user.
+
+ sudo adduser --gecos "compute-tools,,," \
+ --home /var/lib/open-infrastructure/container-shell \
+ --shell /usr/bin/container-shell
+
+
+6. IPv4 and IPv6 dual-stack
+---------------------------
+
+Examples for /etc/network/interfaces above work for IPv6 too when using correct
+IPv6 addresses and netmasks.
+
+In order to use dual-stack, bridges must have a IPv4 address assigned
+(can be a dummy one from a privacy range or 127.0.0.0/8).
+
+Let me repeat: dual-stack only works when you assign a primary IPv6 address
+(private or public, doesn't matter) *and* add an additional IPv4 address.
+Yes, the IPv4 address can be a private address, the containers can still
+have a public IPv4 address.
+
+A complete example looks like this:
+
+auto bridge0
+iface bridge0 inet6 static
+ address 2a07:6b47:4::4:1
+ netmask 48
+
+ up ip addr add 127.4.4.1 dev $IFACE
+ down ip addr del 127.4.4.1 dev $IFACE
+
+ bridge_fd 0
+ bridge_maxwait 0
+ bridge_stp 0
+ bridge-mcquerier 1
diff --git a/share/doc/host-setup.txt b/share/doc/host-setup.txt
index b6da7f0..083e1aa 100644
--- a/share/doc/host-setup.txt
+++ b/share/doc/host-setup.txt
@@ -1,11 +1,14 @@
-compute-tools: Host Setup
-=========================
+compute-tools: Host Setup (with systemd-networkd)
+=================================================
1. Debian Packages
-------------------
-apt install systemd-networkd
+apt install systemd-networkd bridge-utils
+
+Make sure to enable networkd (sudo systemctl enable systemd-networkd)
+and convert /etc/network/interfaces (see systemd-networkd documentation).
2. Boot Parameters
diff --git a/share/get-scripts/curl b/share/get-scripts/curl
index 4accea2..2dce4cf 100755
--- a/share/get-scripts/curl
+++ b/share/get-scripts/curl
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/share/get-scripts/curl.d/0001-debconf b/share/get-scripts/curl.d/0001-debconf
index 083d469..5c5936e 100755
--- a/share/get-scripts/curl.d/0001-debconf
+++ b/share/get-scripts/curl.d/0001-debconf
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/share/hooks/post-start.chown-nvidia.sh b/share/hooks/post-start.chown-nvidia.sh
index 2a99bd3..225f13b 100755
--- a/share/hooks/post-start.chown-nvidia.sh
+++ b/share/hooks/post-start.chown-nvidia.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/share/hooks/pre-build.git-pull.sh b/share/hooks/pre-build.git-pull.sh
index d2cc152..f1ae24b 100755
--- a/share/hooks/pre-build.git-pull.sh
+++ b/share/hooks/pre-build.git-pull.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/share/hooks/pre-get.git-pull.sh b/share/hooks/pre-get.git-pull.sh
index d2cc152..f1ae24b 100755
--- a/share/hooks/pre-get.git-pull.sh
+++ b/share/hooks/pre-get.git-pull.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/share/hooks/pre-start.unlink-console.sh b/share/hooks/pre-start.unlink-console.sh
index b44491e..cebbe03 100755
--- a/share/hooks/pre-start.unlink-console.sh
+++ b/share/hooks/pre-start.unlink-console.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/share/man/Makefile b/share/man/Makefile
index a8af58d..a878dbd 100644
--- a/share/man/Makefile
+++ b/share/man/Makefile
@@ -1,6 +1,6 @@
# Open Infrastructure: compute-tools
-# Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/share/man/compute-tools.7.rst b/share/man/compute-tools.7.rst
index 3252f05..95e765b 100644
--- a/share/man/compute-tools.7.rst
+++ b/share/man/compute-tools.7.rst
@@ -1,6 +1,6 @@
.. Open Infrastructure: compute-tools
-.. Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+.. Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
..
.. SPDX-License-Identifier: GPL-3.0+
..
diff --git a/share/man/container-auto.1.rst b/share/man/container-auto.1.rst
index 530d64c..68836eb 100644
--- a/share/man/container-auto.1.rst
+++ b/share/man/container-auto.1.rst
@@ -1,6 +1,6 @@
.. Open Infrastructure: compute-tools
-.. Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+.. Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
..
.. SPDX-License-Identifier: GPL-3.0+
..
diff --git a/share/man/container-build-debconf.1.rst b/share/man/container-build-debconf.1.rst
index 1649071..6543140 100644
--- a/share/man/container-build-debconf.1.rst
+++ b/share/man/container-build-debconf.1.rst
@@ -1,6 +1,6 @@
.. Open Infrastructure: compute-tools
-.. Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+.. Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
..
.. SPDX-License-Identifier: GPL-3.0+
..
diff --git a/share/man/container-build-debootstrap.1.rst b/share/man/container-build-debootstrap.1.rst
index 853b4dc..1f0584b 100644
--- a/share/man/container-build-debootstrap.1.rst
+++ b/share/man/container-build-debootstrap.1.rst
@@ -1,6 +1,6 @@
.. Open Infrastructure: compute-tools
-.. Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+.. Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
..
.. SPDX-License-Identifier: GPL-3.0+
..
diff --git a/share/man/container-build.1.rst b/share/man/container-build.1.rst
index 38a4aed..faa0e16 100644
--- a/share/man/container-build.1.rst
+++ b/share/man/container-build.1.rst
@@ -1,6 +1,6 @@
.. Open Infrastructure: compute-tools
-.. Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+.. Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
..
.. SPDX-License-Identifier: GPL-3.0+
..
diff --git a/share/man/container-console.1.rst b/share/man/container-console.1.rst
index b07ba95..a3afd51 100644
--- a/share/man/container-console.1.rst
+++ b/share/man/container-console.1.rst
@@ -1,6 +1,6 @@
.. Open Infrastructure: compute-tools
-.. Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+.. Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
..
.. SPDX-License-Identifier: GPL-3.0+
..
diff --git a/share/man/container-enter.1.rst b/share/man/container-enter.1.rst
index 4948e3a..65961f5 100644
--- a/share/man/container-enter.1.rst
+++ b/share/man/container-enter.1.rst
@@ -1,6 +1,6 @@
.. Open Infrastructure: compute-tools
-.. Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+.. Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
..
.. SPDX-License-Identifier: GPL-3.0+
..
diff --git a/share/man/container-get-curl.1.rst b/share/man/container-get-curl.1.rst
index ba44ba0..e94260b 100644
--- a/share/man/container-get-curl.1.rst
+++ b/share/man/container-get-curl.1.rst
@@ -1,6 +1,6 @@
.. Open Infrastructure: compute-tools
-.. Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+.. Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
..
.. SPDX-License-Identifier: GPL-3.0+
..
diff --git a/share/man/container-get.1.rst b/share/man/container-get.1.rst
index edcb1de..8ec61de 100644
--- a/share/man/container-get.1.rst
+++ b/share/man/container-get.1.rst
@@ -1,6 +1,6 @@
.. Open Infrastructure: compute-tools
-.. Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+.. Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
..
.. SPDX-License-Identifier: GPL-3.0+
..
diff --git a/share/man/container-info.1.rst b/share/man/container-info.1.rst
index c3c8e7d..608f999 100644
--- a/share/man/container-info.1.rst
+++ b/share/man/container-info.1.rst
@@ -1,6 +1,6 @@
.. Open Infrastructure: compute-tools
-.. Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+.. Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
..
.. SPDX-License-Identifier: GPL-3.0+
..
diff --git a/share/man/container-key.1.rst b/share/man/container-key.1.rst
index d21956a..ff2b93f 100644
--- a/share/man/container-key.1.rst
+++ b/share/man/container-key.1.rst
@@ -1,6 +1,6 @@
.. Open Infrastructure: compute-tools
-.. Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+.. Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
..
.. SPDX-License-Identifier: GPL-3.0+
..
diff --git a/share/man/container-limit.1.rst b/share/man/container-limit.1.rst
index 67fad3d..715314e 100644
--- a/share/man/container-limit.1.rst
+++ b/share/man/container-limit.1.rst
@@ -1,6 +1,6 @@
.. Open Infrastructure: compute-tools
-.. Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+.. Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
..
.. SPDX-License-Identifier: GPL-3.0+
..
diff --git a/share/man/container-list.1.rst b/share/man/container-list.1.rst
index 6cd516f..81a394b 100644
--- a/share/man/container-list.1.rst
+++ b/share/man/container-list.1.rst
@@ -1,6 +1,6 @@
.. Open Infrastructure: compute-tools
-.. Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+.. Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
..
.. SPDX-License-Identifier: GPL-3.0+
..
diff --git a/share/man/container-log.1.rst b/share/man/container-log.1.rst
index 7984aa0..5e72184 100644
--- a/share/man/container-log.1.rst
+++ b/share/man/container-log.1.rst
@@ -1,6 +1,6 @@
.. Open Infrastructure: compute-tools
-.. Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+.. Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
..
.. SPDX-License-Identifier: GPL-3.0+
..
diff --git a/share/man/container-move.1.rst b/share/man/container-move.1.rst
index 550f1db..ecbea6b 100644
--- a/share/man/container-move.1.rst
+++ b/share/man/container-move.1.rst
@@ -1,6 +1,6 @@
.. Open Infrastructure: compute-tools
-.. Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+.. Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
..
.. SPDX-License-Identifier: GPL-3.0+
..
diff --git a/share/man/container-rebuild.1.rst b/share/man/container-rebuild.1.rst
new file mode 100644
index 0000000..345ec01
--- /dev/null
+++ b/share/man/container-rebuild.1.rst
@@ -0,0 +1,93 @@
+.. Open Infrastructure: compute-tools
+
+.. Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+..
+.. SPDX-License-Identifier: GPL-3.0+
+..
+.. This program is free software: you can redistribute it and/or modify
+.. it under the terms of the GNU General Public License as published by
+.. the Free Software Foundation, either version 3 of the License, or
+.. (at your option) any later version.
+..
+.. This program is distributed in the hope that it will be useful,
+.. but WITHOUT ANY WARRANTY; without even the implied warranty of
+.. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+.. GNU General Public License for more details.
+..
+.. You should have received a copy of the GNU General Public License
+.. along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+=================
+container-rebuild
+=================
+
+-------------------
+Restart a container
+-------------------
+
+:manual section: 1
+:manual group: Open Infrastructure
+
+Synopsis
+========
+
+| **container rebuild** ['OPTIONS']
+| **cnt rb** ['OPTIONS']
+
+Description
+===========
+
+The **container rebuild** command rebuilds a container by stopping, building, starting an existing container.
+
+Options
+=======
+
+The following **container rebuild** options are available:
+
+-n, --name='NAME':
+ Specify container name. Specifying 'ALL' will rebuild all started container.
+
+-f, --force:
+ Do not fail if container is running.
+
+-v, --verbose:
+ Explain what is being done.
+
+Examples
+========
+
+Rebuild example.net container:
+
+ sudo container rebuild -n example.net
+
+Restart all container:
+
+ sudo container rebuild -n ALL
+
+See also
+========
+
+| compute-tools(7),
+| container(1).
+
+Homepage
+========
+
+More information about compute-tools and the Open Infrastructure project can be
+found on the homepage (https://open-infrastructure.net).
+
+Contact
+=======
+
+Bug reports, feature requests, help, patches, support and everything else are
+welcome on the Open Infrastructure Software Mailing List
+<software@lists.open-infrastructure.net>.
+
+Debian specific bugs can also be reported in the Debian Bug Tracking System
+(https://bugs.debian.org).
+
+Authors
+=======
+
+compute-tools were written by Daniel Baumann
+<daniel.baumann@open-infrastructure.net> and others.
diff --git a/share/man/container-remove.1.rst b/share/man/container-remove.1.rst
index d62f527..00f1ad1 100644
--- a/share/man/container-remove.1.rst
+++ b/share/man/container-remove.1.rst
@@ -1,6 +1,6 @@
.. Open Infrastructure: compute-tools
-.. Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+.. Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
..
.. SPDX-License-Identifier: GPL-3.0+
..
diff --git a/share/man/container-restart.1.rst b/share/man/container-restart.1.rst
index fb98a78..bb2d4f1 100644
--- a/share/man/container-restart.1.rst
+++ b/share/man/container-restart.1.rst
@@ -1,6 +1,6 @@
.. Open Infrastructure: compute-tools
-.. Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+.. Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
..
.. SPDX-License-Identifier: GPL-3.0+
..
diff --git a/share/man/container-run.1.rst b/share/man/container-run.1.rst
index 9759811..0fb923d 100644
--- a/share/man/container-run.1.rst
+++ b/share/man/container-run.1.rst
@@ -1,6 +1,6 @@
.. Open Infrastructure: compute-tools
-.. Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+.. Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
..
.. SPDX-License-Identifier: GPL-3.0+
..
diff --git a/share/man/container-shell.1.rst b/share/man/container-shell.1.rst
index a41bd2a..b12958f 100644
--- a/share/man/container-shell.1.rst
+++ b/share/man/container-shell.1.rst
@@ -1,6 +1,6 @@
.. Open Infrastructure: compute-tools
-.. Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+.. Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
..
.. SPDX-License-Identifier: GPL-3.0+
..
diff --git a/share/man/container-start.1.rst b/share/man/container-start.1.rst
index b444c6e..65d4af7 100644
--- a/share/man/container-start.1.rst
+++ b/share/man/container-start.1.rst
@@ -1,6 +1,6 @@
.. Open Infrastructure: compute-tools
-.. Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+.. Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
..
.. SPDX-License-Identifier: GPL-3.0+
..
diff --git a/share/man/container-status.1.rst b/share/man/container-status.1.rst
index 79675be..ad51ba7 100644
--- a/share/man/container-status.1.rst
+++ b/share/man/container-status.1.rst
@@ -1,6 +1,6 @@
.. Open Infrastructure: compute-tools
-.. Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+.. Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
..
.. SPDX-License-Identifier: GPL-3.0+
..
diff --git a/share/man/container-stop.1.rst b/share/man/container-stop.1.rst
index 29bfa3d..31b24b4 100644
--- a/share/man/container-stop.1.rst
+++ b/share/man/container-stop.1.rst
@@ -1,6 +1,6 @@
.. Open Infrastructure: compute-tools
-.. Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+.. Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
..
.. SPDX-License-Identifier: GPL-3.0+
..
diff --git a/share/man/container-top.1.rst b/share/man/container-top.1.rst
index 8d1493c..85b3627 100644
--- a/share/man/container-top.1.rst
+++ b/share/man/container-top.1.rst
@@ -1,6 +1,6 @@
.. Open Infrastructure: compute-tools
-.. Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+.. Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
..
.. SPDX-License-Identifier: GPL-3.0+
..
diff --git a/share/man/container-update.1.rst b/share/man/container-update.1.rst
index 58dcb73..ec64f6b 100644
--- a/share/man/container-update.1.rst
+++ b/share/man/container-update.1.rst
@@ -1,6 +1,6 @@
.. Open Infrastructure: compute-tools
-.. Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+.. Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
..
.. SPDX-License-Identifier: GPL-3.0+
..
diff --git a/share/man/container-version.1.rst b/share/man/container-version.1.rst
index 3a57999..3f0266d 100644
--- a/share/man/container-version.1.rst
+++ b/share/man/container-version.1.rst
@@ -1,6 +1,6 @@
.. Open Infrastructure: compute-tools
-.. Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+.. Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
..
.. SPDX-License-Identifier: GPL-3.0+
..
diff --git a/share/man/container.1.rst b/share/man/container.1.rst
index 3fff87b..c08cbd9 100644
--- a/share/man/container.1.rst
+++ b/share/man/container.1.rst
@@ -1,6 +1,6 @@
.. Open Infrastructure: compute-tools
-.. Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+.. Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
..
.. SPDX-License-Identifier: GPL-3.0+
..
@@ -59,6 +59,9 @@ build:
start:
Start a container, see container-start(1).
+rebuild:
+ Rebuild a container, see container-rebuild(1).
+
restart:
Restart a container, see container-restart(1).
diff --git a/share/man/man.in b/share/man/man.in
index 9e8de0e..45a5f40 100644
--- a/share/man/man.in
+++ b/share/man/man.in
@@ -1,6 +1,6 @@
.\" Open Infrastructure: compute-tools
.\"
-.\" Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+.\" Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
.\"
.\" SPDX-License-Identifier: GPL-3.0+
.\"