Merge "change 'compute' to 'worker' in collect utils"

This commit is contained in:
Zuul 2019-01-10 15:12:24 +00:00 committed by Gerrit Code Review
commit 5d7ebb734c
5 changed files with 14 additions and 14 deletions

View File

@ -207,8 +207,8 @@ function print_help()
echo "collect --all --start-date 20150101 ... logs dated on and after Jan 1 2015 from all hosts" echo "collect --all --start-date 20150101 ... logs dated on and after Jan 1 2015 from all hosts"
echo "collect --all --start-date 20151101 --end-date 20160201 ... logs dated between Nov 1, 2015 and Feb 1 2016 from all hosts" echo "collect --all --start-date 20151101 --end-date 20160201 ... logs dated between Nov 1, 2015 and Feb 1 2016 from all hosts"
echo "collect --start-date 20151101 --end-date 20160201 ... only logs dated between Nov 1, 2015 and Feb 1 2016 for current host" echo "collect --start-date 20151101 --end-date 20160201 ... only logs dated between Nov 1, 2015 and Feb 1 2016 for current host"
echo "collect --list controller-0 compute-0 storage-0 ... all logs from specified host list" echo "collect --list controller-0 worker-0 storage-0 ... all logs from specified host list"
echo "collect --list controller-0 compute-1 --end-date 20160201 ... only logs before Nov 1, 2015 for host list" echo "collect --list controller-0 worker-1 --end-date 20160201 ... only logs before Nov 1, 2015 for host list"
echo "collect --list controller-1 storage-0 --start-date 20160101 ... only logs after Jan 1 2016 for controller-1 and storage-0" echo "collect --list controller-1 storage-0 --start-date 20160101 ... only logs after Jan 1 2016 for controller-1 and storage-0"
echo "" echo ""
exit 0 exit 0

View File

@ -164,8 +164,8 @@ function collect_extra()
delimiter ${LOGFILE} "pstree --arguments --ascii --long --show-pids" delimiter ${LOGFILE} "pstree --arguments --ascii --long --show-pids"
pstree --arguments --ascii --long --show-pids >> ${LOGFILE} pstree --arguments --ascii --long --show-pids >> ${LOGFILE}
# Collect process, thread and scheduling info (compute subfunction only) # Collect process, thread and scheduling info (worker subfunction only)
# (also gets process 'affinity' which is useful on computes; # (also gets process 'affinity' which is useful on workers;
which ps-sched.sh >/dev/null 2>&1 which ps-sched.sh >/dev/null 2>&1
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
delimiter ${LOGFILE} "ps-sched.sh" delimiter ${LOGFILE} "ps-sched.sh"
@ -226,7 +226,7 @@ function collect_extra()
facter >> ${LOGFILE} 2>>${COLLECT_ERROR_LOG} facter >> ${LOGFILE} 2>>${COLLECT_ERROR_LOG}
fi fi
if [[ "$nodetype" == "compute" || "$subfunction" == *"compute"* ]] ; then if [[ "$nodetype" == "worker" || "$subfunction" == *"worker"* ]] ; then
delimiter ${LOGFILE} "topology" delimiter ${LOGFILE} "topology"
topology >> ${LOGFILE} 2>>${COLLECT_ERROR_LOG} topology >> ${LOGFILE} 2>>${COLLECT_ERROR_LOG}
fi fi
@ -323,18 +323,18 @@ function collect_extra()
delimiter ${LOGFILE} "targetcli sessions detail" delimiter ${LOGFILE} "targetcli sessions detail"
targetcli sessions detail >> ${LOGFILE} 2>>${COLLECT_ERROR_LOG} targetcli sessions detail >> ${LOGFILE} 2>>${COLLECT_ERROR_LOG}
elif [[ "$nodetype" == "compute" || "$subfunction" == *"compute"* ]] ; then elif [[ "$nodetype" == "worker" || "$subfunction" == *"worker"* ]] ; then
# Compute - iSCSI initiator information # Worker - iSCSI initiator information
collect_dir=${EXTRA_DIR}/iscsi_initiator_info collect_dir=${EXTRA_DIR}/iscsi_initiator_info
mkdir -p ${collect_dir} mkdir -p ${collect_dir}
cp -rf /run/iscsi-cache/nodes/* ${collect_dir} cp -rf /run/iscsi-cache/nodes/* ${collect_dir}
find ${collect_dir} -type d -exec chmod 750 {} \; find ${collect_dir} -type d -exec chmod 750 {} \;
# Compute - iSCSI initiator active sessions # Worker - iSCSI initiator active sessions
delimiter ${LOGFILE} "iscsiadm -m session" delimiter ${LOGFILE} "iscsiadm -m session"
iscsiadm -m session >> ${LOGFILE} 2>>${COLLECT_ERROR_LOG} iscsiadm -m session >> ${LOGFILE} 2>>${COLLECT_ERROR_LOG}
# Compute - iSCSI udev created nodes # Worker - iSCSI udev created nodes
delimiter ${LOGFILE} "ls -la /dev/disk/by-path | grep \"iqn\"" delimiter ${LOGFILE} "ls -la /dev/disk/by-path | grep \"iqn\""
ls -la /dev/disk/by-path | grep "iqn" >> ${LOGFILE} 2>>${COLLECT_ERROR_LOG} ls -la /dev/disk/by-path | grep "iqn" >> ${LOGFILE} 2>>${COLLECT_ERROR_LOG}
fi fi

View File

@ -44,9 +44,9 @@ iptables -L -v -x -n -t mangle >> ${LOGFILE} 2>>${COLLECT_ERROR_LOG}
############################################################################### ###############################################################################
# Only Compute # Only Worker
############################################################################### ###############################################################################
if [[ "$nodetype" = "compute" || "$subfunction" == *"compute"* ]] ; then if [[ "$nodetype" = "worker" || "$subfunction" == *"worker"* ]] ; then
NAMESPACES=($(ip netns)) NAMESPACES=($(ip netns))
for NS in ${NAMESPACES[@]}; do for NS in ${NAMESPACES[@]}; do
delimiter ${LOGFILE} "${NS}" delimiter ${LOGFILE} "${NS}"

View File

@ -17,9 +17,9 @@ LOGFILE="${extradir}/${SERVICE}.info"
############################################################################### ###############################################################################
# Only Compute Nodes # Only Worker Nodes
############################################################################### ###############################################################################
if [[ "$nodetype" == "compute" || "$subfunction" == *"compute"* ]] ; then if [[ "$nodetype" == "worker" || "$subfunction" == *"worker"* ]] ; then
if [[ "$vswitch_type" == *ovs* ]]; then if [[ "$vswitch_type" == *ovs* ]]; then
echo "${hostname}: OVS Info ..........: ${LOGFILE}" echo "${hostname}: OVS Info ..........: ${LOGFILE}"

View File

@ -76,7 +76,7 @@ if [ -e ${PLATFORM_CONF} ] ; then
source ${PLATFORM_CONF} source ${PLATFORM_CONF}
fi fi
if [ "${nodetype}" != "controller" -a "${nodetype}" != "compute" -a "${nodetype}" != "storage" ] ; then if [ "${nodetype}" != "controller" -a "${nodetype}" != "worker" -a "${nodetype}" != "storage" ] ; then
logger -t ${COLLECT_TAG} "could not identify nodetype ($nodetype)" logger -t ${COLLECT_TAG} "could not identify nodetype ($nodetype)"
exit $FAIL_NODETYPE exit $FAIL_NODETYPE
fi fi