mirror of
https://github.com/ceph/ceph
synced 2025-01-02 00:52:22 +00:00
1713c4852c
This is v2 of the rbd/nvmeof test: It deploys 1 gateway and 1 initiator. Then does basic verification on nvme commands and runs fio. This commit creates: 1. qa/tasks/nvmeof.py: adds a new 'Nvmeof' task which deploys the gateway and shares config with the initiator hosts. Sharing config was previously done by 'nvmeof_gateway_cfg' task in qa/tasks/cephadm.py (that task is removed in this commit). 2. qa/workunits/rbd/nvmeof_basic_tests.sh: Runs nvme commands (discovery, connect, connect-all, disconnect-all, and list-subsys) and does basic verification of the output. 3. qa/workunits/rbd/nvmeof_fio_test.sh: Runs fio command. Also runs iostat in parallel if IOSTAT_INTERVAL variable is set. This variable configures the delay between each iostat print. nvmeof-cli upgrade from v0.0.6 to v0.0.7 introduced major changes to all nvmeof commands. This commit changes v0.0.6 commands to v0.0.7 in qa/workunits/rbd/nvmeof_initiator.sh Signed-off-by: Vallari Agrawal <val.agl002@gmail.com>
27 lines
1.4 KiB
Bash
Executable File
27 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -ex
|
|
|
|
sudo modprobe nvme-fabrics
|
|
sudo modprobe nvme-tcp
|
|
sudo dnf install nvme-cli -y
|
|
|
|
source /etc/ceph/nvmeof.env
|
|
|
|
# RBD_POOL and RBD_IMAGE is intended to be set from yaml, 'mypool' and 'myimage' are defaults
|
|
RBD_POOL="${RBD_POOL:-mypool}"
|
|
RBD_IMAGE="${RBD_IMAGE:-myimage}"
|
|
|
|
HOSTNAME=$(hostname)
|
|
sudo podman images
|
|
sudo podman ps
|
|
sudo podman run -it $NVMEOF_CLI_IMAGE --server-address $NVMEOF_GATEWAY_IP_ADDRESS --server-port $NVMEOF_SRPORT subsystem list
|
|
sudo podman run -it $NVMEOF_CLI_IMAGE --server-address $NVMEOF_GATEWAY_IP_ADDRESS --server-port $NVMEOF_SRPORT subsystem add --subsystem $NVMEOF_NQN
|
|
sudo podman run -it $NVMEOF_CLI_IMAGE --server-address $NVMEOF_GATEWAY_IP_ADDRESS --server-port $NVMEOF_SRPORT namespace add --subsystem $NVMEOF_NQN --rbd-pool $RBD_POOL --rbd-image $RBD_IMAGE
|
|
sudo podman run -it $NVMEOF_CLI_IMAGE --server-address $NVMEOF_GATEWAY_IP_ADDRESS --server-port $NVMEOF_SRPORT listener add --subsystem $NVMEOF_NQN --gateway-name client.$NVMEOF_GATEWAY_NAME --traddr $NVMEOF_GATEWAY_IP_ADDRESS --trsvcid $NVMEOF_PORT
|
|
sudo podman run -it $NVMEOF_CLI_IMAGE --server-address $NVMEOF_GATEWAY_IP_ADDRESS --server-port $NVMEOF_SRPORT host add --subsystem $NVMEOF_NQN --host "*"
|
|
sudo podman run -it $NVMEOF_CLI_IMAGE --server-address $NVMEOF_GATEWAY_IP_ADDRESS --server-port $NVMEOF_SRPORT subsystem list
|
|
sudo lsmod | grep nvme
|
|
sudo nvme list
|
|
|
|
echo "[nvmeof] Initiator setup done" |