From 4deb68f930490d1ea9339fa5b89cf2c1bff6257a Mon Sep 17 00:00:00 2001 From: "J. Eric Ivancich" Date: Tue, 7 Jul 2020 22:40:10 -0400 Subject: [PATCH] rgw: orphan list teuthology test & fully-qualified domain issue Sometimes when teuthology machines are provisioned, the command `hostname --fqdn` does not provide a fully qualified domain name but instead just the hostname (e.g., smithi149 instead of smithi149.front.sepia.ceph.com). This prevents the teuthology test for rgw-orphan-list from running successfully [for example, the hostname was for some reason mis-interpreted as the bucket name in the request]. This commit checks whether the hostname derived from `hostname --fqdn` contains any '.'s and if it does not, it will append ".front.sepia.ceph.com" to the hostname. This is a hack, but until teuthology machines are configured appropriately it seems to be a reasonable work-around. Signed-off-by: J. Eric Ivancich (cherry picked from commit 3afc8ac25390493a2485ad1999e6370ddbe8b566) --- qa/workunits/rgw/test_rgw_orphan_list.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/qa/workunits/rgw/test_rgw_orphan_list.sh b/qa/workunits/rgw/test_rgw_orphan_list.sh index 67750cd0dc1ce..da96ccd32cbd8 100755 --- a/qa/workunits/rgw/test_rgw_orphan_list.sh +++ b/qa/workunits/rgw/test_rgw_orphan_list.sh @@ -17,6 +17,13 @@ awscli_dir=${HOME}/awscli_temp export PATH=${PATH}:${awscli_dir} rgw_host=$(hostname --fqdn) +if echo "$rgw_host" | grep -q '\.' ; then + : +else + host_domain=".front.sepia.ceph.com" + echo "WARNING: rgw hostname -- $rgw_host -- does not appear to be fully qualified; PUNTING and appending $host_domain" + rgw_host="${rgw_host}${host_domain}" +fi rgw_port=80 echo "Fully Qualified Domain Name: $rgw_host" -- 2.39.5