labs: add script to shut down controller node
Add a single-purpose script to shut down the controller node from another node. Change-Id: Ic70e211a8fd3e8ad4c448045b65000be209b00de
This commit is contained in:
1 changed files with 18 additions and 0 deletions
18
labs/scripts/shutdown_controller.sh
Executable file
18
labs/scripts/shutdown_controller.sh
Executable file
@@ -0,0 +1,18 @@
#!/usr/bin/env bash
set -o errexit -o nounset
TOP_DIR=$(cd $(dirname "0ドル")/.. && pwd)
source "$TOP_DIR/config/paths"
source "$LIB_DIR/functions.guest"
indicate_current_auto
exec_logfile
echo "Shutting down the controller node."
ssh \
-o "UserKnownHostsFile /dev/null" \
-o "StrictHostKeyChecking no" \
-i "$HOME/.ssh/vagrant" \
controller-mgmt \
sudo /sbin/shutdown -P now
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.