mirror of
https://github.com/ceph/ceph
synced 2024-12-25 04:43:17 +00:00
2ed818ebd8
Move all scripts qa/workunits/rbd/nvmeof_*.sh to qa/workunits/nvmeof/*.sh Signed-off-by: Vallari Agrawal <val.agl002@gmail.com>
40 lines
1.0 KiB
Bash
Executable File
40 lines
1.0 KiB
Bash
Executable File
#!/bin/bash -xe
|
|
|
|
|
|
GATEWAYS=$1 # exmaple "nvmeof.a,nvmeof.b"
|
|
DELAY="${SCALING_DELAYS:-50}"
|
|
|
|
if [ -z "$GATEWAYS" ]; then
|
|
echo "At least one gateway needs to be defined for scalability test"
|
|
exit 1
|
|
fi
|
|
|
|
pip3 install yq
|
|
|
|
status_checks() {
|
|
ceph nvme-gw show mypool ''
|
|
ceph orch ls
|
|
ceph orch ps
|
|
ceph -s
|
|
}
|
|
|
|
|
|
echo "[nvmeof.scale] Setting up config to remove gateways ${GATEWAYS}"
|
|
ceph orch ls nvmeof --export > /tmp/nvmeof-gw.yaml
|
|
cat /tmp/nvmeof-gw.yaml
|
|
yq "del(.placement.hosts[] | select(. | test(\".*($(echo $GATEWAYS | sed 's/,/|/g'))\")))" /tmp/nvmeof-gw.yaml > /tmp/nvmeof-gw-new.yaml
|
|
cat /tmp/nvmeof-gw-new.yaml
|
|
|
|
echo "[nvmeof.scale] Starting scale testing by removing ${GATEWAYS}"
|
|
status_checks
|
|
ceph orch rm nvmeof.mypool && sleep 20 # temp workaround
|
|
ceph orch apply -i /tmp/nvmeof-gw-new.yaml # downscale
|
|
sleep $DELAY
|
|
status_checks
|
|
ceph orch rm nvmeof.mypool && sleep 20 # temp workaround
|
|
ceph orch apply -i /tmp/nvmeof-gw.yaml #upscale
|
|
sleep $DELAY
|
|
status_checks
|
|
|
|
echo "[nvmeof.scale] Scale testing passed for ${GATEWAYS}"
|