Merge "Ensure ss or netstat command is available during log collection"

This commit is contained in:
Zuul 2019-10-08 15:36:39 +00:00 committed by Gerrit Code Review
commit 93920cfe3f

View File

@ -259,6 +259,19 @@ function info_block {
}
function log_instance_info {
# ensure packages are installed to get instance info
determine_distro
case ${DISTRO_ID} in
ubuntu|debian)
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get -y install iproute2 net-tools
;;
centos|rhel)
# Prefer dnf over yum for CentOS.
which dnf &>/dev/null && RHT_PKG_MGR='dnf' || RHT_PKG_MGR='yum'
$RHT_PKG_MGR -y install iproute
;;
esac
set +x
# Get host information post initial setup and reset verbosity
if [ ! -d "/openstack/log/instance-info" ];then