[Bugs] [Bug 1357835] New: Gluster/ NFS does not accept dashes in hostnames in exports/netgroups files

bugzilla at redhat.com bugzilla at redhat.com
Tue Jul 19 10:39:43 UTC 2016


https://bugzilla.redhat.com/show_bug.cgi?id=1357835

            Bug ID: 1357835
           Summary: Gluster/NFS does not accept dashes in hostnames in
                    exports/netgroups files
           Product: GlusterFS
           Version: 3.7.13
         Component: nfs
          Keywords: Triaged
          Severity: high
          Priority: medium
          Assignee: ndevos at redhat.com
          Reporter: ndevos at redhat.com
                CC: bugs at gluster.org
        Depends On: 1350237



+++ This bug was initially created as a clone of Bug #1350237 +++

Description of problem:
Hostnames with dashes (like "vagrant-testVM") are not correctly parsed when
reading the exports/netgroups files. This causes tests/basic/mount-nfs-auth.t
and tests/basic/netgroup_parsing.t to fail.

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

How reproducible:
100%

Steps to Reproduce:
1. configure a system with a hostname containing a dash
2. run: ./run-tests.sh tests/basic/netgroup_parsing.t
3. see the test fail

Actual results:
netgroup_parsing.t fails

Expected results:
netgroup_parsing.t should pass

Additional info:

--- Additional comment from Niels de Vos on 2016-06-26 22:53:23 CEST ---

Testing with a resolvable hostname can be done like this:

- edit /etc/hostname, /etc/sysconfig/network and run 'hostname <new-hostname>'
- edit /etc/hosts and add a new line with the external IP and hostname

- copy /etc/resolv.conf to a backup location for further reference
- statically configure DNS (in /etc/sysconfig/network add DNS1=127.0.0.1)
- restart NetworkManager or the network service
- /etc/resolve.conf should now contain 'nameserver 127.0.0.1'

- install dnsmasq on the system (make sure libvirtd is not running)
- find the nameserver from the original resolv.conf (8.8.8.8 in the example)
- create the file /etc/dnsmasq.d/upstream-dns.conf with 'server=8.8.8.8'
- start dnsmasq and verify it is running

- verify with 'host <new-hostname>' that the hostname is in DNS
- verify with 'host <public-ip>' that the hostname is in DNS

--- Additional comment from Vijay Bellur on 2016-06-26 22:53:55 CEST ---

REVIEW: http://review.gluster.org/14809 (nfs: allow hostnames with dashes in
exports/netgroups files) posted (#1) for review on master by Niels de Vos
(ndevos at redhat.com)

--- Additional comment from Vijay Bellur on 2016-06-28 11:54:45 CEST ---

REVIEW: http://review.gluster.org/14809 (nfs: allow hostnames with dashes in
exports/netgroups files) posted (#2) for review on master by Niels de Vos
(ndevos at redhat.com)

--- Additional comment from Vijay Bellur on 2016-06-28 22:29:17 CEST ---

COMMIT: http://review.gluster.org/14809 committed in master by Jeff Darcy
(jdarcy at redhat.com) 
------
commit e5221d288e41d29d89d52f8deab657d2285a852c
Author: Niels de Vos <ndevos at redhat.com>
Date:   Sun Jun 26 18:50:27 2016 +0200

    nfs: allow hostnames with dashes in exports/netgroups files

    Hostnames with dashes (like "vagrant-testVM") are not correctly parsed
    when reading the exports/netgroups files. This bacomes obvious when
    running ./run-tests-in-vagrant.sh because it causes
    tests/basic/mount-nfs-auth.t and tests/basic/netgroup_parsing.t to fail.

    The regex for hostname (in exports) and the entry and hostname
    (netgroups) parsing does not include the "-" sign, and hence the
    hostnames are splitted at it.

    BUG: 1350237
    Change-Id: I38146a283561e1fa386cc841c43fd3b1e30a87ad
    Signed-off-by: Niels de Vos <ndevos at redhat.com>
    Reviewed-on: http://review.gluster.org/14809
    Smoke: Gluster Build System <jenkins at build.gluster.org>
    NetBSD-regression: NetBSD Build System <jenkins at build.gluster.org>
    CentOS-regression: Gluster Build System <jenkins at build.gluster.org>
    Reviewed-by: Jeff Darcy <jdarcy at redhat.com>


Referenced Bugs:

https://bugzilla.redhat.com/show_bug.cgi?id=1350237
[Bug 1350237] Gluster/NFS does not accept dashes in hostnames in
exports/netgroups files
-- 
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=5K4jQva8yK&a=cc_unsubscribe


More information about the Bugs mailing list