Bug 84917

Summary: tool bombs on blank lines
Product: [Retired] Red Hat Linux Reporter: Gordon Messmer <gordon.messmer>
Component: redhat-config-nfsAssignee: Brent Fox <bfox>
Severity: medium Docs Contact:
Priority: medium    
Version: 9CC: francis+rh+bugzilla
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-02-21 18:51:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 79578    
Description Flags
simple patch to make the program ignore blank lines
patch to improve the nfs data classes none

Description Gordon Messmer 2003-02-23 21:15:14 UTC
Description of problem:
If /etc/exports contains a blank line, the program will crash.

The program will also crash if there's a line with less than
two tokens from the initial split and otherwise doesn't handle
some files which may have been previously set up by hand,
(or in some cases by the tool itself).

The UI is also broken, such that it is not suitable for configuring
options for more than one host.  I'm attaching two patches.  The 
first just makes the program not crash on blank lines.  The second
is a revision to the parser (nfsBackend.py) and the data class
(nfsData.py) to make the tool more robust.  However, the patch doesn't
produce a working tool, since the UI needs to be updated to use
the better backend.  I'm not sure exactly how that should happen.
Maybe change the "hosts" item on the properties window into a combo
box with each host and re-populate the options on change?

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

How reproducible:

Steps to Reproduce:
1. Start the tool when there's a blank line in /etc/exports

Comment 1 Gordon Messmer 2003-02-23 21:18:07 UTC
Created attachment 90298 [details]
simple patch to make the program ignore blank lines

Comment 2 Gordon Messmer 2003-02-23 21:20:07 UTC
Created attachment 90299 [details]
patch to improve the nfs data classes

In order for this to be useful, the UI must also be fixed to get a list of the
hosts in the NFS export, and configure them individually.

Comment 3 Brent Fox 2003-02-24 21:31:25 UTC

*** This bug has been marked as a duplicate of 83408 ***

Comment 4 John Stracke 2003-02-26 03:11:47 UTC
Only part of this bug is a duplicate of 83408; the problem of not being able to
handle multiple hosts per entry is distinct.  I've had this problem, too; the UI
says "Hosts", but, if you enter a comma-separated list of hosts, you generate an
invalid /etc/exports.  The only solution (other than giving up on the GUI tool)
is to add multiple entries, one per host.  There isn't even a Duplicate command.
 So, unless the set of hosts you want to apply an entry to matches what
/etc/exports can handle natively (*.domain.example.com, or 192.168.0.*, or an
NIS group--not that common these days), if you have a lot of hosts to handle,
the GUI becomes less useful than, say, vi.

Comment 5 Red Hat Bugzilla 2006-02-21 18:51:57 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.