Bug 1158466 - /var/lib/nfs/statd/state should not be configuration file
Summary: /var/lib/nfs/statd/state should not be configuration file
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: nfs-utils
Version: rawhide
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
Assignee: Steve Dickson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-29 12:56 UTC by Miroslav Suchý
Modified: 2015-12-13 09:52 UTC (History)
4 users (show)

Fixed In Version: nfs-utils-1.3.3-4.rc1.fc23 nfs-utils-1.3.3-4.rc1.fc22
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-30 21:22:26 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miroslav Suchý 2014-10-29 12:56:08 UTC
Description of problem:
File:
  /var/lib/nfs/statd/state
is marked after configuration file. Thefore after update of nfs-utils I endup with:
  -rw-r--r--. 1 rpcuser rpcuser 4 Feb  8  2010 /var/lib/nfs/statd/state
  -rw-r--r--  1 rpcuser rpcuser 0 Aug 17 22:34 /var/lib/nfs/statd/state.rpmnew
And I should resolve those files and one of them delete. Because that is binary file, there is nothing I could about it and I will likely preserve original file and remove .rpmnew file. Always. I could not see different scenario.

IMO this file should not be marked as config at all, because it is not config but it seems to me that it just store runtime data. It should be marked as %ghost instead.


Version-Release number of selected component (if applicable):
nfs-utils-1.3.1-1.0.fc21.x86_64

How reproducible:
always

Steps to Reproduce:
1. install some older version of nfs-utils
2. do some nfs stuff
3. upgrade to latest version using yum-upgrade
4. rpmconf -onfs-utils

Actual results:
/var/lib/nfs/statd/state.rpmnew on disk

Expected results:
No /var/lib/nfs/statd/state.rpmnew file.

Comment 1 Edward Kuns 2015-01-02 21:11:13 UTC
I ran into this upgrading from Fedora 19 to Fedora 21.  Given that state is a binary file, I have no idea what I am supposed to do with state.rpmnew.  Just delete it?  This is what I have:

-rw-r--r--. 1 rpcuser rpcuser    4 Oct 15  2013 state
-rw-r--r--. 1 rpcuser rpcuser    0 Nov  4 15:13 state.rpmnew

The rpmnew file is 0 length, so I will resolve this by deleting the rpmnew file.  But it would be better to not create the file unless there is something meaningful that the user can do.

Comment 2 Steve Dickson 2015-06-10 14:22:33 UTC
(In reply to Edward Kuns from comment #1)
> I ran into this upgrading from Fedora 19 to Fedora 21.  Given that state is
> a binary file, I have no idea what I am supposed to do with state.rpmnew. 
> Just delete it?  This is what I have:
> 
> -rw-r--r--. 1 rpcuser rpcuser    4 Oct 15  2013 state
> -rw-r--r--. 1 rpcuser rpcuser    0 Nov  4 15:13 state.rpmnew
> 
> The rpmnew file is 0 length, so I will resolve this by deleting the rpmnew
> file.  But it would be better to not create the file unless there is
> something meaningful that the user can do.

Yes... just delete it. That file can not be overwritten because it
keeps state for NFS v3 locking.

Comment 3 Miroslav Suchý 2015-06-11 05:29:45 UTC
Deleting the file is just workaround.

Correct fix should be:
diff --git a/nfs-utils.spec b/nfs-utils.spec
index ecd4e2e..2dc63da 100644
--- a/nfs-utils.spec
+++ b/nfs-utils.spec
@@ -274,7 +274,7 @@ fi
 %dir %attr(700,rpcuser,rpcuser) %{_sharedstatedir}/nfs/statd
 %dir %attr(700,rpcuser,rpcuser) %{_sharedstatedir}/nfs/statd/sm
 %dir %attr(700,rpcuser,rpcuser) %{_sharedstatedir}/nfs/statd/sm.bak
-%config(noreplace) %attr(644,rpcuser,rpcuser) %{_statdpath}/state
+%ghost %attr(644,rpcuser,rpcuser) %{_statdpath}/state
 %config(noreplace) %{_sharedstatedir}/nfs/xtab
 %config(noreplace) %{_sharedstatedir}/nfs/etab
 %config(noreplace) %{_sharedstatedir}/nfs/rmtab

1) It is not config. As there is nothing to configurate. It is just data file with some runtime state information.
2) %ghost directive will tell RPM to not install that file, however if it exist, "rpm -qf" will admit ownership of nfs-utils. Additionally if nfs-utils are removed, this file will be removed as well.

Comment 4 Fedora End Of Life 2015-11-04 11:29:58 UTC
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 5 Miroslav Suchý 2015-11-04 12:01:34 UTC
Still valid.

Comment 6 Fedora Update System 2015-11-17 20:01:29 UTC
nfs-utils-1.3.3-4.rc1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-8d3d8ebc26

Comment 7 Fedora Update System 2015-11-17 20:01:31 UTC
nfs-utils-1.3.3-4.rc1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-66b96dbd3f

Comment 8 Fedora Update System 2015-11-19 14:52:35 UTC
nfs-utils-1.3.3-4.rc1.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update nfs-utils'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-8d3d8ebc26

Comment 9 Fedora Update System 2015-11-19 15:27:38 UTC
nfs-utils-1.3.3-4.rc1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update nfs-utils'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-66b96dbd3f

Comment 10 Fedora Update System 2015-11-19 16:56:10 UTC
nfs-utils-1.3.3-4.rc1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update nfs-utils'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-66b96dbd3f

Comment 11 Fedora Update System 2015-11-30 21:22:12 UTC
nfs-utils-1.3.3-4.rc1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2015-12-13 09:52:12 UTC
nfs-utils-1.3.3-4.rc1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.


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