2013-09-24 01:14:28 +00:00
|
|
|
#!/bin/bash
|
2012-04-04 20:54:43 +00:00
|
|
|
|
|
|
|
suite=$1
|
|
|
|
ceph=$2
|
|
|
|
kernel=$3
|
|
|
|
email=$4
|
2012-06-14 20:23:24 +00:00
|
|
|
flavor=$5
|
2013-02-13 05:15:52 +00:00
|
|
|
teuthology_branch=$6
|
2013-03-08 23:15:07 +00:00
|
|
|
mtype=$7
|
|
|
|
template=$8
|
2013-07-23 23:09:07 +00:00
|
|
|
distro=$9
|
2012-04-04 20:54:43 +00:00
|
|
|
|
2013-09-01 15:48:41 +00:00
|
|
|
if [ -z "$kernel" ]; then
|
|
|
|
echo "usage: $0 <suite> <ceph branch> <kernel branch> [email] [flavor] [teuthology-branch] [machinetype] [template] [distro]"
|
2012-06-14 20:23:24 +00:00
|
|
|
echo " flavor can be 'basic', 'gcov', 'notcmalloc'."
|
2012-04-04 20:54:43 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2013-09-24 01:14:28 +00:00
|
|
|
if [ -z "$email" ]
|
|
|
|
then
|
|
|
|
email='ceph-qa@ceph.com'
|
|
|
|
email_specified=0
|
|
|
|
else
|
|
|
|
email_specified=1
|
|
|
|
fi
|
2012-06-14 20:23:24 +00:00
|
|
|
[ -z "$flavor" ] && flavor='basic'
|
2013-07-23 23:09:07 +00:00
|
|
|
[ -z "$distro" ] && distro='ubuntu'
|
2013-10-03 23:34:09 +00:00
|
|
|
[ -z "$mtype" ] && mtype='plana'
|
2013-07-23 23:09:07 +00:00
|
|
|
|
2013-09-24 01:14:28 +00:00
|
|
|
stamp=`date +%Y-%m-%d_%H:%M:%S`
|
|
|
|
nicesuite=`echo $suite | sed 's/\//:/g'`
|
|
|
|
name=`whoami`"-$stamp-$nicesuite-$ceph-$kernel-$flavor-$mtype"
|
|
|
|
|
|
|
|
function schedule_fail {
|
|
|
|
SUBJECT="Failed to schedule $name"
|
|
|
|
MESSAGE="$@"
|
|
|
|
echo $SUBJECT:
|
|
|
|
echo $MESSAGE
|
|
|
|
if [ ! -z "$email" ] && [ "$email_specified" -eq 1 ]
|
|
|
|
then
|
|
|
|
echo "$MESSAGE" | mail -s "$SUBJECT" $email
|
|
|
|
fi
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
2013-08-17 00:08:04 +00:00
|
|
|
if [ "$kernel" = "-" ]
|
|
|
|
then
|
|
|
|
kernelvalue=""
|
|
|
|
else
|
|
|
|
KERNEL_SHA1=`wget http://gitbuilder.ceph.com/kernel-deb-precise-x86_64-basic/ref/$kernel/sha1 -O- 2>/dev/null`
|
2013-09-24 01:14:28 +00:00
|
|
|
[ -z "$KERNEL_SHA1" ] && schedule_fail "Couldn't find kernel branch $kernel"
|
2013-08-17 00:08:04 +00:00
|
|
|
kernelvalue="kernel:
|
|
|
|
kdb: true
|
|
|
|
sha1: $KERNEL_SHA1"
|
|
|
|
fi
|
2012-06-14 20:23:24 +00:00
|
|
|
##
|
2013-09-24 01:14:28 +00:00
|
|
|
[ ! -d ~/src/ceph-qa-suite ] && schedule_fail "error: expects to find ~/src/ceph-qa-suite"
|
|
|
|
[ ! -d ~/src/teuthology/virtualenv/bin ] && schedule_fail "error: expects to find ~/src/teuthology/virtualenv/bin"
|
2012-06-14 20:23:24 +00:00
|
|
|
|
|
|
|
## get sha1
|
2013-09-25 22:36:04 +00:00
|
|
|
if [ "$distro" = "ubuntu" ]
|
|
|
|
then
|
|
|
|
CEPH_SHA1=`wget http://gitbuilder.ceph.com/ceph-deb-precise-x86_64-$flavor/ref/$ceph/sha1 -O- 2>/dev/null`
|
|
|
|
else
|
|
|
|
CEPH_SHA1=`wget http://gitbuilder.ceph.com/ceph-rpm-fc18-x86_64-$flavor/ref/$ceph/sha1 -O- 2>/dev/null`
|
|
|
|
fi
|
2012-06-14 20:23:24 +00:00
|
|
|
|
2013-09-24 01:14:28 +00:00
|
|
|
[ -z "$CEPH_SHA1" ] && schedule_fail "Can't find ceph branch $ceph"
|
2013-02-13 05:24:16 +00:00
|
|
|
|
2013-09-24 01:14:28 +00:00
|
|
|
# Are there packages for this sha1?
|
2013-09-25 22:36:04 +00:00
|
|
|
if [ "$distro" = "ubuntu" ]
|
|
|
|
then
|
|
|
|
CEPH_VER=`wget http://gitbuilder.ceph.com/ceph-deb-precise-x86_64-$flavor/sha1/$CEPH_SHA1/version -O- 2>/dev/null`
|
|
|
|
else
|
|
|
|
CEPH_VER=`wget http://gitbuilder.ceph.com/ceph-rpm-fc18-x86_64-$flavor/sha1/$CEPH_SHA1/version -O- 2>/dev/null`
|
|
|
|
fi
|
2013-09-24 01:14:28 +00:00
|
|
|
|
|
|
|
[ -z "$CEPH_VER" ] && schedule_fail "Can't find packages for ceph branch $ceph sha1 $CEPH_SHA1"
|
2013-02-13 16:50:46 +00:00
|
|
|
|
2013-02-15 17:33:27 +00:00
|
|
|
if [ -n "$teuthology_branch" ] && wget http://github.com/ceph/s3-tests/tree/$teuthology_branch -O- 2>/dev/null >/dev/null ; then
|
2013-02-13 16:50:46 +00:00
|
|
|
s3branch=$teuthology_branch
|
|
|
|
elif wget http://github.com/ceph/s3-tests/tree/$ceph -O- 2>/dev/null >/dev/null ; then
|
2012-09-10 18:09:25 +00:00
|
|
|
s3branch=$ceph
|
|
|
|
else
|
|
|
|
echo "branch $ceph not in s3-tests.git; will use master for s3tests"
|
|
|
|
s3branch='master'
|
|
|
|
fi
|
2013-02-13 16:50:46 +00:00
|
|
|
echo "s3branch $s3branch"
|
2012-07-03 19:49:39 +00:00
|
|
|
|
2013-02-13 16:50:46 +00:00
|
|
|
if [ -z "$teuthology_branch" ]; then
|
|
|
|
if wget http://github.com/ceph/teuthology/tree/$ceph -O- 2>/dev/null >/dev/null ; then
|
|
|
|
teuthology_branch=$ceph
|
|
|
|
else
|
|
|
|
echo "branch $ceph not in teuthology.git; will use master for teuthology"
|
|
|
|
teuthology_branch='master'
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
echo "teuthology branch $teuthology_branch"
|
2012-07-03 19:49:39 +00:00
|
|
|
|
2012-06-14 20:23:24 +00:00
|
|
|
## always include this
|
|
|
|
fn="/tmp/schedule.suite.$$"
|
|
|
|
trap "rm $fn" EXIT
|
2012-04-04 20:54:43 +00:00
|
|
|
cat <<EOF > $fn
|
2013-07-18 19:04:08 +00:00
|
|
|
teuthology_branch: $teuthology_branch
|
2013-08-17 00:08:04 +00:00
|
|
|
$kernelvalue
|
2012-04-04 20:54:43 +00:00
|
|
|
nuke-on-error: true
|
2013-03-08 23:15:07 +00:00
|
|
|
machine_type: $mtype
|
2013-07-23 23:09:07 +00:00
|
|
|
os_type: $distro
|
2012-06-14 20:23:24 +00:00
|
|
|
tasks:
|
|
|
|
- chef:
|
2013-04-03 21:00:25 +00:00
|
|
|
- clock.check:
|
2012-04-04 20:54:43 +00:00
|
|
|
overrides:
|
2012-07-23 05:03:04 +00:00
|
|
|
workunit:
|
|
|
|
sha1: $CEPH_SHA1
|
2012-09-10 18:09:25 +00:00
|
|
|
s3tests:
|
|
|
|
branch: $s3branch
|
2013-05-16 18:29:42 +00:00
|
|
|
install:
|
2013-05-18 01:53:02 +00:00
|
|
|
ceph:
|
|
|
|
sha1: $CEPH_SHA1
|
2012-04-04 20:54:43 +00:00
|
|
|
ceph:
|
2013-05-16 18:29:42 +00:00
|
|
|
sha1: $CEPH_SHA1
|
2013-03-13 15:23:59 +00:00
|
|
|
conf:
|
|
|
|
mon:
|
2013-07-25 16:10:47 +00:00
|
|
|
debug ms: 1
|
2013-03-13 15:23:59 +00:00
|
|
|
debug mon: 20
|
|
|
|
debug paxos: 20
|
2013-09-04 04:56:32 +00:00
|
|
|
osd:
|
|
|
|
debug ms: 1
|
|
|
|
debug osd: 5
|
2012-06-16 20:59:46 +00:00
|
|
|
log-whitelist:
|
|
|
|
- slow request
|
2013-07-17 00:41:32 +00:00
|
|
|
ceph-deploy:
|
2013-07-25 19:45:52 +00:00
|
|
|
branch:
|
|
|
|
dev: $ceph
|
2013-07-17 00:41:32 +00:00
|
|
|
conf:
|
|
|
|
mon:
|
2013-07-25 16:10:47 +00:00
|
|
|
debug mon: 1
|
2013-07-17 00:41:32 +00:00
|
|
|
debug paxos: 20
|
|
|
|
debug ms: 20
|
|
|
|
client:
|
2013-07-18 18:38:00 +00:00
|
|
|
log file: /var/log/ceph/ceph-\$name.\$pid.log
|
2013-06-19 20:35:50 +00:00
|
|
|
admin_socket:
|
|
|
|
branch: $ceph
|
2012-04-04 20:54:43 +00:00
|
|
|
EOF
|
|
|
|
|
2012-06-14 20:23:24 +00:00
|
|
|
if [ "$flavor" = "gcov" ]; then
|
|
|
|
cat <<EOF >> $fn
|
|
|
|
coverage: yes
|
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
|
|
|
|
## template, too?
|
|
|
|
if [ -n "$template" ]; then
|
|
|
|
sed s/CEPH_SHA1/$CEPH_SHA1/ $template | sed s/KERNEL_SHA1/$KERNEL_SHA1/ >> $fn
|
|
|
|
fi
|
|
|
|
|
2013-02-13 16:50:46 +00:00
|
|
|
echo "name $name"
|
2012-09-21 21:54:19 +00:00
|
|
|
|
2013-08-26 18:23:25 +00:00
|
|
|
./virtualenv/bin/teuthology-suite -v $fn \
|
2013-08-29 04:54:26 +00:00
|
|
|
--base ~/src/ceph-qa-suite/suites \
|
|
|
|
--collections $suite \
|
2012-06-14 20:23:24 +00:00
|
|
|
--email $email \
|
2013-05-20 18:23:50 +00:00
|
|
|
--timeout 36000 \
|
2012-09-21 21:54:19 +00:00
|
|
|
--name $name \
|
2013-07-18 19:04:08 +00:00
|
|
|
--worker $mtype
|