Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
synnefo
Commits
00becd3f
Commit
00becd3f
authored
Jul 23, 2012
by
John Giannelos
Browse files
Split cronjob example to snf-burnin run and check scripts
parent
2cac78bb
Changes
3
Hide whitespace changes
Inline
Side-by-side
snf-tools/conf/snf-burnin-output.sh
0 → 100644
View file @
00becd3f
#! /bin/bash
#Example script to check current status.
#Checks for testcases that failed the last 30 minutes in a given folder.
#Usage: ./check-burnin-output.sh LOG_FOLDER
curr
=
$(
date
-d
"30 minutes ago"
+%Y%m%d%H%M%S
)
for
dir
in
${
1
}
/
*
;
do
d
=
`
basename
$dir
`
if
((
$d
>
$curr
))
;
then
if
find
"
$dir
"
/
*
-type
f
-size
+0 |
grep
failed
>
/dev/null
;
then
echo
snf-burnin encountered a testcase failure. See log
for
details...
exit
1
fi
echo
No testcase failure encountered...
exit
0
fi
done
\ No newline at end of file
snf-tools/conf/snf-burnin-run.sh
0 → 100644
View file @
00becd3f
#! /bin/bash
#Example script for an snf-burnin cronjob.
#Starts an a snf-burnin test, deletes stale instances and archives old logs.
#It aborts if snf-burnin runs for longer than expected.
#Usage: ./snf-burnin.cron.example TOKEN IMAGE-ID LOG-FOLDER
timeout
28m snf-burnin
--token
=
"
$1
"
--image-id
=
"
$2
"
--action-timeout
120
--log-folder
"
$3
"
snf-burnin
--token
=
"
$1
"
--delete-stale
#Delete old folders
old
=
$(
date
-d
"1 week ago"
+%Y%m%d%H%M%S
)
for
dir
in
${
3
}
/
*
;
do
d
=
`
basename
$dir
`
((
$d
<
$old
))
&&
rm
-r
"
$dir
"
done
snf-tools/conf/snf-burnin.cron.example
deleted
100644 → 0
View file @
2cac78bb
#! /bin/bash
#Example script for an snf-burnin cronjob
#Usage snf-burnin.cron.example TOKEN IMAGE-ID LOG-FOLDER
snf-burnin
--token
=
"
$1
"
--delete-stale
snf-burnin
--token
=
"
$1
"
--image-id
=
"
$2
"
--action-timeout
120
--log-folder
"
$3
"
#Delete old folders
old
=
$(
date
-d
"30 minutes ago"
+%Y%m%d%H%M%S
)
for
dir
in
${
3
}
/
*
;
do
d
=
`
basename
$dir
`
((
$d
<
$old
))
&&
rm
-r
"
$dir
"
done
#Check for failed testcases
curr
=
$(
date
-d
"30 minutes ago"
+%Y%m%d%H%M%S
)
for
dir
in
${
3
}
/
*
;
do
d
=
`
basename
$dir
`
if
((
$d
>
$curr
))
;
then
if
find
"
$dir
"
/
*
-type
f
-size
+0 |
grep
failed
>
/dev/null
;
then
echo
snf-burnin encountered a
test
failure. See log
for
details...
exit
1
fi
echo
No testcase failure encountered
exit
0
fi
done
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment