Search is not available for this dataset
repo stringlengths 2 152 ⌀ | file stringlengths 15 239 | code stringlengths 0 58.4M | file_length int64 0 58.4M | avg_line_length float64 0 1.81M | max_line_length int64 0 12.7M | extension_type stringclasses 364
values |
|---|---|---|---|---|---|---|
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/rest/test_mgr_rest_api.py | #! /usr/bin/env python3
import requests
import time
import sys
import json
# Do not show the stupid message about verify=False. ignore exceptions bc
# this doesn't work on some distros.
try:
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(cat... | 2,963 | 28.939394 | 79 | py |
null | ceph-main/qa/workunits/restart/test-backtraces.py | #!/usr/bin/env python3
from __future__ import print_function
import subprocess
import json
import os
import time
import sys
import rados as rados
import cephfs as cephfs
prefix='testbt'
def get_name(b, i, j):
c = '{pre}.{pid}.{i}.{j}'.format(pre=prefix, pid=os.getpid(), i=i, j=j)
return c, b + '/' + c
def... | 6,980 | 26.812749 | 144 | py |
null | ceph-main/qa/workunits/rgw/keystone-fake-server.py | #!/usr/bin/env python3
#
# 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)
# ... | 5,898 | 27.22488 | 120 | py |
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/s3_bucket_quota.pl | #! /usr/bin/perl
=head1 NAME
s3_bucket_quota.pl - Script to test the rgw bucket quota functionality using s3 interface.
=head1 SYNOPSIS
Use:
perl s3_bucket_quota.pl [--help]
Examples:
perl s3_bucket_quota.pl
or
perl s3_bucket_quota.pl --help
=head1 DESCRIPTION
This script inten... | 11,478 | 28.134518 | 180 | pl |
null | ceph-main/qa/workunits/rgw/s3_multipart_upload.pl | #! /usr/bin/perl
=head1 NAME
s3_multipart_upload.pl - Script to test rgw multipart upload using s3 interface.
=head1 SYNOPSIS
Use:
perl s3_multipart_upload.pl [--help]
Examples:
perl s3_multipart_upload.pl
or
perl s3_multipart_upload.pl --help
=head1 DESCRIPTION
This script inten... | 4,108 | 26.032895 | 126 | pl |
null | ceph-main/qa/workunits/rgw/s3_user_quota.pl | #! /usr/bin/perl
=head1 NAME
s3_user_quota.pl - Script to test the rgw user quota functionality using s3 interface.
=head1 SYNOPSIS
Use:
perl s3_user_quota.pl [--help]
Examples:
perl s3_user_quota.pl
or
perl s3_user_quota.pl --help
=head1 DESCRIPTION
This script intends to test t... | 5,453 | 27.40625 | 126 | pl |
null | ceph-main/qa/workunits/rgw/s3_utilities.pm | # Common subroutines shared by the s3 testing code
my $sec;
my $min;
my $hour;
my $mon;
my $year;
my $mday;
my $wday;
my $yday;
my $isdst;
my $PASS_CNT = 0;
my $FAIL_CNT = 0;
our $radosgw_admin = $ENV{RGW_ADMIN}||"sudo radosgw-admin";
# function to get the current time stamp from the test set up
sub get_timestamp {
... | 6,010 | 24.688034 | 98 | pm |
null | ceph-main/qa/workunits/rgw/test-keystone-service-token.py | #!/usr/bin/env python3
#
# 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)
# ... | 6,300 | 32.163158 | 113 | py |
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_d4n.py | #!/usr/bin/python3
import logging as log
from configobj import ConfigObj
import boto3
import redis
import subprocess
import json
log.basicConfig(level=log.DEBUG)
""" Constants """
ACCESS_KEY = 'test3'
SECRET_KEY = 'test3'
def exec_cmd(cmd):
log.debug("exec_cmd(%s)", cmd)
try:
proc = subprocess.Popen... | 8,918 | 35.553279 | 162 | py |
null | ceph-main/qa/workunits/rgw/test_rgw_datacache.py | #!/usr/bin/python3
import logging as log
from configobj import ConfigObj
import subprocess
import json
import os
"""
Runs a test against a rgw with the data cache enabled. A client must be
set in the config for this task. This client must be the same client
that is in the config for the `rgw` task.
In the `overrides... | 6,864 | 31.690476 | 125 | py |
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_reshard.py | #!/usr/bin/python3
import errno
import logging as log
import time
import subprocess
import json
import boto3
import botocore.exceptions
import os
"""
Rgw manual and dynamic resharding testing against a running instance
"""
# The test cases in this file have been annotated for inventory.
# To extract the inventory (i... | 13,952 | 41.800613 | 177 | py |
null | ceph-main/qa/workunits/rgw/test_rgw_s3_mp_reupload.py | import boto3
import botocore.exceptions
import sys
import os
import subprocess
#boto3.set_stream_logger(name='botocore')
# handles two optional system arguments:
# <bucket-name> : default is "bkt134"
# <0 or 1> : 0 -> upload aborted, 1 -> completed; default is completed
if len(sys.argv) >= 2:
bucket_nam... | 3,705 | 29.377049 | 92 | py |
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/test_rbd_wnbd.py | import argparse
import collections
import functools
import json
import logging
import math
import os
import prettytable
import random
import subprocess
import time
import threading
import typing
import uuid
from concurrent import futures
LOG = logging.getLogger()
parser = argparse.ArgumentParser(description='rbd-wnbd... | 31,169 | 32.880435 | 86 | py |
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/btrfs_ioc_test.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <asm/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include "common/safe_io.h"
#include "os/btrfs_ioctl.h"
void do_open_wr(const char *fname, int *fd)
{
*fd = open(fname, O_WRONLY | O_CREAT, 0644);
... | 2,846 | 15.552326 | 73 | c |
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/ceph_ver.c |
#include "ceph_ver.h"
#define CONCAT_VER_SYMBOL(x) ceph_ver__##x
#define DEFINE_VER_SYMBOL(x) int CONCAT_VER_SYMBOL(x)
DEFINE_VER_SYMBOL(CEPH_GIT_VER);
| 159 | 12.333333 | 53 | c |
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/ps-ceph.pl | #!/usr/bin/perl
use strict;
#
# ps-ceph.pl: Displays a list of ceph processes running locally
#
# Copyright (C) 2010, Dreamhost
#
# 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. ... | 1,516 | 29.959184 | 63 | pl |
null | ceph-main/src/push_to_qemu.pl | #!/usr/bin/perl
use strict;
my $usage = "./push_to_qemu.pl <path_to_qemu>\n";
my $qemu = shift @ARGV || die $usage;
die $usage unless -d $qemu;
die "not in a git tree" unless `cd $qemu && git rev-parse HEAD`;
my $dir = '.';
until (-d "$dir/.git") {
$dir .= "/..";
}
print "pushing changed shared files from $di... | 626 | 27.5 | 268 | pl |
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 |