This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1270349 - NFS mount uses incorrect hostname
NFS mount uses incorrect hostname
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: nfs-utils (Show other bugs)
7.1
Unspecified Unspecified
unspecified Severity low
: rc
: ---
Assigned To: Steve Dickson
Filesystem QE
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-09 13:59 EDT by stein
Modified: 2016-09-12 09:39 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-09-12 09:39:36 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description stein 2015-10-09 13:59:10 EDT
Description of problem:
Specify 2 NFS mount entries in /etc/fstab, each with a DNS hostname for the server name.

If 2 different DNS hostnames are specified but both hostnames point to the same IP address, the mount command will use the DNS hostname associated with the first filesystem that is mounted, rather than the hostname specified for each entry.

The output of the df command also shows the incorrect hostname that does not match the /etc/fstab entry


Version-Release number of selected component (if applicable):
2.23.2.22.el7_1.1


How reproducible:
Happens every time mount is called.


Steps to Reproduce:
1. Create 2 NFS mount entries in /etc/fstab

 hostname1.domain:/filesystem1 /mnt/filesystem1 nfs defaults 0 0
 hostname2.domain:/filesystem2 /mnt/filesystem2 nfs defaults 0 0

(hostname1.domain & hostname2.domain should resolve to the same IP address)

2. mount each filesystem
 mount /mnt/filesystem1
 mount /mnt/filesystem2

3. run 'df' and observe the output


Actual results:
df & mount will show both filesystems mounted, but the hostnames on both entries will be the same.

sample df output:
 hostname1.domain:/filesystem1      12345678 10000000   2345678  81% /mnt/filesystem1
 hostname1.domain:/filesystem2      15342592 10006528   2345678  81% /mnt/filesystem2


Expected results:
df output should look like:
 hostname1.domain:/filesystem1      12345678 10000000   2345678  81% /mnt/filesystem1
 hostname2.domain:/filesystem2      15342592 10006528   2345678  81% /mnt/filesystem2


Additional info:
Comment 3 Steve Dickson 2016-04-06 13:45:35 EDT
(In reply to stein from comment #0)
> Description of problem:
> Specify 2 NFS mount entries in /etc/fstab, each with a DNS hostname for the
> server name.
> 
> If 2 different DNS hostnames are specified but both hostnames point to the
> same IP address, the mount command will use the DNS hostname associated with
> the first filesystem that is mounted, rather than the hostname specified for
> each entry.
> 
> The output of the df command also shows the incorrect hostname that does not
> match the /etc/fstab entry

Why in the world would you want two hostnames pointing to the same IP
address... That is a DNS misconfiguration... IMHO...
Comment 4 stein 2016-04-29 08:46:45 EDT
(In reply to Steve Dickson from comment #3)
> (In reply to stein from comment #0)
> > Description of problem:
> > Specify 2 NFS mount entries in /etc/fstab, each with a DNS hostname for the
> > server name.
> > 
> > If 2 different DNS hostnames are specified but both hostnames point to the
> > same IP address, the mount command will use the DNS hostname associated with
> > the first filesystem that is mounted, rather than the hostname specified for
> > each entry.
> > 
> > The output of the df command also shows the incorrect hostname that does not
> > match the /etc/fstab entry
> 
> Why in the world would you want two hostnames pointing to the same IP
> address... That is a DNS misconfiguration... IMHO...


How is having 2 DNS names pointing to the same IP address a DNS misconfiguration?  DNS allows this.  You can have 2 services running on the same server, each with a different hostname.
Comment 5 stein 2016-04-29 08:47:56 EDT
This problem does not occur in RHEL5 or RHEL6.  This bug was introduced in RHEL7.
Comment 6 Steve Dickson 2016-05-19 14:29:25 EDT
(In reply to stein from comment #4)
> (In reply to Steve Dickson from comment #3)
> 
> 
> How is having 2 DNS names pointing to the same IP address a DNS
> misconfiguration?  DNS allows this.  You can have 2 services running on the
> same server, each with a different hostname.

What would be the purpose of having a configuration like this?
Cluster failover or something?
Comment 7 stein 2016-05-19 17:18:03 EDT
A service has a file share associated with it.  That service has multiple instances - dev, qa, prod.

The file share for dev has a DNS name of dev.fileshare.example.com
The file share for qa has a DNS name of qa.fileshare.example.com
The file share for prod has a DNS name of prod.fileshare.example.com

dev.fileshare.example.com & qa.fileshare.example.com share the same server so they both resolve to 192.168.1.1
prod.fileshare.example.com is on its own server and resolves to to 192.168.11.1
Comment 8 Steve Dickson 2016-08-23 12:57:52 EDT
have you tried the 'nosharecache' mount option?
Comment 9 stein 2016-09-06 11:00:23 EDT
Using the legacy caching behavior of 'nosharecache' resolves this.
Comment 10 Steve Dickson 2016-09-12 09:39:36 EDT
Closing due to Comment 9

Note You need to log in before you can comment on or make changes to this bug.