Bug 1683101

Summary: Make nfs-convert enabled by adding it to systemd presets
Product: Red Hat Enterprise Linux 8 Reporter: Yongcheng Yang <yoyang>
Component: redhat-releaseAssignee: Djordje Todorovic <dtodorov>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 8.0CC: bsivasub, crungeho, dtodorov, lisas, pkotvan, pniahodk, rhandlin, sgallagh, steved, swhiteho, tmlcoch, xzhou, yieli, yoyang
Target Milestone: rcKeywords: TestCaseNeeded
Target Release: 8.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-04 01:46:28 UTC Type: Bug
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: 1682753    
Bug Blocks: 1683895    

Description Yongcheng Yang 2019-02-26 09:23:02 UTC
Description of problem:

Currently, we're using `systemctl enable` in %post i.e.
/bin/systemctl enable nfs-convert  >/dev/null 2>&1 || :

However,
(https://bugzilla.redhat.com/show_bug.cgi?id=1673685#c6)
"the correct way to have this enabled by default is to have it
added to the systemd presets in the `redhat-release` package."

(https://bugzilla.redhat.com/show_bug.cgi?id=1673685#c16)
"The most obvious one in this case is so that we as an organization
can figure out what will be running on your system. The second one is
that scriptlets do not play well with container base image creation,
OSTree image creation and Weldr/Composer. In some of these cases, RPMs
are installed with the --no-scripts flag, so they WILL NOT HAVE THIS
RUNNING. That is why I am telling you that it should either be in the
presets or change the dependency link."


Version-Release number of selected component (if applicable):
nfs-utils-2.3.3-14.el8

How reproducible:
always

Steps to Reproduce:
1. rpm -q nfs-utils --scripts | grep nfs-convert
2.
3.

Actual results:
[root]$ rpm -q nfs-utils --scripts | grep nfs-convert
# Enable nfs-convert so if an old configuration 
/bin/systemctl enable nfs-convert  >/dev/null 2>&1 || :
[root]$ systemctl is-enabled nfs-convert
enabled
[root]$ 


Expected results:
No `systemctl enable` in %post while nfs-conver still be enabled


Additional info:
N/A

Comment 1 Steve Dickson 2019-02-26 16:04:02 UTC
Should this be open against the `redhat-release` package
since I can not added nfsconvert.service to the presets?

Also, shouldn't the enabling of rpcbind.socket be added
the presets as well?

Comment 2 Stephen Gallagher 2019-02-26 16:05:43 UTC
Yes, I'm reassigning it.

Comment 3 Yongcheng Yang 2019-02-27 03:42:56 UTC
(In reply to Steve Dickson from comment #1)
> Should this be open against the `redhat-release` package
> since I can not added nfsconvert.service to the presets?
> 

Stephen help did that, thanks!

However, after this gets fixed we may need to remove
the redundant %post of nfs-utils.spec accordingly.

> Also, shouldn't the enabling of rpcbind.socket be added
> the presets as well?

Looks like we process rpcbind differently of rhel 8 & 7, i.e.

# RHEL-8.0
$ rpm -q rpcbind && rpm -q rpcbind --scripts | grep -E "enable|preset"
rpcbind-1.2.5-3.el8.x86_64
        systemctl --no-reload preset rpcbind.service rpcbind.socket &>/dev/null || : 

# RHEL-7.6
$ rpm -q rpcbind && rpm -q rpcbind --scripts | grep -E "enable|preset"
rpcbind-0.2.0-47.el7.x86_64
    /bin/systemctl enable rpcbind.service >/dev/null 2>&1 || :

Please help decide what we need to change.

Comment 4 Steve Dickson 2019-02-27 19:34:02 UTC
(In reply to Yongcheng Yang from comment #3)
> (In reply to Steve Dickson from comment #1)
> > Should this be open against the `redhat-release` package
> > since I can not added nfsconvert.service to the presets?
> > 
> 
> Stephen help did that, thanks!
> 
> However, after this gets fixed we may need to remove
> the redundant %post of nfs-utils.spec accordingly.
Good point... Maybe we should move this bz back to nfs-utils
and open up another redhat-release to add the preset?

> 
> > Also, shouldn't the enabling of rpcbind.socket be added
> > the presets as well?
> 
> Looks like we process rpcbind differently of rhel 8 & 7, i.e.
> 
> # RHEL-8.0
> $ rpm -q rpcbind && rpm -q rpcbind --scripts | grep -E "enable|preset"
> rpcbind-1.2.5-3.el8.x86_64
>         systemctl --no-reload preset rpcbind.service rpcbind.socket
> &>/dev/null || : 
> 
> # RHEL-7.6
> $ rpm -q rpcbind && rpm -q rpcbind --scripts | grep -E "enable|preset"
> rpcbind-0.2.0-47.el7.x86_64
>     /bin/systemctl enable rpcbind.service >/dev/null 2>&1 || :
> 
> Please help decide what we need to change.
Lets open up another bz against redhat-release to see what
they say... 

Boy.. I like opening up bz against other packages!!! ;-)

Comment 5 Yongcheng Yang 2019-02-28 04:28:57 UTC
(In reply to Steve Dickson from comment #4)
> (In reply to Yongcheng Yang from comment #3)
> > However, after this gets fixed we may need to remove
> > the redundant %post of nfs-utils.spec accordingly.
> Good point... Maybe we should move this bz back to nfs-utils
> and open up another redhat-release to add the preset?
> 

Just filed another nfs-utils bug 1683895 which depends on this one.
(Not changing this bug's title looks more straightforward IMO)

> > 
> > > Also, shouldn't the enabling of rpcbind.socket be added
> > > the presets as well?
> > 
> > Looks like we process rpcbind differently of rhel 8 & 7
> > Please help decide what we need to change.
> Lets open up another bz against redhat-release to see what
> they say... 
> 
Okay, also file bug 1683901 of rhel7

Comment 9 Steve Whitehouse 2020-02-12 08:29:06 UTC
What is the current status of this bug? Did it get fixed in the end?

Comment 15 Peter Kotvan 2020-08-31 12:59:27 UTC
Verified on RHEL-8.3.0-Snapshot-2.0 -> RHEL-8.3.0-20200825.0.

Comment 18 errata-xmlrpc 2020-11-04 01:46:28 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 (redhat-release bug fix and enhancement update), 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-2020:4495