Comment 17 for bug 1928259

Revision history for this message
In , andreas (andreas-redhat-bugs-1) wrote :

Description of problem:
On an NFSv4 client, using sec=krb5 for the NFSv4 mount, the rpc.gssd daemon is needed. As far as I can tell, it's started as part of the nfs-client.target target, but it's a bit fuzzy (nfs-utils.service also deals with it). In any case, it's not meant to be enabled on its own, as it has no [Install] section.

If you then upgrade the nfs-utils rpm, it's expected that it should restart the services that are already running, but that doesn't seem to happen. I tested with fedora 33, 34, and now rawhide. They all have a postinst that tries to restart nfs-client.target. In rawhide it's a bit different in that it sets a marker, but other than that, f33 and f34 just used try-restart. Here is rawhide's nfs-utils postuninstall for the upgrade case:
postuninstall scriptlet (using /bin/sh):

if [ $1 -ge 1 ] && [ -x /usr/bin/systemctl ]; then
        # Package upgrade, not uninstall
        for unit in nfs-client.target; do
                /usr/bin/systemctl set-property $unit Markers=+needs-restart || :
        done
fi

That currently fails with (below is debug output from dnf reinstall nfs-utils):
D: %postun(nfs-utils-1:2.5.3-3.rc2.fc35.x86_64): execv(/bin/sh) pid 808
+ '[' 1 -ge 1 ']'
+ '[' -x /usr/bin/systemctl ']'
+ for unit in nfs-client.target
+ /usr/bin/systemctl set-property nfs-client.target Markers=+needs-restart
Not supported unit type
+ :
+ '[' 1 -ge 1 ']'
+ '[' -x /usr/bin/systemctl ']'
+ for unit in nfs-server
+ /usr/bin/systemctl set-property nfs-server Markers=+needs-restart

But even if I try a restart (instead of that property setting, new to rawhide), it won't touch rpc.gssd (bash prompt says f33 because that's the fedora version I started with testing, and then upgraded to 34 and now it's running rawhide):
[root@f33-client ~]# pidof rpc.gssd
447
[root@f33-client ~]# systemctl restart nfs-client.target
[root@f33-client ~]# pidof rpc.gssd
447
[root@f33-client ~]#

What does restart it is, obviously, systemctl restart rpc-gssd.service, and restart nfs-utils.service:
[root@f33-client ~]# systemctl restart rpc-gssd.service
[root@f33-client ~]# pidof rpc.gssd
937
[root@f33-client ~]# systemctl restart nfs-utils.service
[root@f33-client ~]# pidof rpc.gssd
945
[root@f33-client ~]#

nfs-utils.service is another service without an [Install] section, so it can't be enabled. But maybe that's what should be restarted instead of the target? Or did I miss enabling some service that I should have?

Version-Release number of selected component (if applicable):
nfs-utils-2.5.3-3.rc2.fc35.x86_64

How reproducible:
Always on upgrade.

Steps to Reproduce:
1. Configure NFSv4 kerberized mountpoint. Check that rpc.gssd is running, and that it also starts on its own on reboot
2. Take note of the rpc.gssd pid
3. Upgrade the nfs-utils package. Note that rpc.gssd was not restarted

Actual results:
rpc.gssd is not restarted after the nfs-utils package is upgraded.

Expected results:
rpc.gssd, if running, should be restarted after the package that ships it (nfs-utils) is upgraded.

Additional info: