Bug 763981 (GLUSTER-2249) - Problems with hostname validation
Summary: Problems with hostname validation
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: GLUSTER-2249
Product: GlusterFS
Classification: Community
Component: unclassified
Version: mainline
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: tcp
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-12-23 17:06 UTC by Jeff Darcy
Modified: 2015-12-01 16:45 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)

Description Jeff Darcy 2010-12-23 17:06:29 UTC
A user on IRC was unable to start a filesystem because of the following:

E [xlator.c:602:_volume_option_value_validate] gfs-client-11: internet address 'WKS_2UA0441DXR' does not conform to standards.
E [graph.c:309:glusterfs_graph_validate_options] gfs-client-11: validating translator failed

As I dug into this, I found four different problems with how hostnames are validated.

(1) It's all very nice to be RFC-compliant (valid_host_name refers to "RFC 1123 & 952") but throwing an error and failing translator validation for something that would probably work otherwise seems a bit restrictive.

(2) If we are going to throw an error for a bad hostname, it should probably be done when we try to create the volume (which must not have checked).

(3) Any failure at either time should be reported to the user, not just buried in a log.

(4) The functions involved - at least valid_host_name and valid_internet_address, probably others - seem to be duplicated between libglusterfs/src/xlator.c and rpc/rpc-lib/src/rpc-transport.c, which could be a maintenance problem if bugs are ever fixed in one copy but not the other.

Comment 1 Anand Avati 2011-01-27 17:18:09 UTC
PATCH: http://patches.gluster.com/patch/6050 in master (Move hostname, ip address validating functions to libglusterfs.)

Comment 2 Vijay Bellur 2011-03-29 08:14:38 UTC
PATCH: http://patches.gluster.com/patch/6610 in master (Loosen restrictions on hostnames)


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