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 1683895 - Remove "systemctl enable nfs-convert" from %post of spec file
Summary: Remove "systemctl enable nfs-convert" from %post of spec file
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: nfs-utils
Version: 8.2
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: 8.3
Assignee: Alice Mitchell
QA Contact: Yongcheng Yang
URL:
Whiteboard:
Depends On: 1653927 1681972 1683101
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-02-28 03:58 UTC by Yongcheng Yang
Modified: 2021-05-18 15:05 UTC (History)
3 users (show)

Fixed In Version: nfs-utils-2.3.3-37.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-18 15:04:48 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Yongcheng Yang 2019-02-28 03:58:38 UTC
Description of problem:

We may need to remove the redundant %post from nfs-utils.spec accordingly:
"""
# Enable nfs-convert so if an old configuration 
# exists a conversion will occur
/bin/systemctl enable nfs-convert  >/dev/null 2>&1 || :
"""

As soon as the Bug 1683101 got fixed, i.e., the `redhat-release`
package had already added nfsconvert.service to the presets.


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:
$ 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 || :


Expected results:
Don't use "enable/disable" explicitely

Additional info:
N/A

Comment 4 Steve Whitehouse 2020-03-12 20:12:05 UTC
Alice, can you take a look... doesn't look like it should be too tricky to resolve.

Comment 5 Yongcheng Yang 2020-03-13 06:36:35 UTC
(In reply to Yongcheng Yang from comment #0)
> ...
> As soon as the Bug 1683101 got fixed, i.e., the `redhat-release`
> package had already added nfsconvert.service to the presets.

This bug depends on this redhat-release bug (with NO progress for now):

https://bugzilla.redhat.com/show_bug.cgi?id=1683895

Comment 6 Alice Mitchell 2020-03-16 11:38:35 UTC
Having read through the associated tickets this looks like it is pending a decision on the correct way to implement it rather than needing a fix, a decision that still seems unresolved from  https://bugzilla.redhat.com/show_bug.cgi?id=1673685 despite that ticket being closed.

As far as I can see nfs-utils is not part of the minimal install, it certainly has no other mentions in the systemd presets, which would make it wrong to add nfsconvert to the presets as I presume it would create a dependancy thus growing the minimal install.

Is there some reason that the rules in nfs-convert.service do not already handle things, so we can just drop this from the spec file entirely?

And given that, why are there other manual calls to systemctl in the %post rules of the spec file? shouldn't they also already be handled by the dependancies?

Unless there is some known reason why the spec file calls to systemctl are still needed I will remove them and test that the services files adequately do the job instead.

Comment 7 Steve Dickson 2020-03-16 17:26:03 UTC
My apologies.... I just don't see what the problem is here...

Comment 8 Yongcheng Yang 2020-06-20 03:42:09 UTC
(In reply to Yongcheng Yang from comment #0)
> ...
> As soon as the Bug 1683101 got fixed, i.e., the `redhat-release`
> package had already added nfsconvert.service to the presets.
> 

The redhat-release-8.3-0.2.el8 has enabled nfs-convert now:
~~~~~~~~~~~~~~~~~~~~~~~~
etoot@rhel-8-3-latest ~]# tail -2 /usr/lib/systemd/system-preset/90-default.preset
# https://bugzilla.redhat.com/show_bug.cgi?id=1683101
enable nfs-convert.service
etoot@rhel-8-3-latest ~]# rpm -qf /usr/lib/systemd/system-preset/90-default.preset
redhat-release-8.3-0.2.el8.x86_64

This is no necessary in nfs-utils.spec %post code to enable it once again:

> # Enable nfs-convert so if an old configuration 
> # exists a conversion will occur
> /bin/systemctl enable nfs-convert  >/dev/null 2>&1 || :

Comment 11 Yongcheng Yang 2020-08-25 13:30:32 UTC
(In reply to Yongcheng Yang from comment #8)
> 
> The redhat-release-8.3-0.2.el8 has enabled nfs-convert now:
> ~~~~~~~~~~~~~~~~~~~~~~~~
> etoot@rhel-8-3-latest ~]# tail -2
> /usr/lib/systemd/system-preset/90-default.preset
> # https://bugzilla.redhat.com/show_bug.cgi?id=1683101
> enable nfs-convert.service
> etoot@rhel-8-3-latest ~]# rpm -qf
> /usr/lib/systemd/system-preset/90-default.preset
> redhat-release-8.3-0.2.el8.x86_64
> 
> This is no necessary in nfs-utils.spec %post code to enable it once again:
> 
> > # Enable nfs-convert so if an old configuration 
> > # exists a conversion will occur
> > /bin/systemctl enable nfs-convert  >/dev/null 2>&1 || :

No need to enable nfs-convert in spec file as it's enabled by `redhat-release` presets.

Comment 15 Alice Mitchell 2020-12-10 12:15:55 UTC
Confirmed that nfs-convert is enabled by default now, no need to keep this in the spec file

Comment 22 Yongcheng Yang 2020-12-17 04:04:42 UTC
Verified on the latst nfs-utils:

[root@ ~]# rpm -q nfs-utils
nfs-utils-2.3.3-40.el8.x86_64
[root@ ~]# rpm -q nfs-utils --scripts | grep nfs-convert
[root@ ~]# systemctl is-enabled nfs-convert
enabled
[root@ ~]#

Comment 24 errata-xmlrpc 2021-05-18 15:04:48 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 (nfs-utils 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-2021:1669


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