Skip to content
Snippets Groups Projects
Commit f63eed35 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

devel/upload: Add --no-restart option

If --no-restart is passed to devel/upload, it'll not run
"/etc/init.d/ganeti restart" (which kills processes), making
debugging on a terminal a bit easier.

Reviewed-by: iustinp, ultrotter
parent 00fb8246
No related branches found
No related tags found
No related merge requests found
...@@ -26,6 +26,28 @@ ...@@ -26,6 +26,28 @@
# $prefix/sbin. It needs passwordless root login to the nodes. # $prefix/sbin. It needs passwordless root login to the nodes.
set -e set -e
NO_RESTART=
hosts=
while [ "$#" -gt 0 ]; do
opt="$1"
case "$opt" in
--no-restart)
NO_RESTART=1
;;
-*)
echo "Unknown option: $opt" >&2
exit 1
;;
*)
hosts="$hosts $opt"
;;
esac
shift
done
set ${hosts}
TXD=`mktemp -d` TXD=`mktemp -d`
trap 'rm -rf $TXD' EXIT trap 'rm -rf $TXD' EXIT
...@@ -63,8 +85,10 @@ if [ -f ganeti-master-cron ]; then ...@@ -63,8 +85,10 @@ if [ -f ganeti-master-cron ]; then
fi fi
wait wait
for host; do if test -z "${NO_RESTART}"; then
echo Restarting ganeti-noded on ${host}... for host; do
ssh root@${host} /etc/init.d/ganeti restart & echo Restarting ganeti-noded on ${host}...
done ssh root@${host} /etc/init.d/ganeti restart &
wait done
wait
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment