repo
stringlengths
1
152
file
stringlengths
15
205
code
stringlengths
0
41.6M
file_length
int64
0
41.6M
avg_line_length
float64
0
1.81M
max_line_length
int64
0
12.7M
extension_type
stringclasses
90 values
null
ceph-main/qa/workunits/rbd/luks-encryption.sh
#!/usr/bin/env bash set -ex CEPH_ID=${CEPH_ID:-admin} TMP_FILES="/tmp/passphrase /tmp/passphrase2 /tmp/testdata1 /tmp/testdata2 /tmp/cmpdata" _sudo() { local cmd if [ `id -u` -eq 0 ] then "$@" return $? fi # Look for the command in the user path. If it fails run it as is, # supposing it is...
6,933
30.807339
190
sh
null
ceph-main/qa/workunits/rbd/map-snapshot-io.sh
#!/bin/sh # http://tracker.ceph.com/issues/3964 set -ex rbd create image -s 100 DEV=$(sudo rbd map image) dd if=/dev/zero of=$DEV oflag=direct count=10 rbd snap create image@s1 dd if=/dev/zero of=$DEV oflag=direct count=10 # used to fail rbd snap rm image@s1 dd if=/dev/zero of=$DEV oflag=direct count=10 sudo rbd u...
352
18.611111
62
sh
null
ceph-main/qa/workunits/rbd/map-unmap.sh
#!/usr/bin/env bash set -ex RUN_TIME=300 # approximate duration of run (seconds) [ $# -eq 1 ] && RUN_TIME="$1" IMAGE_NAME="image-$$" IMAGE_SIZE="1024" # MB function get_time() { date '+%s' } function times_up() { local end_time="$1" test $(get_time) -ge "${end_time}" } function map_unmap() { [ $# -eq 1 ] ||...
793
16.26087
58
sh
null
ceph-main/qa/workunits/rbd/merge_diff.sh
#!/usr/bin/env bash set -ex export RBD_FORCE_ALLOW_V1=1 pool=rbd gen=$pool/gen out=$pool/out testno=1 mkdir -p merge_diff_test pushd merge_diff_test function expect_false() { if "$@"; then return 1; else return 0; fi } function clear_all() { fusermount -u mnt || true rbd snap purge --no-progress $gen || tru...
7,100
13.855649
100
sh
null
ceph-main/qa/workunits/rbd/notify_master.sh
#!/bin/sh -ex relpath=$(dirname $0)/../../../src/test/librbd python3 $relpath/test_notify.py master exit 0
108
17.166667
46
sh
null
ceph-main/qa/workunits/rbd/notify_slave.sh
#!/bin/sh -ex relpath=$(dirname $0)/../../../src/test/librbd python3 $relpath/test_notify.py slave exit 0
107
17
46
sh
null
ceph-main/qa/workunits/rbd/permissions.sh
#!/usr/bin/env bash set -ex IMAGE_FEATURES="layering,exclusive-lock,object-map,fast-diff" clone_v2_enabled() { image_spec=$1 rbd info $image_spec | grep "clone-parent" } create_pools() { ceph osd pool create images 32 rbd pool init images ceph osd pool create volumes 32 rbd pool init volumes ...
9,384
33.759259
108
sh
null
ceph-main/qa/workunits/rbd/qemu-iotests.sh
#!/bin/sh -ex # Run qemu-iotests against rbd. These are block-level tests that go # through qemu but do not involve running a full vm. Note that these # require the admin ceph user, as there's no way to pass the ceph user # to qemu-iotests currently. testlist='001 002 003 004 005 008 009 010 011 021 025 032 033' git...
1,484
27.557692
71
sh
null
ceph-main/qa/workunits/rbd/qemu_dynamic_features.sh
#!/usr/bin/env bash set -x if [[ -z "${IMAGE_NAME}" ]]; then echo image name must be provided exit 1 fi is_qemu_running() { rbd status ${IMAGE_NAME} | grep -v "Watchers: none" } wait_for_qemu() { while ! is_qemu_running ; do echo "*** Waiting for QEMU" sleep 30 done } wait_for_qemu rbd feature dis...
1,067
21.723404
59
sh
null
ceph-main/qa/workunits/rbd/qemu_rebuild_object_map.sh
#!/usr/bin/env bash set -ex if [[ -z "${IMAGE_NAME}" ]]; then echo image name must be provided exit 1 fi is_qemu_running() { rbd status ${IMAGE_NAME} | grep -v "Watchers: none" } wait_for_qemu() { while ! is_qemu_running ; do echo "*** Waiting for QEMU" sleep 30 done } wait_for_qemu rbd feature di...
769
19.263158
56
sh
null
ceph-main/qa/workunits/rbd/qos.sh
#!/bin/sh -ex POOL=rbd IMAGE=test$$ IMAGE_SIZE=1G TOLERANCE_PRCNT=10 rbd_bench() { local image=$1 local type=$2 local total=$3 local qos_type=$4 local qos_limit=$5 local iops_var_name=$6 local bps_var_name=$7 local timeout=$8 local timeout_cmd="" if [ -n "${timeout}" ]; then ...
3,502
37.494505
90
sh
null
ceph-main/qa/workunits/rbd/rbd-ggate.sh
#!/bin/sh -ex POOL=testrbdggate$$ NS=ns IMAGE=test SIZE=64 DATA= DEV= if which xmlstarlet > /dev/null 2>&1; then XMLSTARLET=xmlstarlet elif which xml > /dev/null 2>&1; then XMLSTARLET=xml else echo "Missing xmlstarlet binary!" exit 1 fi if [ `uname -K` -ge 1200078 ] ; then RBD_GGATE_RESIZE_SUPPORTED=1 fi...
6,519
26.166667
96
sh
null
ceph-main/qa/workunits/rbd/rbd-nbd.sh
#!/usr/bin/env bash set -ex . $(dirname $0)/../../standalone/ceph-helpers.sh POOL=rbd ANOTHER_POOL=new_default_pool$$ NS=ns IMAGE=testrbdnbd$$ SIZE=64 DATA= DEV= _sudo() { local cmd if [ `id -u` -eq 0 ] then "$@" return $? fi # Look for the command in the user path. If it fails run it as is, ...
16,034
31.657841
119
sh
null
ceph-main/qa/workunits/rbd/rbd_groups.sh
#!/usr/bin/env bash set -ex # # rbd_consistency_groups.sh - test consistency groups cli commands # # # Functions # create_group() { local group_name=$1 rbd group create $group_name } list_groups() { rbd group list } check_group_exists() { local group_name=$1 list_groups | grep $group_name } ...
5,078
18.610039
67
sh
null
ceph-main/qa/workunits/rbd/rbd_mirror_bootstrap.sh
#!/bin/sh -ex # # rbd_mirror_bootstrap.sh - test peer bootstrap create/import # RBD_MIRROR_MANUAL_PEERS=1 RBD_MIRROR_INSTANCES=${RBD_MIRROR_INSTANCES:-1} . $(dirname $0)/rbd_mirror_helpers.sh setup testlog "TEST: bootstrap cluster2 from cluster1" # create token on cluster1 and import to cluster2 TOKEN=${TEMPDIR}/pee...
2,576
42.677966
121
sh
null
ceph-main/qa/workunits/rbd/rbd_mirror_fsx_compare.sh
#!/bin/sh -ex # # rbd_mirror_fsx_compare.sh - test rbd-mirror daemon under FSX workload # # The script is used to compare FSX-generated images between two clusters. # . $(dirname $0)/rbd_mirror_helpers.sh trap 'cleanup $?' INT TERM EXIT setup_tempdir testlog "TEST: wait for all images" image_count=$(rbd --cluster $...
1,136
28.153846
90
sh
null
ceph-main/qa/workunits/rbd/rbd_mirror_fsx_prepare.sh
#!/bin/sh -ex # # rbd_mirror_fsx_prepare.sh - test rbd-mirror daemon under FSX workload # # The script is used to compare FSX-generated images between two clusters. # . $(dirname $0)/rbd_mirror_helpers.sh setup
213
18.454545
74
sh
null
ceph-main/qa/workunits/rbd/rbd_mirror_ha.sh
#!/bin/sh -ex # # rbd_mirror_ha.sh - test rbd-mirror daemons in HA mode # RBD_MIRROR_INSTANCES=${RBD_MIRROR_INSTANCES:-7} . $(dirname $0)/rbd_mirror_helpers.sh setup is_leader() { local instance=$1 local pool=$2 test -n "${pool}" || pool=${POOL} admin_daemon "${CLUSTER1}:${instance}" \ rbd mirr...
5,121
23.274882
89
sh
null
ceph-main/qa/workunits/rbd/rbd_mirror_helpers.sh
#!/bin/sh # # rbd_mirror_helpers.sh - shared rbd-mirror daemon helper functions # # The scripts starts two ("local" and "remote") clusters using mstart.sh script, # creates a temporary directory, used for cluster configs, daemon logs, admin # socket, temporary files, and launches rbd-mirror daemon. # # There are severa...
38,897
25.300203
213
sh
null
ceph-main/qa/workunits/rbd/rbd_mirror_journal.sh
#!/bin/sh -ex # # rbd_mirror_journal.sh - test rbd-mirror daemon in journal-based mirroring mode # # The scripts starts two ("local" and "remote") clusters using mstart.sh script, # creates a temporary directory, used for cluster configs, daemon logs, admin # socket, temporary files, and launches rbd-mirror daemon. # ...
29,142
48.145025
104
sh
null
ceph-main/qa/workunits/rbd/rbd_mirror_snapshot.sh
#!/bin/sh -ex # # rbd_mirror_snapshot.sh - test rbd-mirror daemon in snapshot-based mirroring mode # # The scripts starts two ("local" and "remote") clusters using mstart.sh script, # creates a temporary directory, used for cluster configs, daemon logs, admin # socket, temporary files, and launches rbd-mirror daemon. #...
23,941
47.563895
109
sh
null
ceph-main/qa/workunits/rbd/rbd_mirror_stress.sh
#!/bin/sh -ex # # rbd_mirror_stress.sh - stress test rbd-mirror daemon # # The following additional environment variables affect the test: # # RBD_MIRROR_REDUCE_WRITES - if not empty, don't run the stress bench write # tool during the many image test # IMAGE_COUNT=50 export LOCKDEP=0 . $(...
6,273
27.261261
111
sh
null
ceph-main/qa/workunits/rbd/read-flags.sh
#!/usr/bin/env bash set -ex # create a snapshot, then export it and check that setting read flags works # by looking at --debug-ms output function clean_up { rm -f test.log || true rbd snap remove test@snap || true rbd rm test || true } function test_read_flags { local IMAGE=$1 local SET_BALANCED...
1,557
24.129032
75
sh
null
ceph-main/qa/workunits/rbd/simple_big.sh
#!/bin/sh -ex mb=100000 rbd create foo --size $mb DEV=$(sudo rbd map foo) dd if=/dev/zero of=$DEV bs=1M count=$mb dd if=$DEV of=/dev/null bs=1M count=$mb sudo rbd unmap $DEV rbd rm foo echo OK
196
14.153846
39
sh
null
ceph-main/qa/workunits/rbd/test_admin_socket.sh
#!/usr/bin/env bash set -ex TMPDIR=/tmp/rbd_test_admin_socket$$ mkdir $TMPDIR trap "rm -fr $TMPDIR" 0 . $(dirname $0)/../../standalone/ceph-helpers.sh function expect_false() { set -x if "$@"; then return 1; else return 0; fi } function rbd_watch_out_file() { echo ${TMPDIR}/rbd_watch_$1.out } function ...
3,611
22.763158
79
sh
null
ceph-main/qa/workunits/rbd/test_librbd.sh
#!/bin/sh -e if [ -n "${VALGRIND}" ]; then valgrind ${VALGRIND} --suppressions=${TESTDIR}/valgrind.supp \ --error-exitcode=1 ceph_test_librbd else ceph_test_librbd fi exit 0
183
17.4
64
sh
null
ceph-main/qa/workunits/rbd/test_librbd_python.sh
#!/bin/sh -ex relpath=$(dirname $0)/../../../src/test/pybind if [ -n "${VALGRIND}" ]; then valgrind ${VALGRIND} --suppressions=${TESTDIR}/valgrind.supp \ --errors-for-leak-kinds=definite --error-exitcode=1 \ python3 -m nose -v $relpath/test_rbd.py "$@" else python3 -m nose -v $relpath/test_rbd.py "$@" f...
329
24.384615
64
sh
null
ceph-main/qa/workunits/rbd/test_lock_fence.sh
#!/usr/bin/env bash # can't use -e because of background process set -x IMAGE=rbdrw-image LOCKID=rbdrw RELPATH=$(dirname $0)/../../../src/test/librbd RBDRW=$RELPATH/rbdrw.py rbd create $IMAGE --size 10 --image-format 2 --image-shared || exit 1 # rbdrw loops doing I/O to $IMAGE after locking with lockid $LOCKID pytho...
1,150
22.489796
74
sh
null
ceph-main/qa/workunits/rbd/test_rbd_mirror.sh
#!/bin/sh -e if [ -n "${VALGRIND}" ]; then valgrind ${VALGRIND} --suppressions=${TESTDIR}/valgrind.supp \ --error-exitcode=1 ceph_test_rbd_mirror else ceph_test_rbd_mirror fi exit 0
191
18.2
64
sh
null
ceph-main/qa/workunits/rbd/test_rbd_tasks.sh
#!/usr/bin/env bash set -ex POOL=rbd_tasks POOL_NS=ns1 setup() { trap 'cleanup' INT TERM EXIT ceph osd pool create ${POOL} 128 rbd pool init ${POOL} rbd namespace create ${POOL}/${POOL_NS} TEMPDIR=`mktemp -d` } cleanup() { ceph osd pool rm ${POOL} ${POOL} --yes-i-really-really-mean-it rm -rf ${TEMPD...
7,928
27.624549
118
sh
null
ceph-main/qa/workunits/rbd/test_rbdmap_RBDMAPFILE.sh
#!/bin/sh # # Regression test for http://tracker.ceph.com/issues/14984 # # When the bug is present, starting the rbdmap service causes # a bogus log message to be emitted to the log because the RBDMAPFILE # environment variable is not set. # # When the bug is not present, starting the rbdmap service will emit # no log ...
1,208
33.542857
85
sh
null
ceph-main/qa/workunits/rbd/verify_pool.sh
#!/bin/sh -ex POOL_NAME=rbd_test_validate_pool PG_NUM=32 tear_down () { ceph osd pool delete $POOL_NAME $POOL_NAME --yes-i-really-really-mean-it || true } set_up () { tear_down ceph osd pool create $POOL_NAME $PG_NUM ceph osd pool mksnap $POOL_NAME snap rbd pool init $POOL_NAME } trap tear_down EXIT HUP I...
634
21.678571
82
sh
null
ceph-main/qa/workunits/rbd/crimson/test_crimson_librbd.sh
#!/bin/sh -e if [ -n "${VALGRIND}" ]; then valgrind ${VALGRIND} --suppressions=${TESTDIR}/valgrind.supp \ --error-exitcode=1 ceph_test_librbd else # Run test cases indivually to allow better selection # of ongoing Crimson development. # Disabled test groups are tracked here: # https://tracker.ceph.com/is...
1,632
44.361111
64
sh
null
ceph-main/qa/workunits/rename/all.sh
#!/usr/bin/env bash set -ex dir=`dirname $0` CEPH_TOOL='./ceph' $CEPH_TOOL || CEPH_TOOL='ceph' CEPH_ARGS=$CEPH_ARGS CEPH_TOOL=$CEPH_TOOL $dir/prepare.sh CEPH_ARGS=$CEPH_ARGS CEPH_TOOL=$CEPH_TOOL $dir/pri_nul.sh rm ./?/* || true CEPH_ARGS=$CEPH_ARGS CEPH_TOOL=$CEPH_TOOL $dir/rem_nul.sh rm ./?/* || true CEPH_ARGS=$...
861
21.684211
61
sh
null
ceph-main/qa/workunits/rename/dir_pri_nul.sh
#!/bin/sh -ex # dir: srcdn=destdn mkdir ./a/dir1 mv ./a/dir1 ./a/dir1.renamed # dir: diff mkdir ./a/dir2 mv ./a/dir2 ./b/dir2 # dir: diff, child subtree on target mkdir -p ./a/dir3/child/foo $CEPH_TOOL mds tell 0 export_dir /a/dir3/child 1 sleep 5 mv ./a/dir3 ./b/dir3 # dir: diff, child subtree on other mkdir -p ./...
550
18
48
sh
null
ceph-main/qa/workunits/rename/dir_pri_pri.sh
#!/bin/sh -ex # dir, srcdn=destdn mkdir ./a/dir1 mkdir ./a/dir2 mv -T ./a/dir1 ./a/dir2 # dir, different mkdir ./a/dir3 mkdir ./b/dir4 mv -T ./a/dir3 ./b/dir4
161
12.5
23
sh
null
ceph-main/qa/workunits/rename/prepare.sh
#!/bin/sh -ex $CEPH_TOOL mds tell 0 injectargs '--mds-bal-interval 0' $CEPH_TOOL mds tell 1 injectargs '--mds-bal-interval 0' $CEPH_TOOL mds tell 2 injectargs '--mds-bal-interval 0' $CEPH_TOOL mds tell 3 injectargs '--mds-bal-interval 0' #$CEPH_TOOL mds tell 4 injectargs '--mds-bal-interval 0' mkdir -p ./a/a mkdir -p...
604
26.5
56
sh
null
ceph-main/qa/workunits/rename/pri_nul.sh
#!/bin/sh -ex # srcdn=destdn touch ./a/file1 mv ./a/file1 ./a/file1.renamed # different touch ./a/file2 mv ./a/file2 ./b
125
9.5
30
sh
null
ceph-main/qa/workunits/rename/pri_pri.sh
#!/bin/sh -ex # srcdn=destdn touch ./a/file1 touch ./a/file2 mv ./a/file1 ./a/file2 # different (srcdn != destdn) touch ./a/file3 touch ./b/file4 mv ./a/file3 ./b/file4
172
12.307692
29
sh
null
ceph-main/qa/workunits/rename/pri_rem.sh
#!/bin/sh -ex dotest() { src=$1 desti=$2 destdn=$3 n=$4 touch ./$src/src$n touch ./$desti/desti$n ln ./$desti/desti$n ./$destdn/destdn$n mv ./$src/src$n ./$destdn/destdn$n } # srcdn=destdn=desti dotest 'a' 'a' 'a' 1 # destdn=desti dotest 'b' 'a' 'a' 2 # srcdn=destdn dotest 'a' 'b'...
402
11.59375
42
sh
null
ceph-main/qa/workunits/rename/rem_nul.sh
#!/bin/sh -ex dotest() { srci=$1 srcdn=$2 dest=$3 n=$4 touch ./$srci/srci$n ln ./$srci/srci$n ./$srcdn/srcdn$n mv ./$srcdn/srcdn$n ./$dest/dest$n } # srci=srcdn=destdn dotest 'a' 'a' 'a' 1 # srcdn=destdn dotest 'b' 'a' 'a' 2 # srci=destdn dotest 'a' 'b' 'a' 3 # srci=srcdn dotest 'a' '...
368
11.3
38
sh
null
ceph-main/qa/workunits/rename/rem_pri.sh
#!/bin/sh -ex dotest() { srci=$1 srcdn=$2 dest=$3 n=$4 touch ./$srci/srci$n ln ./$srci/srci$n ./$srcdn/srcdn$n touch ./$dest/dest$n mv ./$srcdn/srcdn$n ./$dest/dest$n } # srci=srcdn=destdn dotest 'a' 'a' 'a' 1 # srcdn=destdn dotest 'b' 'a' 'a' 2 # srci=destdn dotest 'a' 'b' 'a' 3 ...
392
12.1
38
sh
null
ceph-main/qa/workunits/rename/rem_rem.sh
#!/bin/sh -ex dotest() { srci=$1 srcdn=$2 desti=$3 destdn=$4 n=$5 touch ./$srci/srci$n ln ./$srci/srci$n ./$srcdn/srcdn$n touch ./$desti/desti$n ln ./$desti/desti$n ./$destdn/destdn$n mv ./$srcdn/srcdn$n ./$destdn/destdn$n } # srci=srcdn=destdn=desti dotest 'a' 'a' 'a' 'a' 1...
963
14.548387
42
sh
null
ceph-main/qa/workunits/rest/test-restful.sh
#!/bin/sh -ex mydir=`dirname $0` secret=`ceph config-key get mgr/restful/keys/admin` url=$(ceph mgr dump|jq -r .services.restful|sed -e 's/\/$//') echo "url $url secret $secret" $mydir/test_mgr_rest_api.py $url $secret echo $0 OK
233
20.272727
61
sh
null
ceph-main/qa/workunits/rgw/keystone-service-token.sh
#!/usr/bin/env bash # # Copyright (C) 2022 Binero # # Author: Tobias Urdin <tobias.urdin@binero.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Library Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any...
978
26.971429
70
sh
null
ceph-main/qa/workunits/rgw/run-d4n.sh
#!/usr/bin/env bash set -ex mydir=`dirname $0` python3 -m venv $mydir source $mydir/bin/activate pip install pip --upgrade pip install redis pip install configobj pip install boto3 # run test $mydir/bin/python3 $mydir/test_rgw_d4n.py deactivate echo OK.
257
14.176471
41
sh
null
ceph-main/qa/workunits/rgw/run-datacache.sh
#!/usr/bin/env bash set -ex #assume working ceph environment (radosgw-admin in path) and rgw on localhost:80 # localhost::443 for ssl mydir=`dirname $0` python3 -m venv $mydir source $mydir/bin/activate pip install pip --upgrade pip install configobj ## run test $mydir/bin/python3 $mydir/test_rgw_datacache.py deac...
337
15.9
80
sh
null
ceph-main/qa/workunits/rgw/run-reshard.sh
#!/usr/bin/env bash set -ex # this test uses fault injection to abort during 'radosgw-admin bucket reshard' # disable coredumps so teuthology won't mark a failure ulimit -c 0 #assume working ceph environment (radosgw-admin in path) and rgw on localhost:80 # localhost::443 for ssl mydir=`dirname $0` python3 -m venv ...
479
19
80
sh
null
ceph-main/qa/workunits/rgw/run-s3tests.sh
#!/usr/bin/env bash set -ex # run s3-tests from current directory. assume working # ceph environment (radosgw-admin in path) and rgw on localhost:8000 # (the vstart default). branch=$1 [ -z "$1" ] && branch=master port=$2 [ -z "$2" ] && port=8000 # this is vstart's default ## [ -z "$BUILD_DIR" ] && BUILD_DIR=buil...
846
20.175
152
sh
null
ceph-main/qa/workunits/rgw/test_librgw_file.sh
#!/bin/sh -e if [ -z ${AWS_ACCESS_KEY_ID} ] then export AWS_ACCESS_KEY_ID=`openssl rand -base64 20` export AWS_SECRET_ACCESS_KEY=`openssl rand -base64 40` radosgw-admin user create --uid ceph-test-librgw-file \ --access-key $AWS_ACCESS_KEY_ID \ --secret $AWS_SECRET_ACCESS_KEY \ --dis...
1,707
27.466667
84
sh
null
ceph-main/qa/workunits/rgw/test_rgw_gc_log.sh
#!/bin/sh -e ceph_test_rgw_gc_log exit 0
43
6.333333
20
sh
null
ceph-main/qa/workunits/rgw/test_rgw_obj.sh
#!/bin/sh -e ceph_test_rgw_obj exit 0
40
5.833333
17
sh
null
ceph-main/qa/workunits/rgw/test_rgw_orphan_list.sh
#!/usr/bin/env bash # set -x set -e # if defined, debug messages will be displayed and prepended with the string # debug="DEBUG" huge_size=5100 # in megabytes big_size=7 # in megabytes huge_obj=/tmp/huge_obj.temp.$$ big_obj=/tmp/big_obj.temp.$$ empty_obj=/tmp/empty_obj.temp.$$ fifo=/tmp/orphan-fifo.$$ awscli_dir=$...
12,507
23.053846
122
sh
null
ceph-main/qa/workunits/rgw/test_rgw_s3_mp_reupload.sh
#!/usr/bin/env bash # INITIALIZATION mydir=$(dirname $0) data_pool=default.rgw.buckets.data orphan_list_out=/tmp/orphan_list.$$ radoslist_out=/tmp/radoslist.$$ rados_ls_out=/tmp/rados_ls.$$ diff_out=/tmp/diff.$$ rgw_host="$(hostname --fqdn)" echo "INFO: fully qualified domain name: $rgw_host" export RGW_ACCESS_KEY=...
2,838
24.576577
109
sh
null
ceph-main/qa/workunits/suites/blogbench.sh
#!/usr/bin/env bash set -ex echo "getting blogbench" wget http://download.ceph.com/qa/blogbench-1.0.tar.bz2 #cp /home/gregf/src/blogbench-1.0.tar.bz2 . tar -xvf blogbench-1.0.tar.bz2 cd blogbench-1.0/ echo "making blogbench" ./configure make cd src mkdir blogtest_in echo "running blogbench" ./blogbench -d blogtest_in
320
19.0625
54
sh
null
ceph-main/qa/workunits/suites/bonnie.sh
#!/usr/bin/env bash set -ex bonnie_bin=`which bonnie++` [ $? -eq 1 ] && bonnie_bin=/usr/sbin/bonnie++ uid_flags="" [ "`id -u`" == "0" ] && uid_flags="-u root" $bonnie_bin $uid_flags -n 100
193
15.166667
45
sh
null
ceph-main/qa/workunits/suites/cephfs_journal_tool_smoke.sh
#!/usr/bin/env bash set -ex export BIN="${BIN:-cephfs-journal-tool --rank=cephfs:0}" export JOURNAL_FILE=/tmp/journal.bin export JSON_OUTPUT=/tmp/json.tmp export BINARY_OUTPUT=/tmp/binary.tmp if [ -d $BINARY_OUTPUT ] ; then rm -rf $BINARY_OUTPUT fi # Check that the import/export stuff really works as expected #...
2,474
25.902174
87
sh
null
ceph-main/qa/workunits/suites/dbench-short.sh
#!/usr/bin/env bash set -ex dbench 1
39
5.666667
19
sh
null
ceph-main/qa/workunits/suites/dbench.sh
#!/usr/bin/env bash set -ex dbench 1 dbench 10
49
6.142857
19
sh
null
ceph-main/qa/workunits/suites/ffsb.sh
#!/usr/bin/env bash set -ex mydir=`dirname $0` # try it again if the clone is slow and the second time trap -- 'retry' EXIT retry() { rm -rf ffsb # double the timeout value timeout 3600 git clone https://git.ceph.com/ffsb.git --depth 1 } rm -rf ffsb timeout 1800 git clone https://git.ceph.com/ffsb.git --...
464
13.53125
66
sh
null
ceph-main/qa/workunits/suites/fio.sh
#!/usr/bin/env bash set -x gen_fio_file() { iter=$1 f=$2 cat > randio-$$-${iter}.fio <<EOF [randio] blocksize_range=32m:128m blocksize_unaligned=1 filesize=10G:20G readwrite=randrw runtime=300 size=20G filename=${f} EOF } sudo apt-get -y install fio for i in $(seq 1 20); do fcount=$(ls donetestfile* 2>/dev/n...
791
17.418605
49
sh
null
ceph-main/qa/workunits/suites/fsstress.sh
#!/bin/bash set -ex mkdir -p fsstress pushd fsstress wget -q -O ltp-full.tgz http://download.ceph.com/qa/ltp-full-20091231.tgz tar xzf ltp-full.tgz pushd ltp-full-20091231/testcases/kernel/fs/fsstress make BIN=$(readlink -f fsstress) popd popd T=$(mktemp -d -p .) "$BIN" -d "$T" -l 1 -n 1000 -p 10 -v rm -rf -- "$T"
319
16.777778
73
sh
null
ceph-main/qa/workunits/suites/fsx.sh
#!/bin/sh -x set -e git clone https://git.ceph.com/xfstests-dev.git cd xfstests-dev git checkout 12973fc04fd10d4af086901e10ffa8e48866b735 make -j4 cd .. cp xfstests-dev/ltp/fsx . OPTIONS="-z" # don't use zero range calls; not supported by cephfs ./fsx $OPTIONS 1MB -N 50000 -p 10000 -l 1048576 ./fsx $OPTIONS 10MB...
403
22.764706
67
sh
null
ceph-main/qa/workunits/suites/fsync-tester.sh
#!/bin/sh set -ex # To skirt around GPL compatibility issues: wget http://download.ceph.com/qa/fsync-tester.c gcc -D_GNU_SOURCE fsync-tester.c -o fsync-tester ./fsync-tester echo $PATH whereis lsof lsof
207
13.857143
48
sh
null
ceph-main/qa/workunits/suites/iogen.sh
#!/usr/bin/env bash set -ex echo "getting iogen" wget http://download.ceph.com/qa/iogen_3.1p0.tar tar -xvzf iogen_3.1p0.tar cd iogen_3.1p0 echo "making iogen" make echo "running iogen" ./iogen -n 5 -s 2g echo "sleep for 10 min" sleep 600 echo "stopping iogen" ./iogen -k echo "OK"
283
14.777778
48
sh
null
ceph-main/qa/workunits/suites/iozone-sync.sh
#!/usr/bin/env bash set -ex # basic tests of O_SYNC, O_DSYNC, O_RSYNC # test O_SYNC iozone -c -e -s 512M -r 1M -t 1 -F osync1 -i 0 -i 1 -o # test O_DSYNC iozone -c -e -s 512M -r 1M -t 1 -F odsync1 -i 0 -i 1 -+D # test O_RSYNC iozone -c -e -s 512M -r 1M -t 1 -F orsync1 -i 0 -i 1 -+r # test same file with O_SYNC in on...
656
27.565217
66
sh
null
ceph-main/qa/workunits/suites/iozone.sh
#!/usr/bin/env bash set -ex iozone -c -e -s 1024M -r 16K -t 1 -F f1 -i 0 -i 1 iozone -c -e -s 1024M -r 1M -t 1 -F f2 -i 0 -i 1 iozone -c -e -s 10240M -r 1M -t 1 -F f3 -i 0 -i 1
179
21.5
49
sh
null
ceph-main/qa/workunits/suites/pjd.sh
#!/usr/bin/env bash set -ex wget http://download.ceph.com/qa/pjd-fstest-20090130-RC-aclfixes.tgz tar zxvf pjd*.tgz cd pjd-fstest-20090130-RC make clean make cd .. mkdir tmp cd tmp # must be root! sudo prove -r -v --exec 'bash -x' ../pjd*/tests cd .. rm -rf tmp pjd*
269
14
68
sh
null
ceph-main/qa/workunits/windows/run-tests.sh
#!/usr/bin/env bash set -ex DIR="$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)" source ${DIR}/libvirt_vm/build_utils.sh source ${DIR}/libvirt_vm/connection_info.sh # Run the Windows tests scp_upload ${DIR} /windows-workunits SSH_TIMEOUT=30m ssh_exec powershell.exe -File /windows-workunits/run-tests.ps1
305
24.5
78
sh
null
ceph-main/qa/workunits/windows/libvirt_vm/setup.sh
#!/usr/bin/env bash set -ex WINDOWS_SERVER_2019_ISO_URL=${WINDOWS_SERVER_2019_ISO_URL:-"https://software-download.microsoft.com/download/pr/17763.737.190906-2324.rs5_release_svc_refresh_SERVER_EVAL_x64FRE_en-us_1.iso"} VIRTIO_WIN_ISO_URL=${VIRTIO_WIN_ISO_URL:-"https://fedorapeople.org/groups/virt/virtio-win/direct-dow...
5,714
34.06135
190
sh
null
ceph-main/src/SimpleRADOSStriper.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system * * Copyright (C) 2021 Red Hat, Inc. * * This is free software; you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License versio...
20,980
26.037371
150
cc
null
ceph-main/src/SimpleRADOSStriper.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system * * Copyright (C) 2021 Red Hat, Inc. * * This is free software; you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License versio...
4,279
29.571429
102
h
null
ceph-main/src/ceph-osd-prestart.sh
#!/bin/sh if [ `uname` = FreeBSD ]; then GETOPT=/usr/local/bin/getopt else GETOPT=getopt fi eval set -- "$(${GETOPT} -o i: --long id:,cluster: -- $@)" while true ; do case "$1" in -i|--id) id=$2; shift 2 ;; --cluster) cluster=$2; shift 2 ;; --) shift ; break ;; esac done if [ -z "$id" ]; then echo ...
1,251
22.622642
90
sh
null
ceph-main/src/ceph_common.sh
#!/bin/sh CCONF="$BINDIR/ceph-conf" default_conf=$ETCDIR"/ceph.conf" conf=$default_conf hostname=`hostname -s` verify_conf() { # fetch conf? if [ -x "$ETCDIR/fetch_config" ] && [ "$conf" = "$default_conf" ]; then conf="/tmp/fetched.ceph.conf.$$" echo "[$ETCDIR/fetch_config $conf]" if $ETCDIR/fetch_config...
6,846
26.720648
173
sh
null
ceph-main/src/ceph_fuse.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system * * Copyright (C) 2004-2006 Sage Weil <sage@newdream.net> * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General P...
10,720
28.133152
108
cc
null
ceph-main/src/ceph_mds.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system * * Copyright (C) 2004-2006 Sage Weil <sage@newdream.net> * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General ...
7,183
26.212121
136
cc
null
ceph-main/src/ceph_mgr.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system * * Copyright (C) 2015 Red Hat Inc * * Author: John Spray <john.spray@redhat.com> * * This is free software; you can redistribute it and/or * modify it under the terms o...
1,832
22.5
80
cc
null
ceph-main/src/ceph_mon.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system * * Copyright (C) 2004-2006 Sage Weil <sage@newdream.net> * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General ...
28,712
29.97411
136
cc
null
ceph-main/src/ceph_osd.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system * * Copyright (C) 2004-2006 Sage Weil <sage@newdream.net> * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General ...
25,438
31.242079
138
cc
null
ceph-main/src/ceph_syn.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system * * Copyright (C) 2004-2006 Sage Weil <sage@newdream.net> * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General ...
2,891
26.283019
79
cc
null
ceph-main/src/ckill.sh
#!/bin/bash -e if [ -e CMakeCache.txt ]; then [ -z "$CEPH_BIN" ] && CEPH_BIN=bin fi if [ -z "$CEPHADM" ]; then CEPHADM="${CEPH_BIN}/cephadm" fi # fsid if [ -e fsid ] ; then fsid=`cat fsid` else echo 'no fsid file, so no cluster?' exit 0 fi echo "fsid $fsid" sudo $CEPHADM rm-cluster --force --fsi...
329
14
45
sh
null
ceph-main/src/cls_acl.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include <iostream> #include <string.h> #include <stdlib.h> #include <errno.h> #include <openssl/md5.h> #include <openssl/sha.h> #include "include/types.h" #include "objclass/objclass.h" CLS_VER(1,0) CLS_NAME(acl) int ...
1,223
20.103448
74
cc
null
ceph-main/src/cls_crypto.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include <iostream> #include <string.h> #include <stdlib.h> #include <errno.h> #include <openssl/md5.h> #include <openssl/sha.h> #include "include/types.h" #include "objclass/objclass.h" CLS_VER(1,0) CLS_NAME(crypto) i...
1,662
20.320513
77
cc
null
ceph-main/src/cstart.sh
#!/bin/bash -e if [ -e CMakeCache.txt ]; then [ -z "$CEPH_BIN" ] && CEPH_BIN=bin fi if [ -z "$CEPHADM" ]; then CEPHADM="${CEPH_BIN}/cephadm" fi image_base="quay.io/ceph-ci/ceph" if which podman 2>&1 > /dev/null; then runtime="podman" else runtime="docker" fi # fsid if [ -e fsid ] ; then fsid=`c...
1,965
22.129412
102
sh
null
ceph-main/src/krbd.cc
/* * Ceph - scalable distributed file system * * Copyright (C) 2014 Inktank Storage, Inc. * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1, as published by the Free Software * Foundation. See file COPYING. * */ #incl...
32,172
26.80726
91
cc
null
ceph-main/src/libcephfs.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system * * Copyright (C) 2009-2011 New Dream Network * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * Lic...
64,989
26.596603
154
cc
null
ceph-main/src/libcephsqlite.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system * * Copyright (C) 2021 Red Hat, Inc. * * This is free software; you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License versio...
27,898
28.87045
136
cc
null
ceph-main/src/librados-config.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system * * Copyright (C) 2004-2006 Sage Weil <sage@newdream.net> * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public ...
1,799
29
76
cc
null
ceph-main/src/loadclass.sh
#!/usr/bin/env bash fname=$1 [ -z "$fname" ] && exit [ -e $fname ] || { echo "file no found: $fname"; exit; } name="`nm $fname | grep __cls_name__ | sed 's/.*__cls_name__//g' | head -1`" [ -z "$name" ] && exit ver="`nm $fname | grep __cls_ver__ | sed 's/.*__cls_ver__//g' | sed 's/_/\./g' | head -1`" [ -z "$ver" ] &...
624
22.148148
90
sh
null
ceph-main/src/mrgw.sh
#!/usr/bin/env bash set -e rgw_frontend=${RGW_FRONTEND:-"beast"} script_root=$(dirname "$0") script_root=$(cd "$script_root" && pwd) [ -z "$BUILD_DIR" ] && BUILD_DIR=build if [ -e CMakeCache.txt ]; then script_root=$PWD elif [ -e "$script_root"/../${BUILD_DIR}/CMakeCache.txt ]; then cd "$script_root"/../${BUI...
1,543
27.072727
115
sh
null
ceph-main/src/mstart.sh
#!/bin/sh usage="usage: $0 <name> [vstart options]..\n" usage_exit() { printf "$usage" exit } [ $# -lt 1 ] && usage_exit instance=$1 shift vstart_path=`dirname $0` root_path=`dirname $0` root_path=`(cd $root_path; pwd)` [ -z "$BUILD_DIR" ] && BUILD_DIR=build if [ -e CMakeCache.txt ]; then root_path=$PWD ...
1,208
18.190476
68
sh
null
ceph-main/src/mstop.sh
#!/usr/bin/env bash set -e script_root=`dirname $0` [ -z "$BUILD_DIR" ] && BUILD_DIR=build if [ -e CMakeCache.txt ]; then script_root=$PWD elif [ -e $script_root/../${BUILD_DIR}/CMakeCache.txt ]; then script_root=`(cd $script_root/../${BUILD_DIR}; pwd)` fi [ "$#" -lt 1 ] && echo "usage: $0 <name> [entity [...
1,274
20.25
65
sh
null
ceph-main/src/multi-dump.sh
#!/usr/bin/env bash # # multi-dump.sh # # Dumps interesting information about the Ceph cluster at a series of epochs. # ### Functions usage() { cat <<EOF multi-dump.sh: dumps out ceph maps -D Enable diff-mode -e <start-epoch> What epoch to end with. -h ...
2,364
23.132653
78
sh
null
ceph-main/src/perf_histogram.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system * * Copyright (C) 2017 OVH * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1, a...
7,206
30.334783
80
h
null
ceph-main/src/stop.sh
#!/usr/bin/env bash # -*- mode:sh; tab-width:4; sh-basic-offset:4; indent-tabs-mode:nil -*- # vim: softtabstop=4 shiftwidth=4 expandtab # # Copyright (C) 2013 Inktank <info@inktank.com> # Copyright (C) 2013 Cloudwatt <libre.licensing@cloudwatt.com> # # Author: Loic Dachary <loic@dachary.org> # # This program is free so...
6,966
28.396624
140
sh
null
ceph-main/src/vnewosd.sh
#!/bin/bash -ex OSD_SECRET=`bin/ceph-authtool --gen-print-key` echo "{\"cephx_secret\": \"$OSD_SECRET\"}" > /tmp/$$ OSD_UUID=`uuidgen` OSD_ID=`bin/ceph osd new $OSD_UUID -i /tmp/$$` rm /tmp/$$ rm dev/osd$OSD_ID/* || true mkdir -p dev/osd$OSD_ID bin/ceph-osd -i $OSD_ID --mkfs --key $OSD_SECRET --osd-uuid $OSD_UUID echo...
437
26.375
69
sh
null
ceph-main/src/vstart.sh
#!/usr/bin/env bash # -*- mode:sh; tab-width:4; sh-basic-offset:4; indent-tabs-mode:nil -*- # vim: softtabstop=4 shiftwidth=4 expandtab # abort on failure set -e quoted_print() { for s in "$@"; do if [[ "$s" =~ \ ]]; then printf -- "'%s' " "$s" else printf -- "$s " ...
55,884
28.121939
176
sh
null
ceph-main/src/arch/arm.h
#ifndef CEPH_ARCH_ARM_H #define CEPH_ARCH_ARM_H #ifdef __cplusplus extern "C" { #endif extern int ceph_arch_neon; /* true if we have ARM NEON or ASIMD abilities */ extern int ceph_arch_aarch64_crc32; /* true if we have AArch64 CRC32/CRC32C abilities */ extern int ceph_arch_aarch64_pmull; /* true if we have AArch64...
416
20.947368
89
h
null
ceph-main/src/arch/intel.h
#ifndef CEPH_ARCH_INTEL_H #define CEPH_ARCH_INTEL_H #ifdef __cplusplus extern "C" { #endif extern int ceph_arch_intel_pclmul; /* true if we have PCLMUL features */ extern int ceph_arch_intel_sse42; /* true if we have sse 4.2 features */ extern int ceph_arch_intel_sse41; /* true if we have sse 4.1 features */ extern...
681
28.652174
73
h
null
ceph-main/src/arch/ppc.h
/* Copyright (C) 2017 International Business Machines Corp. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) ...
540
20.64
64
h