RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1276534 - [exportfs] exportfs -u cannot unexport when the specified path involves a trailing "/"
Summary: [exportfs] exportfs -u cannot unexport when the specified path involves a tra...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: nfs-utils
Version: 7.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Steve Dickson
QA Contact: Yongcheng Yang
URL:
Whiteboard:
Depends On:
Blocks: 1276538
TreeView+ depends on / blocked
 
Reported: 2015-10-30 03:47 UTC by Yongcheng Yang
Modified: 2016-11-04 05:01 UTC (History)
1 user (show)

Fixed In Version: nfs-utils-1.3.0-0.25.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1276538 (view as bug list)
Environment:
Last Closed: 2016-11-04 05:01:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2383 0 normal SHIPPED_LIVE nfs-utils bug fix and enhancement update 2016-11-03 13:53:02 UTC

Description Yongcheng Yang 2015-10-30 03:47:07 UTC
Description of problem:
When using "exportfs -u" to unexport just one directory, it always failed when the specified path involves a trailing "/", with error:
exportfs: Could not find 'client.example.com:/export/' to unexport.

Version-Release number of selected component (if applicable):
nfs-utils-1.3.0-0.21.el7

How reproducible:
100%

Steps to Reproduce:
1. exportfs -v $HOSTNAME:/export/
2. exportfs -u client2.example.com:/export/

Actual results:
[root@hp-dl388g8-17 ~]# exportfs -ua
[root@hp-dl388g8-17 ~]# exportfs -v $HOSTNAME:/export/
exporting hp-dl388g8-17.rhts.eng.pek2.redhat.com:/export/
[root@hp-dl388g8-17 ~]# exportfs -v
/export       	hp-dl388g8-17.rhts.eng.pek2.redhat.com(ro,wdelay,root_squash,no_subtree_check,sec=sys,ro,secure,root_squash,no_all_squash)
[root@hp-dl388g8-17 ~]# exportfs -u hp-dl388g8-17.rhts.eng.pek2.redhat.com:/export/ <<<<<<<<<<<<<<<<<<<<< failed
exportfs: Could not find 'hp-dl388g8-17.rhts.eng.pek2.redhat.com:/export/' to unexport.
[root@hp-dl388g8-17 ~]# echo $?
1
[root@hp-dl388g8-17 ~]# exportfs -v
/export       	hp-dl388g8-17.rhts.eng.pek2.redhat.com(ro,wdelay,root_squash,no_subtree_check,sec=sys,ro,secure,root_squash,no_all_squash)
[root@hp-dl388g8-17 ~]# exportfs -uv hp-dl388g8-17.rhts.eng.pek2.redhat.com:/export  <<<<<<<<<<<<<<<<<<<< success without trailing "/"
unexporting hp-dl388g8-17.rhts.eng.pek2.redhat.com:/export
[root@hp-dl388g8-17 ~]# echo $?
0
[root@hp-dl388g8-17 ~]# exportfs -v
[root@hp-dl388g8-17 ~]# 
[root@hp-dl388g8-17 ~]# rpm -q nfs-utils
nfs-utils-1.3.0-0.21.el7.x86_64
[root@hp-dl388g8-17 ~]# 

Expected results:
Unexport success

Additional info:
Can reproduced with RHEL6 too, will file another bug

Comment 2 Yongcheng Yang 2016-05-03 06:15:12 UTC
commit a9a7728d874398c855e386d9583cf05e681ecc1c
Author: Yongcheng Yang <yongcheng.yang>
Date:   Fri Dec 11 11:01:17 2015 -0500

    exportfs: Deal with path's trailing "/" in unexportfs_parsed()
    
    When unexport directory, it's possible that the specified path ends with
    a '/'. So we need to deal with it to find the matched entry.
    
    If not, there will be error like "Could not find '*:/some_path/' to
    unexport."

Comment 5 Yongcheng Yang 2016-05-30 08:45:11 UTC
Move to VERIFIED as comment 4 and continue to run the automatic case.

Comment 7 errata-xmlrpc 2016-11-04 05:01:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-2383.html


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