utilities/tools/collector/scripts/collect_ovs.sh
Sun Austin d6e12fd97b change 'compute' to 'worker' in collect utils
command 'collect' in worker node will be stuck since
node_type has been changed from 'compute' to 'worker'

Closes-bug: 1810478

Change-Id: I4547bae650b8bb56110eb145e0aca0d49496c793
Signed-off-by: Sun Austin <austin.sun@intel.com>
2019-01-05 09:35:04 +08:00

36 lines
1.0 KiB
Bash

#! /bin/bash
########################################################################
#
# Copyright (c) 2018 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
########################################################################
# Loads Up Utilities and Commands Variables
source /usr/local/sbin/collect_parms
source /usr/local/sbin/collect_utils
SERVICE="ovs"
LOGFILE="${extradir}/${SERVICE}.info"
###############################################################################
# Only Worker Nodes
###############################################################################
if [[ "$nodetype" == "worker" || "$subfunction" == *"worker"* ]] ; then
if [[ "$vswitch_type" == *ovs* ]]; then
echo "${hostname}: OVS Info ..........: ${LOGFILE}"
delimiter ${LOGFILE} "ovsdb-client dump"
ovsdb-client dump >> ${LOGFILE} 2>>${COLLECT_ERROR_LOG}
delimiter ${LOGFILE} "ovs-vsctl show"
ovs-vsctl --timeout 10 show >> ${LOGFILE} 2>>${COLLECT_ERROR_LOG}
fi
fi
exit 0