
Old location: /etc/nova/openrc New location: /etc/platform/openrc The collect script exclude folder is also updated since /etc/nova and etc/cinder no longer exist on baremetal. Story: 2004764 Task: 29907 Change-Id: Iae521fb1d6d394f7ffcf474e7726963215b88bcd Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
38 lines
931 B
Bash
38 lines
931 B
Bash
#!/bin/bash
|
|
# Purpose:
|
|
# Remote stop engtools on all blades.
|
|
|
|
# Define common utility functions
|
|
TOOLBIN=$(dirname $0)
|
|
. ${TOOLBIN}/engtools_util.sh
|
|
if [ $UID -eq 0 ]; then
|
|
ERRLOG "Do not start $0 using sudo/root access."
|
|
exit 1
|
|
fi
|
|
|
|
# environment for system commands
|
|
source /etc/platform/openrc
|
|
|
|
declare -a BLADES
|
|
BLADES=( $(system host-list | awk '(/compute|controller|storage/) {print $4;}') )
|
|
|
|
LOG "Remote stop engtools on all blades:"
|
|
for blade in ${BLADES[@]}; do
|
|
if [ "${blade}" == "${HOSTNAME}" ]; then
|
|
LOG "stop on $blade:"
|
|
sudo service collect-engtools.sh stop
|
|
else
|
|
ping -c1 ${blade} 1>/dev/null 2>/dev/null
|
|
if [ $? -eq 0 ]; then
|
|
LOG "stop on $blade:"
|
|
ssh -q -t -o StrictHostKeyChecking=no \
|
|
${blade} sudo service collect-engtools.sh stop
|
|
else
|
|
WARNLOG "cannot ping: ${blade}"
|
|
fi
|
|
fi
|
|
done
|
|
LOG "done"
|
|
|
|
exit 0
|