summaryrefslogtreecommitdiffstats
path: root/src/test/cli-integration/rbd
diff options
context:
space:
mode:
authorDeepika Upadhyay <dupadhya@redhat.com>2022-01-12 10:56:04 +0100
committerDeepika Upadhyay <dupadhya@redhat.com>2022-01-13 18:19:28 +0100
commit8416173a7bff6bb1b7e3e8e2f525e52551437b07 (patch)
tree6d8bbba66ae60572a886d128e6a6904a65d4e5f2 /src/test/cli-integration/rbd
parentMerge pull request #44577 from clementperon/master (diff)
downloadceph-8416173a7bff6bb1b7e3e8e2f525e52551437b07.tar.xz
ceph-8416173a7bff6bb1b7e3e8e2f525e52551437b07.zip
test/rbd/iscsi: correct the HOST name provided.
hostname -f and hostname generated from gwcli_create being different gave rise to error: The first gateway defined must be the local machine Fixes: https://tracker.ceph.com/issues/53830 Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
Diffstat (limited to 'src/test/cli-integration/rbd')
-rw-r--r--src/test/cli-integration/rbd/gwcli_create.t6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/cli-integration/rbd/gwcli_create.t b/src/test/cli-integration/rbd/gwcli_create.t
index 67fdceb8855..b464681fba0 100644
--- a/src/test/cli-integration/rbd/gwcli_create.t
+++ b/src/test/cli-integration/rbd/gwcli_create.t
@@ -34,7 +34,7 @@ Create the target IQN
Create the first gateway
========================
- $ HOST=$(python3 -c "import socket; print(socket.getfqdn())" | cut -d. -f1)
+ $ HOST=$(python3 -c "import socket; print(socket.getfqdn())")
> IP=`hostname -i | awk '{print $1}'`
> sudo podman exec $ISCSI_CONTAINER gwcli iscsi-targets/iqn.2003-01.com.redhat.iscsi-gw:ceph-gw/gateways create ip_addresses=$IP gateway_name=$HOST
$ sudo podman exec $ISCSI_CONTAINER gwcli ls iscsi-targets/ | grep 'o- gateways' | awk -F'[' '{print $2}'
@@ -44,12 +44,12 @@ Create the second gateway
========================
$ IP=`cat /etc/ceph/iscsi-gateway.cfg |grep 'trusted_ip_list' | awk -F'[, ]' '{print $3}'`
> if [ "$IP" != `hostname -i | awk '{print $1}'` ]; then
- > HOST=$(python3 -c "import socket; print(socket.getfqdn('$IP'))" | cut -d. -f1)
+ > HOST=$(python3 -c "import socket; print(socket.getfqdn('$IP'))")
> sudo podman exec $ISCSI_CONTAINER gwcli iscsi-targets/iqn.2003-01.com.redhat.iscsi-gw:ceph-gw/gateways create ip_addresses=$IP gateway_name=$HOST
> fi
$ IP=`cat /etc/ceph/iscsi-gateway.cfg |grep 'trusted_ip_list' | awk -F'[, ]' '{print $4}'`
> if [ "$IP" != `hostname -i | awk '{print $1}'` ]; then
- > HOST=$(python3 -c "import socket; print(socket.getfqdn('$IP'))" | cut -d. -f1)
+ > HOST=$(python3 -c "import socket; print(socket.getfqdn('$IP'))")
> sudo podman exec $ISCSI_CONTAINER gwcli iscsi-targets/iqn.2003-01.com.redhat.iscsi-gw:ceph-gw/gateways create ip_addresses=$IP gateway_name=$HOST
> fi
$ sudo podman exec $ISCSI_CONTAINER gwcli ls iscsi-targets/ | grep 'o- gateways' | awk -F'[' '{print $2}'