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/make-debs.sh | #!/usr/bin/env bash
#
# Copyright (C) 2015 Red Hat <contact@redhat.com>
#
# Author: Loic Dachary <loic@dachary.org>
#
# 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 you... | 2,777 | 29.195652 | 105 | sh |
null | ceph-main/make-srpm.sh | #!/bin/sh
#
# Create a SRPM which can be used to build Ceph
#
# ./make-srpm.sh <version>
# rpmbuild --rebuild /tmp/ceph/ceph-<version>-0.el7.centos.src.rpm
#
./make-dist $1
rpmbuild -D"_sourcedir `pwd`" -D"_specdir `pwd`" -D"_srcrpmdir `pwd`" -bs ceph.spec
| 259 | 20.666667 | 83 | sh |
null | ceph-main/mingw_conf.sh | # MINGW Settings:
# Due to inconsistencies between distributions, mingw versions, binaries,
# and directories must be determined (or defined) prior to building.
# This script expects the following variables:
# * OS - currently ubuntu, rhel, or suse. In the future we may attempt to
# detect the platform.
# * MINGW_CM... | 3,506 | 37.538462 | 79 | sh |
null | ceph-main/run-make-check.sh | #!/usr/bin/env bash
#
# Ceph distributed storage system
#
# Copyright (C) 2014 Red Hat <contact@redhat.com>
#
# Author: Loic Dachary <loic@dachary.org>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Sof... | 2,537 | 29.214286 | 123 | sh |
null | ceph-main/win32_build.sh | #!/usr/bin/env bash
set -e
set -o pipefail
SCRIPT_DIR="$(dirname "$BASH_SOURCE")"
SCRIPT_DIR="$(realpath "$SCRIPT_DIR")"
num_vcpus=$(nproc)
CEPH_DIR="${CEPH_DIR:-$SCRIPT_DIR}"
BUILD_DIR="${BUILD_DIR:-${CEPH_DIR}/build}"
DEPS_DIR="${DEPS_DIR:-$CEPH_DIR/build.deps}"
ZIP_DEST="${ZIP_DEST:-$BUILD_DIR/ceph.zip}"
CLEAN_... | 9,371 | 34.908046 | 88 | sh |
null | ceph-main/win32_deps_build.sh | #!/usr/bin/env bash
set -e
SCRIPT_DIR="$(dirname "$BASH_SOURCE")"
SCRIPT_DIR="$(realpath "$SCRIPT_DIR")"
num_vcpus=$(nproc)
NUM_WORKERS=${NUM_WORKERS:-$num_vcpus}
DEPS_DIR="${DEPS_DIR:-$SCRIPT_DIR/build.deps}"
depsSrcDir="$DEPS_DIR/src"
depsToolsetDir="$DEPS_DIR/mingw"
lz4SrcDir="${depsSrcDir}/lz4"
lz4Dir="${depsT... | 8,885 | 27.031546 | 95 | sh |
null | ceph-main/bin/git-archive-all.sh | #!/usr/bin/env bash
#
# File: git-archive-all.sh
#
# Description: A utility script that builds an archive file(s) of all
# git repositories and submodules in the current path.
# Useful for creating a single tarfile of a git super-
# project that contains other submodules.
#... | 9,140 | 31.073684 | 132 | sh |
null | ceph-main/ceph-menv/build_links.sh | #!/bin/bash
DIR=`dirname $0`
ROOT=$1
[ "$ROOT" == "" ] && ROOT="$HOME/ceph"
mkdir -p $DIR/bin
echo $PWD
for f in `ls $ROOT/build/bin`; do
echo $f
ln -sf ../mdo.sh $DIR/bin/$f
done
echo "MRUN_CEPH_ROOT=$ROOT" > $DIR/.menvroot
| 246 | 13.529412 | 44 | sh |
null | ceph-main/ceph-menv/mdo.sh | #!/bin/bash
cmd=`basename $0`
MENV_ROOT=`dirname $0`/..
if [ -f $MENV_ROOT/.menvroot ]; then
. $MENV_ROOT/.menvroot
fi
[ "$MRUN_CEPH_ROOT" == "" ] && MRUN_CEPH_ROOT=$HOME/ceph
if [ "$MRUN_CLUSTER" == "" ]; then
${MRUN_CEPH_ROOT}/build/bin/$cmd "$@"
exit $?
fi
${MRUN_CEPH_ROOT}/src/mrun $MRUN_CLUSTER $cm... | 327 | 18.294118 | 56 | sh |
null | ceph-main/ceph-menv/mset.sh | get_color() {
s=$1
sum=1 # just so that 'c1' isn't green that doesn't contrast with the rest of my prompt
for i in `seq 1 ${#s}`; do
c=${s:$((i-1)):1};
o=`printf '%d' "'$c"`
sum=$((sum+$o))
done
echo $sum
}
if [ "$1" == "" ]; the... | 533 | 23.272727 | 96 | sh |
null | ceph-main/cmake/modules/FindStdFilesystem_test.cc | #include <filesystem>
namespace fs = std::filesystem;
int main() {
fs::create_directory("sandbox");
fs::remove_all("sandbox");
}
| 139 | 14.555556 | 36 | cc |
null | ceph-main/cmake/modules/patch-dpdk-conf.sh | #!/bin/sh
# -*- mode:sh; tab-width:4; indent-tabs-mode:nil -*
setconf() {
local key=$1
local val=$2
if grep -q ^$key= ${conf}; then
sed -i -e "s:^$key=.*$:$key=$val:g" ${conf}
else
echo $key=$val >> ${conf}
fi
}
conf=$1/.config
shift
machine=$1
shift
arch=$1
shift
numa=$1
shift
se... | 1,272 | 20.948276 | 54 | sh |
null | ceph-main/doc/_templates/page.html | {% extends "!page.html" %}
{% block body %}
{%- if release == 'dev' %}
<div id="dev-warning" class="admonition note">
<p class="first admonition-title">Notice</p>
<p class="last">This document is for a development version of Ceph.</p>
</div>
{%- endif %}
{%- if is_release_eol %}
<div id="eol-warning" class="admon... | 736 | 27.346154 | 93 | html |
null | ceph-main/doc/_templates/smarttoc.html | {#
Sphinx sidebar template: smart table of contents.
Shows a sidebar ToC that gives you a more global view of the
documentation, and not the confusing cur/prev/next which is the
default sidebar.
The ToC will open and collapse automatically to show the part of the
hierarchy you are in. Top-leve... | 685 | 39.352941 | 134 | html |
null | ceph-main/doc/_themes/ceph/layout.html | {# TEMPLATE VAR SETTINGS #}
{%- set url_root = pathto('', 1) %}
{%- if url_root == '#' %}{% set url_root = '' %}{% endif %}
{%- if not embedded and docstitle %}
{%- set titlesuffix = " — "|safe + docstitle|e %}
{%- else %}
{%- set titlesuffix = "" %}
{%- endif %}
{%- set lang_attr = 'en' if language == None e... | 9,080 | 34.893281 | 162 | html |
null | ceph-main/examples/librados/hello_radosstriper.cc | #include "rados/librados.hpp"
#include "radosstriper/libradosstriper.hpp"
#include <iostream>
#include <string>
int main(int argc, char* argv[])
{
if(argc != 6)
{
std::cout <<"Please put in correct params\n"<<
"Stripe Count:\n"<<
"Object Size:\n" <<
"File Name:\n" <<
... | 2,756 | 25.76699 | 77 | cc |
null | ceph-main/examples/librados/hello_world.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
*
* 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 Softw... | 9,293 | 30.720137 | 88 | cc |
null | ceph-main/examples/librbd/hello_world.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
*
* 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 Softw... | 6,157 | 26.864253 | 81 | cc |
null | ceph-main/examples/rgw/rgw_admin_curl.sh | #!/usr/bin/env bash
show_help()
{
echo "Usage: `basename $0` -a <access-key> -s <secret-key>" \
"-e <rgw-endpoint> -r <http-request>" \
"-p <admin-resource> -q \"<http-query-string>\""
echo " -a Access key of rgw user"
echo " -s Secret key of rgw user"
... | 3,813 | 32.752212 | 88 | sh |
null | ceph-main/fusetrace/fusetrace_ll.cc | // -*- mode:C++; tab-width:8; c-basic-offset:4; indent-tabs-mode:t -*-
// vim: ts=8 sw=4 smarttab
/*
FUSE: Filesystem in Userspace
Copyright (C) 2001-2007 Miklos Szeredi <miklos@szeredi.hu>
This program can be distributed under the terms of the GNU GPL.
See the file COPYING.
gcc -Wall `pkg-conf... | 28,326 | 22.904641 | 104 | cc |
null | ceph-main/mirroring/mirror-ceph.sh | #!/usr/bin/env bash
set -e
#
# Script to mirror Ceph locally
#
# Please, choose a local source and do not sync in a shorter interval than
# 3 hours.
#
SILENT=0
# All available source mirrors
declare -A SOURCES
SOURCES[eu]="eu.ceph.com"
SOURCES[de]="de.ceph.com"
SOURCES[se]="se.ceph.com"
SOURCES[au]="au.ceph.com"
SOURC... | 2,560 | 24.356436 | 76 | sh |
null | ceph-main/mirroring/test-mirrors.sh | #!/usr/bin/env bash
#
# Simple script which performs a HTTP and rsync check on
# all Ceph mirrors over IPv4 and IPv6 to see if they are online
#
# Requires IPv4, IPv6, rsync and curl
#
# Example usage:
# - ./test-mirrors.sh eu.ceph.com,de.ceph.com,au.ceph.com
# - cat MIRRORS |cut -d ':' -f 1|xargs -n 1 ./test-mirrors.s... | 1,327 | 17.971429 | 63 | sh |
null | ceph-main/monitoring/ceph-mixin/jsonnet-bundler-build.sh | #!/bin/sh -ex
JSONNET_VERSION="v0.4.0"
OUTPUT_DIR=${1:-$(pwd)}
git clone -b ${JSONNET_VERSION} --depth 1 https://github.com/jsonnet-bundler/jsonnet-bundler
make -C jsonnet-bundler build
mv jsonnet-bundler/_output/jb ${OUTPUT_DIR}
| 233 | 25 | 92 | sh |
null | ceph-main/monitoring/ceph-mixin/lint-jsonnet.sh | #!/bin/sh -e
JSONNETS_FILES=$(find . -name 'vendor' -prune -o \
-name '*.jsonnet' -print -o -name '*.libsonnet' -print)
jsonnetfmt "$@" ${JSONNETS_FILES}
| 179 | 29 | 79 | sh |
null | ceph-main/monitoring/ceph-mixin/test-jsonnet.sh | #!/bin/sh -e
TEMPDIR=$(mktemp -d)
BASEDIR=$(dirname "$0")
jsonnet -J vendor -m ${TEMPDIR} $BASEDIR/dashboards.jsonnet
truncate -s 0 ${TEMPDIR}/json_difference.log
for file in ${BASEDIR}/dashboards_out/*.json
do
file_name="$(basename $file)"
for generated_file in ${TEMPDIR}/*.json
do
generated_fil... | 1,022 | 27.416667 | 80 | sh |
null | ceph-main/qa/find-used-ports.sh | #!/bin/bash
git --no-pager grep -n '127.0.0.1:[0-9]\+' | sed -n 's/.*127.0.0.1:\([0-9]\+\).*/\1/p' | sort -n | uniq -u
| 120 | 29.25 | 106 | sh |
null | ceph-main/qa/loopall.sh | #!/usr/bin/env bash
set -ex
basedir=`echo $0 | sed 's/[^/]*$//g'`.
testdir="$1"
[ -n "$2" ] && logdir=$2 || logdir=$1
[ ${basedir:0:1} == "." ] && basedir=`pwd`/${basedir:1}
PATH="$basedir/src:$PATH"
[ -z "$testdir" ] || [ ! -d "$testdir" ] && echo "specify test dir" && exit 1
cd $testdir
while true
do
for te... | 689 | 22.793103 | 102 | sh |
null | ceph-main/qa/run-standalone.sh | #!/usr/bin/env bash
set -e
if [ ! -e CMakeCache.txt -o ! -d bin ]; then
echo 'run this from the build dir'
exit 1
fi
function get_cmake_variable() {
local variable=$1
grep "$variable" CMakeCache.txt | cut -d "=" -f 2
}
function get_python_path() {
python_common=$(realpath ../src/python-common)
... | 3,517 | 23.774648 | 85 | sh |
null | ceph-main/qa/run_xfstests-obsolete.sh | #!/usr/bin/env bash
# Copyright (C) 2012 Dreamhost, LLC
#
# This is free software; see the source for copying conditions.
# There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE.
#
# This is free software; you can redistribute it and/or modify it
# under the terms of the GNU General ... | 12,288 | 25.77342 | 79 | sh |
null | ceph-main/qa/run_xfstests.sh | #!/usr/bin/env bash
# Copyright (C) 2012 Dreamhost, LLC
#
# This is free software; see the source for copying conditions.
# There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE.
#
# This is free software; you can redistribute it and/or modify it
# under the terms of the GNU General ... | 8,000 | 23.694444 | 78 | sh |
null | ceph-main/qa/run_xfstests_qemu.sh | #!/usr/bin/env bash
#
# TODO switch to run_xfstests.sh (see run_xfstests_krbd.sh)
set -x
[ -n "${TESTDIR}" ] || export TESTDIR="/tmp/cephtest"
[ -d "${TESTDIR}" ] || mkdir "${TESTDIR}"
URL_BASE="https://git.ceph.com/?p=ceph.git;a=blob_plain;f=qa"
SCRIPT="run_xfstests-obsolete.sh"
cd "${TESTDIR}"
curl -O "${URL_BAS... | 1,050 | 23.44186 | 73 | sh |
null | ceph-main/qa/runallonce.sh | #!/usr/bin/env bash
set -ex
basedir=`echo $0 | sed 's/[^/]*$//g'`.
testdir="$1"
[ -n "$2" ] && logdir=$2 || logdir=$1
[ ${basedir:0:1} == "." ] && basedir=`pwd`/${basedir:1}
PATH="$basedir/src:$PATH"
[ -z "$testdir" ] || [ ! -d "$testdir" ] && echo "specify test dir" && exit 1
cd $testdir
for test in `cd $basedir... | 665 | 24.615385 | 98 | sh |
null | ceph-main/qa/runoncfuse.sh | #!/usr/bin/env bash
set -x
mkdir -p testspace
ceph-fuse testspace -m $1
./runallonce.sh testspace
killall ceph-fuse
| 118 | 12.222222 | 25 | sh |
null | ceph-main/qa/runonkclient.sh | #!/usr/bin/env bash
set -x
mkdir -p testspace
/bin/mount -t ceph $1 testspace
./runallonce.sh testspace
/bin/umount testspace
| 129 | 12 | 31 | sh |
null | ceph-main/qa/setup-chroot.sh | #!/usr/bin/env bash
die() {
echo ${@}
exit 1
}
usage()
{
cat << EOF
$0: sets up a chroot environment for building the ceph server
usage:
-h Show this message
-r [install_dir] location of the root filesystem to install to
example: -r /images/... | 1,636 | 23.80303 | 82 | sh |
null | ceph-main/qa/cephfs/unshare_ns_mount.sh | #!/usr/bin/env bash
# This is one helper for mounting the ceph-fuse/kernel clients by
# unsharing the network namespace, let's call it netns container.
# With the netns container, you can easily suspend or resume the
# virtual network interface to simulate the client node hard
# shutdown for some test cases.
#
# ... | 17,928 | 29.132773 | 105 | sh |
null | ceph-main/qa/client/30_subdir_mount.sh | #!/usr/bin/env bash
set -x
basedir=`echo $0 | sed 's/[^/]*$//g'`.
. $basedir/common.sh
client_mount
mkdir -p $mnt/sub
echo sub > $mnt/sub/file
client_umount
mkdir -p $mnt/1
mkdir -p $mnt/2
/bin/mount -t ceph $monhost:/sub $mnt/1
grep sub $mnt/1/file
/bin/mount -t ceph $monhost:/ $mnt/2
grep sub $mnt/2/sub/file
/bi... | 381 | 14.916667 | 39 | sh |
null | ceph-main/qa/client/common.sh |
# defaults
[ -z "$bindir" ] && bindir=$PWD # location of init-ceph
[ -z "$conf" ] && conf="$basedir/ceph.conf"
[ -z "$mnt" ] && mnt="/c"
[ -z "$monhost" ] && monhost="cosd0"
set -e
mydir=`hostname`_`echo $0 | sed 's/\//_/g'`
client_mount()
{
/bin/mount -t ceph $monhost:/ $mnt
}
client_umount()
{
/bin... | 873 | 13.813559 | 61 | sh |
null | ceph-main/qa/client/gen-1774.sh | #!/usr/bin/env bash
set -e
mount () { :; }
umount () { :; }
list="\
abiword.control
abiword.list
abiword-plugin-latex.control
abiword-plugin-latex.list
abiword-plugin-opendocument.control
abiword-plugin-opendocument.list
abiword-plugin-openxml.control
abiword-plugin-openxml.list
abiword-plugin-pdf.control
abiword-plu... | 45,147 | 20.82117 | 58 | sh |
null | ceph-main/qa/machine_types/schedule_rados_ovh.sh | #!/usr/bin/env bash
# $1 - part
# $2 - branch name
# $3 - machine name
# $4 - email address
# $5 - filter out (this arg is to be at the end of the command line for now)
## example #1
## (date +%U) week number
## % 2 - mod 2 (e.g. 0,1,0,1 ...)
## * 7 - multiplied by 7 (e.g. 0,7,0,7...)
## $1 day of the week (0-6)
##... | 1,217 | 33.8 | 145 | sh |
null | ceph-main/qa/machine_types/schedule_subset.sh | #!/bin/bash -e
#command line => CEPH_BRANCH=<branch>; MACHINE_NAME=<machine_type>; SUITE_NAME=<suite>; ../schedule_subset.sh <day_of_week> $CEPH_BRANCH $MACHINE_NAME $SUITE_NAME $CEPH_QA_EMAIL $KERNEL <$FILTER>
partitions="$1"
shift
branch="$1"
shift
machine="$1"
shift
suite="$1"
shift
email="$1"
shift
kernel="$1"
sh... | 649 | 29.952381 | 234 | sh |
null | ceph-main/qa/mds/test_anchortable.sh | #!/usr/bin/env bash
set -x
mkdir links
for f in `seq 1 8`
do
mkdir $f
for g in `seq 1 20`
do
touch $f/$g
ln $f/$g links/$f.$g
done
done
for f in `seq 1 8`
do
echo testing failure point $f
bash -c "pushd . ; cd $bindir ; sleep 10; ./ceph -c $conf mds tell \* injectargs \"--mds_kill_mdstable_a... | 506 | 17.107143 | 124 | sh |
null | ceph-main/qa/mds/test_mdstable_failures.sh | #!/usr/bin/env bash
set -x
for f in `seq 1 8`
do
echo testing failure point $f
pushd . ; cd $bindir ; ./ceph -c $conf mds tell \* injectargs "--mds_kill_mdstable_at $f" ; popd
sleep 1 # wait for mds command to go thru
bash -c "pushd . ; cd $bindir ; sleep 10 ; ./init-ceph -c $conf start mds ; popd" &
... | 370 | 23.733333 | 100 | sh |
null | ceph-main/qa/mon/bootstrap/host.sh | #!/bin/sh -ex
cwd=`pwd`
cat > conf <<EOF
[global]
mon host = 127.0.0.1:6789
[mon]
admin socket =
log file = $cwd/\$name.log
debug mon = 20
debug ms = 1
EOF
rm -f mm
fsid=`uuidgen`
rm -f keyring
ceph-authtool --create-keyring keyring --gen-key -n client.admin
ceph-authtool keyring --gen-key -n mon.
ceph-mon -c con... | 477 | 15.482759 | 69 | sh |
null | ceph-main/qa/mon/bootstrap/initial_members.sh | #!/bin/sh -ex
cwd=`pwd`
cat > conf <<EOF
[mon]
admin socket =
log file = $cwd/\$name.log
debug mon = 20
debug ms = 1
mon initial members = a,b,d
EOF
rm -f mm
monmaptool --create mm \
--add a 127.0.0.1:6789 \
--add b 127.0.0.1:6790 \
--add c 127.0.0.1:6791
rm -f keyring
ceph-authtool --create-keyring key... | 959 | 23 | 84 | sh |
null | ceph-main/qa/mon/bootstrap/initial_members_asok.sh | #!/bin/sh -ex
cwd=`pwd`
cat > conf <<EOF
[mon]
log file = $cwd/\$name.log
debug mon = 20
debug ms = 1
debug asok = 20
mon initial members = a,b,d
admin socket = $cwd/\$name.asok
EOF
rm -f mm
fsid=`uuidgen`
rm -f keyring
ceph-authtool --create-keyring keyring --gen-key -n client.admin
ceph-authtool keyring --gen-key ... | 1,642 | 23.522388 | 80 | sh |
null | ceph-main/qa/mon/bootstrap/simple.sh | #!/bin/sh -e
cwd=`pwd`
cat > conf <<EOF
[mon]
admin socket =
EOF
rm -f mm
monmaptool --create mm \
--add a 127.0.0.1:6789 \
--add b 127.0.0.1:6790 \
--add c 127.0.0.1:6791
rm -f keyring
ceph-authtool --create-keyring keyring --gen-key -n client.admin
ceph-authtool keyring --gen-key -n mon.
ceph-mon -c ... | 863 | 22.351351 | 79 | sh |
null | ceph-main/qa/mon/bootstrap/simple_expand.sh | #!/bin/sh -ex
cwd=`pwd`
cat > conf <<EOF
[mon]
admin socket =
log file = $cwd/\$name.log
debug mon = 20
debug ms = 1
EOF
rm -f mm
monmaptool --create mm \
--add a 127.0.0.1:6789 \
--add b 127.0.0.1:6790 \
--add c 127.0.0.1:6791
rm -f keyring
ceph-authtool --create-keyring keyring --gen-key -n client.adm... | 1,495 | 23.52459 | 83 | sh |
null | ceph-main/qa/mon/bootstrap/simple_expand_monmap.sh | #!/bin/sh -ex
cwd=`pwd`
cat > conf <<EOF
[mon]
admin socket =
EOF
rm -f mm
monmaptool --create mm \
--add a 127.0.0.1:6789 \
--add b 127.0.0.1:6790 \
--add c 127.0.0.1:6791
rm -f keyring
ceph-authtool --create-keyring keyring --gen-key -n client.admin
ceph-authtool keyring --gen-key -n mon.
ceph-mon -c... | 1,084 | 23.111111 | 73 | sh |
null | ceph-main/qa/mon/bootstrap/simple_single_expand.sh | #!/bin/sh -ex
cwd=`pwd`
cat > conf <<EOF
[mon]
admin socket =
log file = $cwd/\$name.log
debug mon = 20
debug ms = 1
EOF
rm -f mm
monmaptool --create mm \
--add a 127.0.0.1:6789
rm -f keyring
ceph-authtool --create-keyring keyring --gen-key -n client.admin
ceph-authtool keyring --gen-key -n mon.
ceph-mon -c co... | 1,193 | 20.709091 | 79 | sh |
null | ceph-main/qa/mon/bootstrap/simple_single_expand2.sh | #!/bin/sh -ex
cwd=`pwd`
cat > conf <<EOF
[mon]
admin socket =
log file = $cwd/\$name.log
debug mon = 20
debug ms = 1
EOF
rm -f mm
ip=`host \`hostname\` | awk '{print $4}'`
monmaptool --create mm \
--add a $ip:6779
rm -f keyring
ceph-authtool --create-keyring keyring --gen-key -n client.admin
ceph-authtool keyri... | 882 | 20.536585 | 77 | sh |
null | ceph-main/qa/mon/bootstrap/single_host.sh | #!/bin/sh -ex
cwd=`pwd`
cat > conf <<EOF
[global]
mon host = 127.0.0.1:6789
[mon]
admin socket =
log file = $cwd/\$name.log
debug mon = 20
debug ms = 1
EOF
rm -f mm
fsid=`uuidgen`
rm -f keyring
ceph-authtool --create-keyring keyring --gen-key -n client.admin
ceph-authtool keyring --gen-key -n mon.
ceph-mon -c con... | 482 | 15.655172 | 74 | sh |
null | ceph-main/qa/mon/bootstrap/single_host_multi.sh | #!/bin/sh -ex
cwd=`pwd`
cat > conf <<EOF
[global]
[mon]
admin socket =
log file = $cwd/\$name.log
debug mon = 20
debug ms = 1
mon host = 127.0.0.1:6789 127.0.0.1:6790 127.0.0.1:6791
EOF
rm -f mm
fsid=`uuidgen`
rm -f keyring
ceph-authtool --create-keyring keyring --gen-key -n client.admin
ceph-authtool keyring --ge... | 970 | 23.897436 | 103 | sh |
null | ceph-main/qa/qa_scripts/cephscrub.sh | # remove the ceph directories
sudo rm -rf /var/log/ceph
sudo rm -rf /var/lib/ceph
sudo rm -rf /etc/ceph
sudo rm -rf /var/run/ceph
# remove the ceph packages
sudo apt-get -y purge ceph
sudo apt-get -y purge ceph-dbg
sudo apt-get -y purge ceph-mds
sudo apt-get -y purge ceph-mds-dbg
sudo apt-get -y purge ceph-fuse
su... | 991 | 31 | 43 | sh |
null | ceph-main/qa/qa_scripts/openstack/ceph_install.sh | #!/usr/bin/env bash
#
# Install a simple ceph cluster upon which openstack images will be stored.
#
set -fv
ceph_node=${1}
source copy_func.sh
copy_file files/$OS_CEPH_ISO $ceph_node .
copy_file execs/ceph_cluster.sh $ceph_node . 0777
copy_file execs/ceph-pool-create.sh $ceph_node . 0777
ssh $ceph_node ./ceph_cluster.... | 326 | 26.25 | 75 | sh |
null | ceph-main/qa/qa_scripts/openstack/connectceph.sh | #!/usr/bin/env bash
#
# Connect openstack node just installed to a ceph cluster.
#
# Essentially implements:
#
# http://docs.ceph.com/en/latest/rbd/rbd-openstack/
#
# The directory named files contains templates for the /etc/glance/glance-api.conf,
# /etc/cinder/cinder.conf, /etc/nova/nova.conf Openstack files
#
set -f... | 2,662 | 58.177778 | 189 | sh |
null | ceph-main/qa/qa_scripts/openstack/copy_func.sh | #
# copy_file(<filename>, <node>, <directory>, [<permissions>], [<owner>]
#
# copy a file -- this is needed because passwordless ssh does not
# work when sudo'ing.
# <file> -- name of local file to be copied
# <node> -- node where we want the file
# <directory> -- location where we want the fil... | 731 | 30.826087 | 71 | sh |
null | ceph-main/qa/qa_scripts/openstack/fix_conf_file.sh | source ./copy_func.sh
#
# Take a templated file, modify a local copy, and write it to the
# remote site.
#
# Usage: fix_conf_file <remote-site> <file-name> <remote-location> [<rbd-secret>]
# <remote-site> -- site where we want this modified file stored.
# <file-name> -- name of the remote file.
# <remote... | 999 | 33.482759 | 81 | sh |
null | ceph-main/qa/qa_scripts/openstack/image_create.sh | #!/usr/bin/env bash
#
# Set up a vm on packstack. Use the iso in RHEL_ISO (defaults to home dir)
#
set -fv
source ./copy_func.sh
source ./fix_conf_file.sh
openstack_node=${1}
ceph_node=${2}
RHEL_ISO=${RHEL_ISO:-~/rhel-server-7.2-x86_64-boot.iso}
copy_file ${RHEL_ISO} $openstack_node .
copy_file execs/run_openstack.sh... | 491 | 27.941176 | 100 | sh |
null | ceph-main/qa/qa_scripts/openstack/openstack.sh | #!/usr/bin/env bash
#
# Install Openstack.
# Usage: openstack <openstack-site> <ceph-monitor>
#
# This script installs Openstack on one node, and connects it to a ceph
# cluster on another set of nodes. It is intended to run from a third
# node.
#
# Assumes a single node Openstack cluster and a single monitor ceph... | 763 | 25.344828 | 71 | sh |
null | ceph-main/qa/qa_scripts/openstack/packstack.sh | #!/usr/bin/env bash
#
# Install openstack by running packstack.
#
# Implements the operations in:
# https://docs.google.com/document/d/1us18KR3LuLyINgGk2rmI-SVj9UksCE7y4C2D_68Aa8o/edit?ts=56a78fcb
#
# The directory named files contains a template for the kilo.conf file used by packstack.
#
set -fv
source ./copy_func.sh... | 604 | 27.809524 | 98 | sh |
null | ceph-main/qa/qa_scripts/openstack/ceph_install_w_ansible/ceph_install.sh | #! /usr/bin/env bash
if [ $# -ne 5 ]; then
echo 'Usage: ceph_install.sh <admin-node> <mon-node> <osd-node> <osd-node> <osd-node>'
exit -1
fi
allnodes=$*
adminnode=$1
shift
cephnodes=$*
monnode=$1
shift
osdnodes=$*
./multi_action.sh cdn_setup.sh $allnodes
./talknice.sh $allnodes
for mac in $allnodes; do
ssh ... | 1,184 | 28.625 | 90 | sh |
null | ceph-main/qa/qa_scripts/openstack/ceph_install_w_ansible/copy_func.sh | ../copy_func.sh | 15 | 15 | 15 | sh |
null | ceph-main/qa/qa_scripts/openstack/ceph_install_w_ansible/multi_action.sh | #! /usr/bin/env bash
source copy_func.sh
allparms=$*
cmdv=$1
shift
sites=$*
for mac in $sites; do
echo $cmdv $mac
if [ -f ~/secrets ]; then
copy_file ~/secrets $mac . 0777 ubuntu:ubuntu
fi
copy_file execs/${cmdv} $mac . 0777 ubuntu:ubuntu
ssh $mac ./${cmdv} &
done
./staller.sh $allparms
for ... | 388 | 18.45 | 53 | sh |
null | ceph-main/qa/qa_scripts/openstack/ceph_install_w_ansible/repolocs.sh | #! /usr/bin/env bash
SPECIFIC_VERSION=latest-Ceph-2-RHEL-7
#SPECIFIC_VERSION=Ceph-2-RHEL-7-20160630.t.0
#SPECIFIC_VERSION=Ceph-2.0-RHEL-7-20160718.t.0
export CEPH_REPO_TOOLS=http://download.eng.bos.redhat.com/rcm-guest/ceph-drops/auto/ceph-2-rhel-7-compose/${SPECIFIC_VERSION}/compose/Tools/x86_64/os/
export CEPH_REPO_... | 760 | 83.555556 | 162 | sh |
null | ceph-main/qa/qa_scripts/openstack/ceph_install_w_ansible/staller.sh | #! /usr/bin/env bash
cmd_wait=$1
shift
sites=$*
donebit=0
while [ $donebit -ne 1 ]; do
sleep 10
donebit=1
for rem in $sites; do
rval=`ssh $rem ps aux | grep $cmd_wait | wc -l`
if [ $rval -gt 0 ]; then
donebit=0
fi
done
done
| 277 | 16.375 | 56 | sh |
null | ceph-main/qa/qa_scripts/openstack/ceph_install_w_ansible/talknice.sh | #!/usr/bin/env bash
declare -A rsapub
for fulln in $*; do
sname=`echo $fulln | sed 's/\..*//'`
nhead=`echo $sname | sed 's/[0-9]*//g'`
x=`ssh $fulln "ls .ssh/id_rsa"`
if [ -z $x ]; then
ssh $fulln "ssh-keygen -N '' -f .ssh/id_rsa";
fi
xx=`ssh $fulln "ls .ssh/config"`
if [ -z $xx ]; t... | 884 | 28.5 | 86 | sh |
null | ceph-main/qa/qa_scripts/openstack/ceph_install_w_ansible/execs/cdn_setup.sh | #! /usr/bin/env bash
if [ -f ~/secrets ]; then
source ~/secrets
fi
subm=`which subscription-manager`
if [ ${#subm} -eq 0 ]; then
sudo yum -y update
exit
fi
subst=`sudo subscription-manager status | grep "^Overall" | awk '{print $NF}'`
if [ $subst == 'Unknown' ]; then
mynameis=${subscrname:-'inigomontoya... | 708 | 32.761905 | 88 | sh |
null | ceph-main/qa/qa_scripts/openstack/ceph_install_w_ansible/execs/ceph_ansible.sh | #! /usr/bin/env bash
cephnodes=$*
monnode=$1
sudo yum -y install ceph-ansible
cd
sudo ./edit_ansible_hosts.sh $cephnodes
mkdir ceph-ansible-keys
cd /usr/share/ceph-ansible/group_vars/
if [ -f ~/ip_info ]; then
source ~/ip_info
fi
mon_intf=${mon_intf:-'eno1'}
pub_netw=${pub_netw:-'10.8.128.0\/21'}
sudo cp all.sample... | 1,464 | 38.594595 | 100 | sh |
null | ceph-main/qa/qa_scripts/openstack/ceph_install_w_ansible/execs/edit_ansible_hosts.sh | #! /usr/bin/env bash
ed /etc/ansible/hosts << EOF
$
a
[mons]
${1}
[osds]
${2}
${3}
${4}
.
w
q
EOF
| 101 | 4.666667 | 28 | sh |
null | ceph-main/qa/qa_scripts/openstack/ceph_install_w_ansible/execs/edit_groupvars_osds.sh | #! /usr/bin/env bash
ed /usr/share/ceph-ansible/group_vars/osds << EOF
$
/^devices:
.+1
i
- /dev/sdb
- /dev/sdc
- /dev/sdd
.
w
q
EOF
| 142 | 9.214286 | 49 | sh |
null | ceph-main/qa/qa_scripts/openstack/execs/ceph-pool-create.sh | #!/usr/bin/env bash
set -f
#
# On the ceph site, make the pools required for Openstack
#
#
# Make a pool, if it does not already exist.
#
function make_pool {
if [[ -z `sudo ceph osd lspools | grep " $1,"` ]]; then
echo "making $1"
sudo ceph osd pool create $1 128
fi
}
#
# Make sure the pg_nu... | 699 | 19 | 62 | sh |
null | ceph-main/qa/qa_scripts/openstack/execs/ceph_cluster.sh | #!/usr/bin/env bash
set -f
echo $OS_CEPH_ISO
if [[ $# -ne 4 ]]; then
echo "Usage: ceph_cluster mon.0 osd.0 osd.1 osd.2"
exit -1
fi
allsites=$*
mon=$1
shift
osds=$*
ISOVAL=${OS_CEPH_ISO-rhceph-1.3.1-rhel-7-x86_64-dvd.iso}
sudo mount -o loop ${ISOVAL} /mnt
fqdn=`hostname -f`
lsetup=`ls /mnt/Installer | grep "^i... | 1,092 | 20.431373 | 57 | sh |
null | ceph-main/qa/qa_scripts/openstack/execs/libvirt-secret.sh | #!/usr/bin/env bash
set -f
#
# Generate a libvirt secret on the Openstack node.
#
openstack_node=${1}
uuid=`uuidgen`
cat > secret.xml <<EOF
<secret ephemeral='no' private='no'>
<uuid>${uuid}</uuid>
<usage type='ceph'>
<name>client.cinder secret</name>
</usage>
</secret>
EOF
sudo virsh secret-define --file s... | 422 | 20.15 | 78 | sh |
null | ceph-main/qa/qa_scripts/openstack/execs/openstack-preinstall.sh | #!/usr/bin/env bash
set -f
#
# Remotely setup the stuff needed to run packstack. This should do items 1-4 in
# https://docs.google.com/document/d/1us18KR3LuLyINgGk2rmI-SVj9UksCE7y4C2D_68Aa8o/edit?ts=56a78fcb
#
yum remove -y rhos-release
rpm -ivh http://rhos-release.virt.bos.redhat.com/repos/rhos-release/rhos-release-... | 554 | 29.833333 | 98 | sh |
null | ceph-main/qa/qa_scripts/openstack/execs/run_openstack.sh | #!/usr/bin/env bash
set -fv
#
# Create a glance image, a corresponding cinder volume, a nova instance, attach, the cinder volume to the
# nova instance, and create a backup.
#
image_name=${1}X
file_name=${2-rhel-server-7.2-x86_64-boot.iso}
source ./keystonerc_admin
glance image-create --name $image_name --disk-format... | 986 | 40.125 | 105 | sh |
null | ceph-main/qa/qa_scripts/openstack/execs/start_openstack.sh | #!/usr/bin/env bash
set -fv
#
# start the Openstack services
#
sudo cp /root/keystonerc_admin ./keystonerc_admin
sudo chmod 0644 ./keystonerc_admin
source ./keystonerc_admin
sudo service httpd stop
sudo service openstack-keystone restart
sudo service openstack-glance-api restart
sudo service openstack-nova-compute res... | 415 | 25 | 49 | sh |
null | ceph-main/qa/rbd/common.sh | #!/usr/bin/env bash
die() {
echo "$*"
exit 1
}
cleanup() {
rm -rf $TDIR
TDIR=""
}
set_variables() {
# defaults
[ -z "$bindir" ] && bindir=$PWD # location of init-ceph
if [ -z "$conf" ]; then
conf="$basedir/ceph.conf"
[ -e $conf ] || conf="/etc/ceph/ceph.conf"
fi
[ ... | 2,161 | 19.788462 | 76 | sh |
null | ceph-main/qa/rbd/rbd.sh | #!/usr/bin/env bash
set -x
basedir=`echo $0 | sed 's/[^/]*$//g'`.
. $basedir/common.sh
rbd_test_init
create_multiple() {
for i in `seq 1 10`; do
rbd_create_image $i
done
for i in `seq 1 10`; do
rbd_add $i
done
for i in `seq 1 10`; do
devname=/dev/rbd`eval echo \\$rbd$i`
echo $devname
done
for i in `... | 676 | 12.27451 | 38 | sh |
null | ceph-main/qa/standalone/ceph-helpers.sh | #!/usr/bin/env bash
#
# Copyright (C) 2013,2014 Cloudwatt <libre.licensing@cloudwatt.com>
# Copyright (C) 2014,2015 Red Hat <contact@redhat.com>
# Copyright (C) 2014 Federico Gimenez <fgimenez@coit.es>
#
# Author: Loic Dachary <loic@dachary.org>
# Author: Federico Gimenez <fgimenez@coit.es>
#
# This program is free sof... | 72,141 | 28.93444 | 175 | sh |
null | ceph-main/qa/standalone/c2c/c2c.sh | #!/usr/bin/env bash
set -ex
function run_perf_c2c() {
# First get some background system info
uname -a > uname.out
lscpu > lscpu.out
cat /proc/cmdline > cmdline.out
timeout -s INT 10 vmstat -w 1 > vmstat.out || true
sudo dmesg >& dmesg.out
cat /proc/cpuinfo > cpuinfo.out
ps axo psr,tim... | 3,139 | 35.941176 | 115 | sh |
null | ceph-main/qa/standalone/crush/crush-choose-args.sh | #!/usr/bin/env bash
#
# Copyright (C) 2017 Red Hat <contact@redhat.com>
#
# Author: Loic Dachary <loic@dachary.org>
#
# 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 you... | 7,592 | 30.118852 | 150 | sh |
null | ceph-main/qa/standalone/crush/crush-classes.sh | #!/usr/bin/env bash
#
# Copyright (C) 2017 Red Hat <contact@redhat.com>
#
# Author: Loic Dachary <loic@dachary.org>
#
# 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 you... | 9,876 | 36.131579 | 156 | sh |
null | ceph-main/qa/standalone/erasure-code/test-erasure-code-plugins.sh | #!/usr/bin/env bash
set -x
source $CEPH_ROOT/qa/standalone/ceph-helpers.sh
arch=$(uname -m)
case $arch in
i[[3456]]86*|x86_64*|amd64*)
legacy_jerasure_plugins=(jerasure_generic jerasure_sse3 jerasure_sse4)
legacy_shec_plugins=(shec_generic shec_sse3 shec_sse4)
plugins=(jerasure shec lrc i... | 4,144 | 33.831933 | 133 | sh |
null | ceph-main/qa/standalone/erasure-code/test-erasure-code.sh | #!/usr/bin/env bash
#
# Copyright (C) 2014 Cloudwatt <libre.licensing@cloudwatt.com>
# Copyright (C) 2014, 2015 Red Hat <contact@redhat.com>
#
# Author: Loic Dachary <loic@dachary.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Library Public License as publ... | 10,393 | 29.751479 | 114 | sh |
null | ceph-main/qa/standalone/erasure-code/test-erasure-eio.sh | #!/usr/bin/env bash
#
# Copyright (C) 2015 Red Hat <contact@redhat.com>
#
#
# Author: Kefu Chai <kchai@redhat.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... | 19,747 | 27.171184 | 85 | sh |
null | ceph-main/qa/standalone/mgr/balancer.sh | #!/usr/bin/env bash
#
# Copyright (C) 2019 Red Hat <contact@redhat.com>
#
# Author: David Zafman <dzafman@redhat.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 y... | 7,323 | 31.696429 | 139 | sh |
null | ceph-main/qa/standalone/misc/mclock-config.sh | #!/usr/bin/env bash
#
# Copyright (C) 2022 Red Hat <contact@redhat.com>
#
# Author: Sridhar Seshasayee <sseshasa@redhat.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, o... | 18,490 | 38.510684 | 90 | sh |
null | ceph-main/qa/standalone/misc/network-ping.sh | #!/usr/bin/env bash
source $CEPH_ROOT/qa/standalone/ceph-helpers.sh
function run() {
local dir=$1
shift
export CEPH_MON="127.0.0.1:7146" # git grep '\<7146\>' : there must be only one
export CEPH_ARGS
CEPH_ARGS+="--fsid=$(uuidgen) --auth-supported=none "
CEPH_ARGS+="--mon-host=$CEPH_MON "
... | 6,542 | 37.488235 | 95 | sh |
null | ceph-main/qa/standalone/misc/ok-to-stop.sh | #!/usr/bin/env bash
source $CEPH_ROOT/qa/standalone/ceph-helpers.sh
function run() {
local dir=$1
shift
export CEPH_MON_A="127.0.0.1:7150" # git grep '\<7150\>' : there must be only one
export CEPH_MON_B="127.0.0.1:7151" # git grep '\<7151\>' : there must be only one
export CEPH_MON_C="127.0.0.1:... | 8,982 | 29.245791 | 103 | sh |
null | ceph-main/qa/standalone/misc/rados-striper.sh | #!/usr/bin/env bash
#
# Copyright (C) 2014 Red Hat <contact@redhat.com>
#
# Author: Sebastien Ponce <sebastien.ponce@cern.ch>
#
# 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, ... | 4,113 | 39.333333 | 103 | sh |
null | ceph-main/qa/standalone/misc/test-ceph-helpers.sh | #!/usr/bin/env bash
#
# Copyright (C) 2013,2014 Cloudwatt <libre.licensing@cloudwatt.com>
# Copyright (C) 2014 Red Hat <contact@redhat.com>
# Copyright (C) 2014 Federico Gimenez <fgimenez@coit.es>
#
# Author: Loic Dachary <loic@dachary.org>
# Author: Federico Gimenez <fgimenez@coit.es>
#
# This program is free software... | 821 | 36.363636 | 70 | sh |
null | ceph-main/qa/standalone/misc/test-snaptrim-stats.sh | #!/usr/bin/env bash
#
# Copyright (C) 2022 Red Hat <contact@redhat.com>
#
# Author: Sridhar Seshasayee <sseshasa@redhat.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, o... | 5,635 | 28.820106 | 83 | sh |
null | ceph-main/qa/standalone/misc/ver-health.sh | #!/usr/bin/env bash
#
# Copyright (C) 2020 Red Hat <contact@redhat.com>
#
# Author: David Zafman <dzafman@redhat.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 y... | 9,707 | 40.844828 | 133 | sh |
null | ceph-main/qa/standalone/mon-stretch/mon-stretch-fail-recovery.sh | #!/usr/bin/env bash
source $CEPH_ROOT/qa/standalone/ceph-helpers.sh
function run() {
local dir=$1
shift
export CEPH_MON_A="127.0.0.1:7139" # git grep '\<7139\>' : there must be only one
export CEPH_MON_B="127.0.0.1:7141" # git grep '\<7141\>' : there must be only one
export CEPH_MON_C="127.0.0.1:7... | 4,639 | 30.351351 | 102 | sh |
null | ceph-main/qa/standalone/mon-stretch/mon-stretch-uneven-crush-weights.sh | #!/usr/bin/env bash
source $CEPH_ROOT/qa/standalone/ceph-helpers.sh
function run() {
local dir=$1
shift
export CEPH_MON_A="127.0.0.1:7139" # git grep '\<7139\>' : there must be only one
export CEPH_MON_B="127.0.0.1:7141" # git grep '\<7141\>' : there must be only one
export CEPH_MON_C="127.0.0.1:7... | 4,966 | 33.255172 | 102 | sh |
null | ceph-main/qa/standalone/mon/health-mute.sh | #!/bin/bash
source $CEPH_ROOT/qa/standalone/ceph-helpers.sh
function run() {
local dir=$1
shift
export CEPH_MON="127.0.0.1:7143" # git grep '\<714\>' : there must be only one
export CEPH_ARGS
CEPH_ARGS+="--fsid=$(uuidgen) --auth-supported=none --mon-pg-warn-min-per-osd 0 --mon-max-pg-per-osd 1000... | 3,385 | 26.088 | 111 | sh |
null | ceph-main/qa/standalone/mon/misc.sh | #!/usr/bin/env bash
#
# Copyright (C) 2014 Cloudwatt <libre.licensing@cloudwatt.com>
# Copyright (C) 2014, 2015 Red Hat <contact@redhat.com>
#
# Author: Loic Dachary <loic@dachary.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Library Public License as publ... | 12,390 | 42.477193 | 111 | sh |
null | ceph-main/qa/standalone/mon/mkfs.sh | #!/usr/bin/env bash
#
# Copyright (C) 2013 Cloudwatt <libre.licensing@cloudwatt.com>
# Copyright (C) 2014 Red Hat <contact@redhat.com>
#
# Author: Loic Dachary <loic@dachary.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Library Public License as published ... | 4,454 | 21.963918 | 77 | sh |
null | ceph-main/qa/standalone/mon/mon-bind.sh | #!/usr/bin/env bash
#
# Copyright (C) 2017 Quantum Corp.
#
# 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 later version.
#
# This program is distribu... | 5,024 | 33.895833 | 111 | sh |