The value of $HOSTNAME in AWS machine is different from the value that nsloolup return
I reserve two machines via this command "testing-farm request --git-url https://gitlab.cee.redhat.com/xifeng/cifstest.git --git-ref master --compose=RHEL-9.7.0-Nightly --plan="/debug/multihost" --pipeline-type tmt-multihost --reserve --duration 4800"
login server: [root@ip-10-31-11-157 ~]# echo $HOSTNAME ip-10-31-11-157.testing-farm.us-east-1.aws.redhat.com [root@ip-10-31-11-157 ~]# hostname ip-10-31-11-157.testing-farm.us-east-1.aws.redhat.com [root@ip-10-31-11-157 ~]# nslookup 10.31.11.157 157.11.31.10.in-addr.arpa name = 7e21545f-659c-4ed0-a13f-656370210cb2.testing-farm.us-east-1.aws.redhat.com.
Authoritative answers can be found from:
login client: [root@ip-10-31-9-127 ~]# echo $HOSTNAME ip-10-31-9-127.testing-farm.us-east-1.aws.redhat.com [root@ip-10-31-9-127 ~]# hostname ip-10-31-9-127.testing-farm.us-east-1.aws.redhat.com [root@ip-10-31-9-127 ~]# nslookup 10.31.9.127 127.9.31.10.in-addr.arpa name = 7456f13c-1fe1-4c41-be26-f38f3ab02398.testing-farm.us-east-1.aws.redhat.com.
Authoritative answers can be found from:
Then ping the two hostname of server host. It can't ping $HOSTNAME of server. But it can with 7e21545f-659c-4ed0-a13f-656370210cb2.testing-farm.us-east-1.aws.redhat.com.
[root@ip-10-31-9-127 ~]# ping -c 1 ip-10-31-11-157.testing-farm.us-east-1.aws.redhat.com ping: ip-10-31-11-157.testing-farm.us-east-1.aws.redhat.com: Name or service not known [root@ip-10-31-9-127 ~]# ping -c1 7e21545f-659c-4ed0-a13f-656370210cb2.testing-farm.us-east-1.aws.redhat.com PING 7e21545f-659c-4ed0-a13f-656370210cb2.testing-farm.us-east-1.aws.redhat.com (10.31.11.157) 56(84) bytes of data. 64 bytes from 7e21545f-659c-4ed0-a13f-656370210cb2.testing-farm.us-east-1.aws.redhat.com (10.31.11.157): icmp_seq=1 ttl=64 time=0.200 ms
--- 7e21545f-659c-4ed0-a13f-656370210cb2.testing-farm.us-east-1.aws.redhat.com ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.200/0.200/0.200/0.000 ms [root@ip-10-31-9-127 ~]#
So two guest can't communicate with $HOSTNAME but can communicate with the hostname from nsloolup.