From 80baf48ddef352fd1f8f937b94a0f36edf9f3721 Mon Sep 17 00:00:00 2001 From: Shital Savekar Date: Mon, 19 Jun 2017 16:13:04 +0530 Subject: [PATCH] Fixed storage and network perf tests for some distros. --- remote-scripts/perf_fio.sh | 93 +++++++---------------------------- remote-scripts/perf_iperf3.sh | 14 +++--- 2 files changed, 24 insertions(+), 83 deletions(-) diff --git a/remote-scripts/perf_fio.sh b/remote-scripts/perf_fio.sh index 6cdb65e..d4dc0a1 100644 --- a/remote-scripts/perf_fio.sh +++ b/remote-scripts/perf_fio.sh @@ -70,94 +70,35 @@ InstallFIO() { elif [[ $DISTRO =~ "Red Hat Enterprise Linux Server release 6" ]]; then - LogMsg "Detected Redhat 6.x" - fioCentOS6pkg="fio-2.1.10-1.el6.rf.x86_64.rpm" - LogMsg "INFO: installing required packages" - yum install -y wget sysstat mdadm blktrace libaio - mount -t debugfs none /sys/kernel/debug - installed=`which fio` - if [ ! $installed ]; then - LogMsg "INFO: Installing fio" - - fiolPkg=$(ls | grep ${fioCentOS6pkg}) - if [ -z "$fiolPkg" ]; then - wget "https://konkasoftpackages.blob.core.windows.net/linuxbinaries/${fioCentOS6pkg}" - fi - yum install -y libibverbs.x86_64 - yum install -y ${fioCentOS6pkg} - if [ $? -ne 0 ]; then - LogMsg "Error: Unable to install fio" - exit 1 - fi - fi + LogMsg "Detected RHEL 6.x" + LogMsg "INFO: installing required packages" + rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm + yum -y --nogpgcheck install wget sysstat mdadm blktrace libaio fio + mount -t debugfs none /sys/kernel/debug elif [[ $DISTRO =~ "Red Hat Enterprise Linux Server release 7" ]]; then - fioCentOS7pkg="fio-2.2.8-2.el7.x86_64.rpm" + LogMsg "Detected RHEL 7.x" LogMsg "INFO: installing required packages" - yum install -y wget sysstat mdadm blktrace libaio + rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm + yum -y --nogpgcheck install wget sysstat mdadm blktrace libaio fio mount -t debugfs none /sys/kernel/debug - - installed=`which fio` - if [ ! $installed ]; then - LogMsg "INFO: Installing fio" - - fiolPkg=$(ls | grep ${fioCentOS7pkg}) - if [ -z "$fiolPkg" ]; then - wget "https://konkasoftpackages.blob.core.windows.net/linuxbinaries/${fioCentOS7pkg}" - fi - yum install -y ${fioCentOS7pkg} - if [ $? -ne 0 ]; then - LogMsg "Error: Unable to install fio" - exit 1 - fi - fi - elif [[ $DISTRO =~ "CentOS Linux release 6" ]]; + elif [[ $DISTRO =~ "CentOS Linux release 6" ]] || [[ $DISTRO =~ "CentOS release 6" ]]; then - LogMsg "Detected CentOS 6.x" - fioCentOS6pkg="fio-2.1.10-1.el6.rf.x86_64.rpm" - LogMsg "INFO: installing required packages" - yum install -y wget sysstat mdadm blktrace libaio - mount -t debugfs none /sys/kernel/debug - - installed=`which fio` - if [ ! $installed ]; then - LogMsg "INFO: Installing fio" - - fiolPkg=$(ls | grep ${fioCentOS6pkg}) - if [ -z "$fiolPkg" ]; then - wget "https://konkasoftpackages.blob.core.windows.net/linuxbinaries/${fioCentOS6pkg}" - fi - yum install -y libibverbs.x86_64 - yum install -y ${fioCentOS6pkg} - if [ $? -ne 0 ]; then - LogMsg "Error: Unable to install fio" - exit 1 - fi - fi + LogMsg "Detected CentOS 6.x" + LogMsg "INFO: installing required packages" + rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm + yum -y --nogpgcheck install wget sysstat mdadm blktrace libaio fio + mount -t debugfs none /sys/kernel/debug elif [[ $DISTRO =~ "CentOS Linux release 7" ]]; then - fioCentOS7pkg="fio-2.2.8-2.el7.x86_64.rpm" + LogMsg "Detected CentOS 7.x" LogMsg "INFO: installing required packages" - yum install -y wget sysstat mdadm blktrace libaio + rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm + yum -y --nogpgcheck install wget sysstat mdadm blktrace libaio fio mount -t debugfs none /sys/kernel/debug - - installed=`which fio` - if [ ! $installed ]; then - LogMsg "INFO: Installing fio" - - fiolPkg=$(ls | grep ${fioCentOS7pkg}) - if [ -z "$fiolPkg" ]; then - wget "https://konkasoftpackages.blob.core.windows.net/linuxbinaries/${fioCentOS7pkg}" - fi - yum install -y ${fioCentOS7pkg} - if [ $? -ne 0 ]; then - LogMsg "Error: Unable to install fio" - exit 1 - fi - fi elif [[ $DISTRO =~ "SUSE Linux Enterprise Server 12" ]]; then diff --git a/remote-scripts/perf_iperf3.sh b/remote-scripts/perf_iperf3.sh index 4ca4309..639422e 100644 --- a/remote-scripts/perf_iperf3.sh +++ b/remote-scripts/perf_iperf3.sh @@ -56,16 +56,16 @@ InstallIPERF3() ssh ${1} "chmod +x ConfigureUbuntu1604IPv6.sh" ssh ${1} "./ConfigureUbuntu1604IPv6.sh" fi - - elif [[ $DISTRO =~ "Red Hat Enterprise Linux Server release 7.3" ]]; + elif [[ $DISTRO =~ "Red Hat Enterprise Linux Server release 6" ]] || [[ $DISTRO =~ "CentOS Linux release 6" ]] || [[ $DISTRO =~ "CentOS release 6" ]]; then - LogMsg "Detected Redhat 7.x" - ssh ${1} "rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm" + LogMsg "Detected Redhat/CentOS 6.x" + ssh ${1} "rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm" ssh ${1} "yum -y --nogpgcheck install iperf3 sysstat bc" - ssh ${1} "iptables -F" - elif [[ $DISTRO =~ "CentOS Linux release 7" ]]; + ssh ${1} "iptables -F" + + elif [[ $DISTRO =~ "Red Hat Enterprise Linux Server release 7" ]] || [[ $DISTRO =~ "CentOS Linux release 7" ]]; then - LogMsg "Detected CentOS 7.x" + LogMsg "Detected Redhat/CentOS 7.x" ssh ${1} "rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm" ssh ${1} "yum -y --nogpgcheck install iperf3 sysstat bc" ssh ${1} "iptables -F"