Removed hardcoded packages installation, Added automatic installation
This commit is contained in:
Родитель
9469376754
Коммит
18707c62d3
|
@ -4382,7 +4382,7 @@
|
|||
<testName>ICA-IO-DISK-PERF-TEST-RAID</testName>
|
||||
<testScript>io-test-setup.sh</testScript>
|
||||
<testScriptps1>ICA-IO-DISK-PERF-TEST.ps1</testScriptps1>
|
||||
<files>.\remote-scripts\sysbench-full-io-test.sh,.\remote-scripts\sysbench-log-parser.sh,.\remote-scripts\io-test-setup.sh,.\remote-scripts\keep_cmds_in_startup.sh</files>
|
||||
<files>.\remote-scripts\sysbench-full-io-test.sh,.\remote-scripts\azuremodules.sh,.\remote-scripts\sysbench-log-parser.sh,.\remote-scripts\io-test-setup.sh,.\remote-scripts\keep_cmds_in_startup.sh</files>
|
||||
<setupType>D14DISK32</setupType>
|
||||
<!-- <setupType>DS14DISK32</setupType> -->
|
||||
<TestType></TestType>
|
||||
|
@ -4396,7 +4396,7 @@
|
|||
<testName>ICA-IO-DISK-PERF-TEST-LVM</testName>
|
||||
<testScript>io-test-setup.sh</testScript>
|
||||
<testScriptps1>ICA-IO-DISK-PERF-TEST.ps1</testScriptps1>
|
||||
<files>.\remote-scripts\sysbench-full-io-test.sh,.\remote-scripts\sysbench-log-parser.sh,.\remote-scripts\io-test-setup.sh,.\remote-scripts\keep_cmds_in_startup.sh</files>
|
||||
<files>.\remote-scripts\sysbench-full-io-test.sh,.\remote-scripts\azuremodules.sh,.\remote-scripts\sysbench-log-parser.sh,.\remote-scripts\io-test-setup.sh,.\remote-scripts\keep_cmds_in_startup.sh</files>
|
||||
<setupType>D14DISK32</setupType>
|
||||
<!-- <setupType>DS14DISK32</setupType> -->
|
||||
<TestType></TestType>
|
||||
|
|
|
@ -35,7 +35,6 @@ if ($isDeployed)
|
|||
|
||||
$KernelVersion = RunLinuxCmd -username $user -password $password -ip $hs1VIP -port $hs1vm1sshport -command "uname -a" -runAsSudo
|
||||
LogMsg "VM1 kernel version:- $KernelVersion"
|
||||
$out = RunLinuxCmd -username $user -password $password -ip $hs1VIP -port $hs1vm1sshport -command "yum install -y lvm2" -runAsSudo
|
||||
$out = RunLinuxCmd -username $user -password $password -ip $hs1VIP -port $hs1vm1sshport -command "bash /home/$user/code/$($currentTestData.testScript) $user $DiskType" -runAsSudo -runmaxallowedtime 7200
|
||||
$iosetupStatus = RunLinuxCmd -username $user -password $password -ip $hs1VIP -port $hs1vm1sshport -command "cat /home/$user/code/iotest.log.txt | grep 'mount: Success'" -runAsSudo
|
||||
if ($iosetupStatus -imatch 'mount: Success')
|
||||
|
|
|
@ -9,11 +9,20 @@
|
|||
# Email : v-srm@microsoft.com
|
||||
#
|
||||
#####
|
||||
username=$1
|
||||
test_type=$2
|
||||
if [[ $# == 2 ]]
|
||||
then
|
||||
username=$1
|
||||
test_type=$2
|
||||
else
|
||||
echo "Usage: bash $0 <vm_loginuser> <LVM / RAID>"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
mountdir="/dataIOtest"
|
||||
code_path="/home/$username/code"
|
||||
code_path="/home/$username/code/"
|
||||
. $code_path/azuremodules.sh
|
||||
|
||||
LOGFILE="${code_path}/iotest.log.txt"
|
||||
[ -d $mountdir ] && umount $mountdir && rm -rf $mountdir
|
||||
mkdir $mountdir
|
||||
|
@ -23,6 +32,9 @@ list=(`fdisk -l | grep 'Disk.*/dev/sd[a-z]' |awk '{print $2}' | sed s/://| sort
|
|||
lsblk >> $LOGFILE
|
||||
|
||||
if [ "$test_type" == "LVM" ]; then
|
||||
|
||||
install_package lvm2
|
||||
|
||||
deviceName="/dev/vg1/lv1"
|
||||
echo "--- LVM $deviceName creation started ---" >> $LOGFILE
|
||||
|
||||
|
@ -60,6 +72,7 @@ if [ "$test_type" == "LVM" ]; then
|
|||
echo "UUID=$uuid $mountdir ext4 defaults,barrier=0 0 2" >> /etc/fstab
|
||||
|
||||
elif [ "$test_type" == "RAID" ]; then
|
||||
install_package mdadm
|
||||
count=0
|
||||
while [ "x${list[count]}" != "x" ]
|
||||
do
|
||||
|
|
Загрузка…
Ссылка в новой задаче