-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Depdendency upgrade for next release (#1486)
* Depdendency upgrade for next release
- Loading branch information
1 parent
bd0f411
commit 2c1781e
Showing
6 changed files
with
128 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
# Install esseentials | ||
sudo apt-get install git fakeroot build-essential ncurses-dev xz-utils libssl-dev bc flex libelf-dev bison -y | ||
|
||
# Get to mount path | ||
cd $1 | ||
version=$2 | ||
|
||
# Download kernel tar ball | ||
wget https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-$version.tar.xz | ||
|
||
# Extract tarball | ||
tar -xvf linux-$version.tar.xz | ||
|
||
# Create default config | ||
cd linux-$version | ||
make defconfig | ||
|
||
# build the kernel | ||
make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,82 @@ | ||
SERVICE="blobfuse2" | ||
SCRIPT="longhaul.sh" | ||
WORKDIR="/home/blobfuse/azure-storage-fuse" | ||
|
||
# To create ramdisk | ||
# sudo mkdir -p /mnt/ramdisk | ||
# sudo chmod 777 /mnt/ramdisk | ||
# sudo mount -t tmpfs -o rw,size=4G tmpfs /mnt/ramdisk | ||
echo "Staring script" | ||
if pgrep -x "$SERVICE" > /dev/null | ||
then | ||
echo "Check existing run" | ||
#count=`ps -aux | grep $SCRIPT | wc -l` | ||
#echo "Existing run count : $count" | ||
|
||
if [ -e "longhaul.lock" ] | ||
then | ||
echo "Script already running" | ||
echo "`date` :: Already running" >> $WORKDIR/longhaul.log | ||
else | ||
touch longhaul.lock | ||
echo "New script start" | ||
if [ `stat -c %s $WORKDIR/longhaul.log` -gt 10485760 ] | ||
then | ||
echo "`date` :: Trimmed " > $WORKDIR/longhaul.log | ||
fi | ||
|
||
SERVICE="blobfuse2" | ||
SCRIPT="longhaul.sh" | ||
echo "`whoami` : `date` :: `$WORKDIR/blobfuse2 --version` Starting test " >> $WORKDIR/longhaul.log | ||
|
||
# To create ramdisk | ||
# sudo mount -t tmpfs -o rw,size=4G tmpfs /mnt/ramdisk | ||
mem=$(top -b -n 1 -p `pgrep -x blobfuse2` | tail -1) | ||
elap=$( ps -p `pgrep -x blobfuse2` -o etime | tail -1) | ||
echo $mem " :: " $elap >> $WORKDIR/longhaul.log | ||
|
||
cd /home/vibhansa/go/src/azure-storage-fuse/ | ||
echo "Delete old data" | ||
echo "`date` : Cleanup old test data" >> $WORKDIR/longhaul.log | ||
rm -rf /blob_mnt/kernel | ||
|
||
if pgrep -x "$SERVICE" > /dev/null | ||
then | ||
if pgrep -x "$SCRIPT" > /dev/null | ||
then | ||
echo "`date` :: Already running" >> ./longhaul2.log | ||
else | ||
if [ `stat -c %s ./longhaul2.log` -gt 10485760 ] | ||
then | ||
echo "`date` :: Trimmed " > ./longhaul2.log | ||
fi | ||
|
||
echo "`whoami` : `date` :: `./blobfuse2 --version` Starting stress test " >> ./longhaul2.log | ||
|
||
mem=$(top -b -n 1 -p `pgrep -x blobfuse2` | tail -1) | ||
elap=$( ps -p `pgrep -x blobfuse2` -o etime | tail -1) | ||
echo $mem " :: " $elap >> ./longhaul2.log | ||
|
||
rm -rf /home/vibhansa/blob_mnt2/stress | ||
rm -rf /home/vibhansa/blob_mnt2/myfile* | ||
|
||
#go test -timeout 120m -v ./test/stress_test/stress_test.go -args -mnt-path=/home/vibhansa/blob_mnt2 -quick=false 2&> ./stress.log | ||
./test/longhaul/stresstest.sh | ||
echo "`whoami` : `date` :: Ending stress test " >> ./longhaul2.log | ||
cp ./longhaul2.log /home/vibhansa/blob_mnt2/ | ||
cp ./stress.log /home/vibhansa/blob_mnt2/ | ||
|
||
sleep 30 | ||
|
||
rm -rf /mnt/ramdisk/* | ||
rm -rf /home/vibhansa/blob_mnt2/stress | ||
sudo rm -rf /var/log/blob*.gz | ||
fi | ||
echo "Start test" | ||
echo "`date` : Building Kernel" >> $WORKDIR/longhaul.log | ||
mkdir /blob_mnt/kernel | ||
$WORKDIR/build_kernel.sh /blob_mnt/kernel/ 6.10.2 | ||
|
||
if [ $? -ne 0 ]; then | ||
echo "`date` : Make Failed" >> $WORKDIR/longhaul.log | ||
fi | ||
echo "End test" | ||
echo "`date` : Kernel Build complete" >> $WORKDIR/longhaul.log | ||
|
||
sleep 30 | ||
echo "Cleanup post test" | ||
rm -rf /blob_mnt/test/* | ||
rm -rf /blob_mnt/kernel | ||
|
||
cp $WORKDIR/longhaul.log /blob_mnt/ | ||
rm -rf longhaul.lock | ||
fi | ||
else | ||
echo "`date` :: Re-Starting blobfuse2 *******************" >> ./longhaul2.log | ||
rm -rf /home/vibhansa/blob_mnt2/* | ||
rm -rf /mnt/ramdisk/* | ||
sudo fusermount -u ~/blob_mnt2 | ||
rm -rf /mnt/ramdisk/* | ||
./blobfuse2 mount ~/blob_mnt2 --config-file=./config.yaml | ||
sleep 2 | ||
|
||
if [ `stat -c %s ./restart2.log` -gt 10485760 ] | ||
then | ||
echo "`date` Trimmed " > ./restart2.log | ||
fi | ||
echo "`date`: Restart : `./blobfuse2 --version`" >> ./restart2.log | ||
|
||
# Send email that blobfuse2 has crashed | ||
echo "Blobfuse2 Failure" | mail -s "Blobfuse2 Restart" -A ./restart2.log -a "From: [email protected]" [email protected] | ||
|
||
cp /var/log/blobfuse2.log /home/vibhansa/blob_mnt2/ | ||
cp ./longhaul2.log /home/vibhansa/blob_mnt2/ | ||
cp ./restart2.log /home/vibhansa/blob_mnt2/ | ||
fi | ||
echo "Blobfuse not running" | ||
echo "`date` :: Re-Starting blobfuse2 *******************" >> $WORKDIR/longhaul.log | ||
$WORKDIR/blobfuse2 unmount all | ||
|
||
rm -rf /blob_mnt/* | ||
|
||
export AZURE_STORAGE_ACCOUNT=vikasfuseblob | ||
export AZURE_STORAGE_AUTH_TYPE=msi | ||
export AZURE_STORAGE_IDENTITY_CLIENT_ID=1f1551d2-2db2-4d4d-a6f5-d7edbe75d98e | ||
|
||
echo "Start blobfuse" | ||
$WORKDIR/blobfuse2 mount /blob_mnt --log-level=log_debug --log-file-path=$WORKDIR/blobfuse2.log --log-type=base --block-cache --container-name=longhaul | ||
|
||
sleep 2 | ||
|
||
if [ `stat -c %s $WORKDIR/restart.log` -gt 10485760 ] | ||
then | ||
echo "`date` Trimmed " > $WORKDIR/restart.log | ||
fi | ||
echo "`date`: Restart : `$WORKDIR/blobfuse2 --version`" >> $WORKDIR/restart.log | ||
|
||
echo "Send mail" | ||
# Send email that blobfuse2 has crashed | ||
echo "Blobfuse2 Failure" | mail -s "Blobfuse2 Restart" -A $WORKDIR/restart.log -a "From: [email protected]" [email protected] | ||
|
||
cp $WORKDIR/blobfuse2.log /blob_mnt/ | ||
cp $WORKDIR/longhaul.log /blob_mnt/ | ||
cp $WORKDIR/restart.log /blob_mnt/ | ||
fi |