Bug 1304465

Summary: dnscache in libglusterfs returns 127.0.0.1 for 1st non-localhost request
Product: [Community] GlusterFS Reporter: Niels de Vos <ndevos>
Component: coreAssignee: Rinku <rkothiya>
Status: CLOSED WORKSFORME QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: mainlineCC: atumball, bugs, kaushal, pkarampu
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-17 05:49:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Niels de Vos 2016-02-03 17:16:01 UTC
Description of problem:
When 

Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1. setup a Gluster volume (server is called storage.example.com below)
2. on a non-Gluster server (client only):
   # mount -t glusterfs -o backup-volfile-servers=storage.example.com \
            localhost:/volume /mnt

Actual results:
Mounting will fail.

Expected results:
Mounting succeeds.

Additional info:
Enabling DEBUG logging with the additional "log-level=DEBUG" mount option shows that the 1st DNS lookup in common-utils.c:333:gf_resolve_ip6 returns 127.0.0.1 for the storage.example.com hostname.

Comment 1 Amar Tumballi 2019-05-09 10:09:05 UTC
Can we see if this is the behavior with glusterfs-6.x and take appropriate action? 

I have not heard about this issue in recent time, but would validate it before closing this.

Comment 2 Rinku 2019-06-13 07:45:54 UTC
Glusterfs version used for testing : v6.3

Servers used for testing : 

    Hostname : GlusterNode1.com, Ip :  192.168.1.10
    Hostname : GlusterNode2.com, Ip : 192.168.1.20

Following distributed volume was created : 

    # gluster v info devvol
    Volume Name: devvol
    Type: Distribute
    Volume ID: 2b3a4bb0-f8c2-40e5-b5f5-61b9e89ace45
    Status: Started
    Snapshot Count: 0
    Number of Bricks: 2
    Transport-type: tcp
    Bricks:
    Brick1: 192.168.1.10:/testxfs/brick-a1/brick
    Brick2: 192.168.1.20:/testxfs/brick-b1/brick
    Options Reconfigured:
    transport.address-family: inet
    nfs.disable: on

Fired the following command from the client : 

    # mount -t glusterfs -o backup-volfile-servers=GlusterNode2.com,log-level=DEBUG GlusterNode1.com:/devvol /mnt1


Result :  

    Was successfully able to mount the volume. 

Logs : 

    [2019-06-13 07:25:32.159993] D [MSGID: 0] [common-utils.c:532:gf_resolve_ip6] 0-resolver: returning ip-192.168.1.10 (port-24007) for hostname: GlusterNode1.com and port: 24007
    .
    .
    .
    [2019-06-13 07:25:36.391372] D [MSGID: 0] [common-utils.c:532:gf_resolve_ip6] 0-resolver: returning ip-192.168.1.20 (port-24007) for hostname: GlusterNode2.com and port: 24007

Comment 3 Rinku 2019-06-17 05:49:02 UTC
As this is no more reproducible on latest version (v6.3) we are closing this.