Bug 1687496
Summary: | nfsconf: update nfs.conf inplace instead of replacing the file | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Alice Mitchell <ajmitchell> | ||||||
Component: | nfs-utils | Assignee: | Alice Mitchell <ajmitchell> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Yongcheng Yang <yoyang> | ||||||
Severity: | unspecified | Docs Contact: | |||||||
Priority: | unspecified | ||||||||
Version: | 8.0 | CC: | steved, xzhou, yoyang | ||||||
Target Milestone: | rc | Keywords: | FutureFeature | ||||||
Target Release: | 8.1 | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | nfs-utils-2.3.3-22.el8 | Doc Type: | If docs needed, set a value | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2019-11-05 22:18:26 UTC | Type: | Enhancement | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | 1653927, 1681972 | ||||||||
Bug Blocks: | |||||||||
Attachments: |
|
Description
Alice Mitchell
2019-03-11 15:42:59 UTC
Created attachment 1545998 [details]
Modify nfs.conf in-place
Proposed patch to modify the file contents and guard it with an flock
Created attachment 1546161 [details]
Proposed patch to impliment file rewriting
Have checked the previous permissions won't be changed after "nfsconver" now: [root@hp-dl360g9-14 ~]# rpm -q nfs-utils nfs-utils-2.3.3-19.el8.x86_64 [root@hp-dl360g9-14 ~]# stat /etc/nfs.conf File: /etc/nfs.conf Size: 1024 Blocks: 8 IO Block: 4096 regular file Device: fd00h/64768d Inode: 50366035 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) Context: system_u:object_r:etc_t:s0 Access: 2019-07-11 00:14:13.947382375 -0400 Modify: 2019-06-12 13:40:03.000000000 -0400 Change: 2019-07-11 00:14:12.997383859 -0400 Birth: - [root@hp-dl360g9-14 ~]# echo 'RPCNFSDARGS="-V4"' > /etc/sysconfig/nfs [root@hp-dl360g9-14 ~]# nfsconvert [root@hp-dl360g9-14 ~]# ls /etc/sysconfig/nfs ls: cannot access '/etc/sysconfig/nfs': No such file or directory [root@hp-dl360g9-14 ~]# grep -A1 '\[nfsd\]' /etc/nfs.conf [nfsd] vers4 = y [root@hp-dl360g9-14 ~]# stat /etc/nfs.conf File: /etc/nfs.conf Size: 1034 Blocks: 8 IO Block: 4096 regular file Device: fd00h/64768d Inode: 50366035 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) Context: system_u:object_r:etc_t:s0 Access: 2019-07-11 00:15:43.425242596 -0400 Modify: 2019-07-11 00:15:09.433295699 -0400 Change: 2019-07-11 00:15:09.434295697 -0400 Birth: - [root@hp-dl360g9-14 ~]# Will update testcase to cover this later. Moving to VERIFIED based on test logs of Comment #7 now. 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://access.redhat.com/errata/RHBA-2019:3579 |