Bug 1856884

Summary: /etc/group file is modified/touched after the update for nfs-utils
Product: Red Hat Enterprise Linux 7 Reporter: Parikshit Khedekar <pkhedeka>
Component: nfs-utilsAssignee: Steve Dickson <steved>
Status: CLOSED WONTFIX QA Contact: Yongcheng Yang <yoyang>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 7.8CC: dwysocha, fs-qe, steved, xzhou
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1856881 Environment:
Last Closed: 2020-09-10 21:36:04 UTC Type: ---
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: 1856881    
Bug Blocks:    

Description Parikshit Khedekar 2020-07-14 15:56:37 UTC
+++ This bug was initially created as a clone of Bug #1856881 +++

Description of problem:

Updating the nfs-utils modifies the /etc/group file. This is not expected if the package is already installed and the 'rpcuser' group is already there.

The if statement for the nfsnobody seems to be fine but the code for rpcuser needs enhancements as,


The problem is with the prescript of the rpm as,

Current spec file:
~~~~~~~~~

# Create rpcuser gid as long as it does not already exist
cat /etc/group | cut -d':' -f 1 | grep --quiet rpcuser 2>/dev/null
if [ "$?" -eq 1 ]; then
    /usr/sbin/groupadd -g 29 rpcuser >/dev/null 2>&1 || :
else
    /usr/sbin/groupmod -g 29 rpcuser >/dev/null 2>&1 || :
fi

~~~~~~~~~

Here even the conditions falses the same command is marked to get executed.

The changes to the spec file should be as for modifying/changing the pre-scripts as,

~~~~~~~~~

# Create rpcuser gid as long as it does not already exist
cat /etc/group | cut -d':' -f 1 | grep --quiet rpcuser 2>/dev/null
if [ "$?" -eq 1 ]; then
    /usr/sbin/groupadd -g 29 rpcuser >/dev/null 2>&1 || :

fi

~~~~~~~~~


Version-Release number of selected component (if applicable):
RHEL 8/RHEL7

Any release of nfs-utils


How reproducible:

#stat /etc/group -->> check file stamp before update of package.

#yum update nfs-utils

#stat /etc/group -->> check file stamp after update of package. 

Steps to Reproduce:
1. check time stamp of the /etc/group file
2. Update the nfs-utils package
3. Check time stamp of the /etc/group file which differs
 
Actual results:

It does modifies the file unnecessorily.


Expected results:

It should not run the command again if the 


Additional info:

Comment 5 Dave Wysochanski 2020-09-10 21:36:04 UTC
There's no further minor releases scheduled for RHEL7 and thus it's very unlikely nfs-utils will be updated, except for an exceptional situation, and this means one of the primary necessary conditions for this bug (an update of nfs-utils) is much less likely in RHEL7.

When Red Hat shipped 7.7 on Aug 6, 2019 Red Hat Enterprise Linux 7 entered Maintenance Support 1 Phase.

https://access.redhat.com/support/policy/updates/errata#Maintenance_Support_1_Phase

That means only "Critical and Important Security errata advisories (RHSAs) and Urgent Priority Bug Fix errata advisories (RHBAs) may be released". This BZ does not appear to meet Maintenance Support 1 Phase criteria so is being closed WONTFIX. If this is critical for your environment please open a case in the Red Hat Customer Portal, https://access.redhat.com, provide a thorough business justification and ask that the BZ be re-opened for consideration in the next minor release.