
Add the ability to use tox for unit tests, since it helps us solve the problem of supporting multiple branches that require different versions of dependencies, and allows us to possibly support multiple versions of python in the future. Also fix the code to work with pre-grizzly environments, by not requiring the constraints backport. Also fixed the xattr support to work with both pyxattr and xattr modules. And fixed the ring tests to also work without a live /etc/swift directory. BUG: 948657 (https://bugzilla.redhat.com/show_bug.cgi?id=948657) Change-Id: I2be79c8ef8916bb6552ef957094f9186a963a068 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4781 Reviewed-by: Alex Wheeler <wheelear@gmail.com> Tested-by: Alex Wheeler <wheelear@gmail.com> Reviewed-by: Anand Avati <avati@redhat.com>
45 lines
917 B
Bash
Executable File
45 lines
917 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Note that these port numbers must match the configured values for the
|
|
# various servers in their configuration files.
|
|
declare -A port=(["account.builder"]=6012 ["container.builder"]=6011 \
|
|
["object.builder"]=6010)
|
|
|
|
builder_files="account.builder container.builder object.builder"
|
|
|
|
function create {
|
|
swift-ring-builder $1 create 1 1 1 >> /tmp/out
|
|
}
|
|
|
|
function add {
|
|
swift-ring-builder $1 add z$2-127.0.0.1:$3/$4_ 100.0
|
|
}
|
|
|
|
function rebalance {
|
|
swift-ring-builder $1 rebalance
|
|
}
|
|
|
|
function build {
|
|
swift-ring-builder $1
|
|
}
|
|
|
|
if [ "$1x" = "x" ]; then
|
|
echo "Please specify the gluster volume name to use."
|
|
exit 1
|
|
fi
|
|
|
|
for builder_file in $builder_files
|
|
do
|
|
create $builder_file
|
|
|
|
zone=1
|
|
for volname in $@
|
|
do
|
|
add $builder_file $zone ${port[$builder_file]} $volname
|
|
zone=$(expr $zone + 1)
|
|
done
|
|
|
|
rebalance $builder_file
|
|
build $builder_file
|
|
done
|