Package upgrade won't restart services

Bug #1928259 reported by Andreas Hasenack
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nfs-utils (Debian)
Fix Released
Unknown
nfs-utils (Fedora)
Confirmed
Undecided
nfs-utils (Ubuntu)
Fix Released
High
Andreas Hasenack
Bionic
Fix Released
High
Andreas Hasenack
Focal
Fix Released
High
Andreas Hasenack
Groovy
Fix Released
High
Andreas Hasenack
Hirsute
Fix Released
High
Andreas Hasenack

Bug Description

[Impact]
In order to get the fixes provided by a package update, the affected services shipped in it need to be restarted. When that restart does not happen, the system remains running the old binaries with the bug(s).

This bug was found while testing the fix for #1927745, which affected rpc.gssd, one of the services shipped in nfs-common. Without the restart, systems that installed the update are still affected by the bug.

[Test Plan]
To make the test simple, we are not going to mount an NFSv4 share using kerberos. We are just going to have a minimal configuration that gets rpc.gssd running to demonstrate the before and after of this bug.

For a more thorough testing, which includes actually mounting an NFSv4 export with kerberos, follow the test instructions of bug #1927745, and you will see that the manual restart included because of this bug here, after the package is updated, is no longer needed.

TEST (A)
# create a VM for the affected ubuntu release under test, login and run:
sudo touch /etc/krb5.keytab
sudo chmod 0600 /etc/krb5.keytab

# install nfs-common
sudo apt install nfs-common -y

# note message about nfs-utils.service being disabled/static:
nfs-utils.service is a disabled or a static unit, not starting it.

# Manually start rpc-gssd. It will start, but since we have an empty
# krb5.keytab file, it won't work. That's ok, we are not actually going to
# mount nfsv4
sudo systemctl start rpc-gssd.service

# Check it's running, and make note of its pid:
pidof rpc.gssd
2994

# reinstall nfs-common
sudo apt install --reinstall nfs-common

# note rpc-gssd wasn't restarted
pidof rpc.gssd
2994

# install the fixed nfs-common package. Notice the message about starting a disabled or static unit no longer appears:
sudo apt install nfs-common

# this time, rpc.gssd is restarted
pidof rpc.gssd
5000

TEST (B)
This test is to confirm no new services are started after the fixed package is installed for the first time.

# create a VM for the affected ubuntu release under test, login and run:
sudo touch /etc/krb5.keytab
sudo chmod 0600 /etc/krb5.keytab

# install nfs-common that has the bug
sudo apt install nfs-common -y

# take a snapshot of running processes
pstree > pstree.old

# purge the nfs-common package
sudo apt purge nfs-common -y

# install the new nfs-common package
sudo apt install nfs-common -y

# take a new pstree snapshot and compare with the old one
pstree > pstree.new
diff -u pstree.old pstree.new

Should be no difference.

[Where problems could occur]
Also known as "I'm doing an unconditional start in postinst, what could go wrong":
- start services that were not started with the previous package on first install
- systemd behavior change or bug and suddenly PartOf units also react to "start", instead of just "restart" and "stop" as documented
- starting services that are not configured, and start fails, breaking postinst (but we have the proverbial || true to avoid that)

[Other Info]
This fix is a bit awkward, but I think it's in line with the SRU spirit of doing the least unpredictable change, and one that is simple and can be better understood.

See the linked MP for an explanation of this fix, why it works, and other tests I did:
https://code.launchpad.net/~ahasenack/ubuntu/+source/nfs-utils/+git/nfs-utils/+merge/403288

[Original Description]

Upgrading the nfs-common debian package will not restart its services.

Specifically, the package tries to restart "nfs-utils.service", which is a "fake" service meant to coordinate all the other daemons that make up a modern NFS server. This service, however, as it is, cannot be enabled:
$ sudo systemctl enable nfs-utils.service
The unit files have no installation config (WantedBy, RequiredBy, Also, Alias
settings in the [Install] section, and DefaultInstance for template units).
This means they are not meant to be enabled using systemctl.
Possible reasons for having this kind of units are:
1) A unit may be statically enabled by being symlinked from another unit's
   .wants/ or .requires/ directory.
2) A unit's purpose may be to act as a helper for some other unit which has
   a requirement dependency on it.
3) A unit may be started when needed via activation (socket, path, timer,
   D-Bus, udev, scripted systemctl call, ...).
4) In case of template units, the unit is meant to be enabled with some
   instance name specified

Granted, d/rules of the nfs-utils package doesn't even try:
    dh_systemd_enable -p nfs-common nfs-client.target
    dh_systemd_enable -p nfs-kernel-server nfs-server.service
    dh_installinit -pnfs-common -R
    dh_systemd_start -p nfs-common --restart-after-upgrade nfs-utils.service
    dh_systemd_start -p nfs-kernel-server --restart-after-upgrade nfs-server.service

We can see it tries to start and restart it, but that won't work on disabled or non-started services: deb-systemd-invoke won't do it:
# If the job is disabled and is not currently running, the job is not started or restarted.
# However, if the job is disabled but has been forced into the running state, we *do* stop
# and restart it since this is expected behaviour for the admin who forced the start.
# We don't autostart static units either.

The above can be seen while attempting a fresh install (or even upgrade) of nfs-common:
(...)
Setting up nfs-common (1:1.3.4-2.5ubuntu6) ...

Creating config file /etc/idmapd.conf with new version
Adding system user `statd' (UID 113) ...
Adding new user `statd' (UID 113) with group `nogroup' ...
Not creating home directory `/var/lib/nfs'.
Created symlink /etc/systemd/system/multi-user.target.wants/nfs-client.target → /lib/systemd/system/nfs-client.target.
Created symlink /etc/systemd/system/remote-fs.target.wants/nfs-client.target → /lib/systemd/system/nfs-client.target.
nfs-utils.service is a disabled or a static unit, not starting it.
^^^^^^^^^^^^^^^^^

$ systemctl status nfs-utils.service
● nfs-utils.service - NFS server and client services
     Loaded: loaded (/lib/systemd/system/nfs-utils.service; static)
     Active: inactive (dead)

This was found while testing the fix for bug #1927745. In that bug, the affected service is rpc.gssd and it's critical that it be restarted, but it's not happening. It will only be restarted if nfs-utils.service is already "started".

I'm marking this bug as "high" because it prevents valid fixes from being deployed after just upgrading a package.

Related branches

Changed in nfs-utils (Debian):
status: Unknown → New
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:

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

I have this PPA: https://launchpad.net/~ahasenack/+archive/ubuntu/nfs-utils-restart-1928259

With the following patch applied to all ubuntu releases:
--- a/debian/nfs-common.postinst
+++ b/debian/nfs-common.postinst
@@ -43,6 +43,10 @@ case "$1" in
        if [ -f /lib/init/rw/sendsigs.omit.d/statd ]; then
            mv /lib/init/rw/sendsigs.omit.d/statd /run/sendsigs.omit.d/statd
        fi
+
+ # always "start" nfs-utils.service, so package upgrades will restart it,
+ # see LP: #1928259
+ systemctl start nfs-utils.service > /dev/null || true
     ;;
 esac

It works for the use case we are trying to fix, and also for simpler nfs-v{2,3} cases. But it's not very clean I think...

I'm testing, and checking what happens (or should happen) if one has nfs-utils.service masked, for example.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

When it's masked, we get the error messages during package install, but it's not a fatal error, and services are not restarted. Looks like the correct outcome, given masking the service was a user's choice:
buntu@rpc-gssd-restart-1928259:~$ ps fxaw|grep rpc
  407 ? I< 0:00 \_ [rpciod]
  524 ? Ss 0:00 /usr/sbin/rpc.idmapd
  532 ? Ss 0:00 /sbin/rpcbind -f -w
  643 ? Ss 0:00 /usr/sbin/rpc.mountd --manage-gids
 2747 pts/0 S+ 0:00 \_ grep --color=auto rpc
 1489 ? Ss 0:00 /usr/sbin/rpc.svcgssd
 1490 ? Ss 0:00 /usr/sbin/rpc.gssd
ubuntu@rpc-gssd-restart-1928259:~$ sudo apt install --reinstall nfs-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 5 not upgraded.
Need to get 243 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://ppa.launchpad.net/ahasenack/nfs-utils-restart-1928259/ubuntu bionic/main amd64 nfs-common amd64 1:1.3.4-2.1ubuntu5.5~ppa1 [243 kB]
Fetched 243 kB in 0s (4987 kB/s)
(Reading database ... 60533 files and directories currently installed.)
Preparing to unpack .../nfs-common_1%3a1.3.4-2.1ubuntu5.5~ppa1_amd64.deb ...
Unpacking nfs-common (1:1.3.4-2.1ubuntu5.5~ppa1) over (1:1.3.4-2.1ubuntu5.5~ppa1) ...
Setting up nfs-common (1:1.3.4-2.1ubuntu5.5~ppa1) ...
Failed to start nfs-utils.service: Unit nfs-utils.service is masked.
Failed to restart nfs-utils.service: Unit nfs-utils.service is masked.
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for ureadahead (0.100.0-21) ...
Processing triggers for systemd (237-3ubuntu10.47) ...
ubuntu@rpc-gssd-restart-1928259:~$ ps fxaw|grep rpc
  407 ? I< 0:00 \_ [rpciod]
  524 ? Ss 0:00 /usr/sbin/rpc.idmapd
  532 ? Ss 0:00 /sbin/rpcbind -f -w
  643 ? Ss 0:00 /usr/sbin/rpc.mountd --manage-gids
 3283 pts/0 S+ 0:00 \_ grep --color=auto rpc
 1489 ? Ss 0:00 /usr/sbin/rpc.svcgssd
 1490 ? Ss 0:00 /usr/sbin/rpc.gssd

Changed in nfs-utils (Fedora):
importance: Unknown → Undecided
status: Unknown → Confirmed
Changed in nfs-utils (Ubuntu):
status: New → In Progress
assignee: nobody → Andreas Hasenack (ahasenack)
Changed in nfs-utils (Ubuntu Bionic):
importance: Undecided → High
Changed in nfs-utils (Ubuntu Focal):
importance: Undecided → High
Changed in nfs-utils (Ubuntu Hirsute):
importance: Undecided → High
Changed in nfs-utils (Ubuntu Groovy):
importance: Undecided → High
Changed in nfs-utils (Ubuntu Hirsute):
assignee: nobody → Andreas Hasenack (ahasenack)
Changed in nfs-utils (Ubuntu Groovy):
assignee: nobody → Andreas Hasenack (ahasenack)
Changed in nfs-utils (Ubuntu Focal):
assignee: nobody → Andreas Hasenack (ahasenack)
Changed in nfs-utils (Ubuntu Bionic):
assignee: nobody → Andreas Hasenack (ahasenack)
status: New → In Progress
Changed in nfs-utils (Ubuntu Focal):
status: New → In Progress
Changed in nfs-utils (Ubuntu Groovy):
status: New → In Progress
Changed in nfs-utils (Ubuntu Hirsute):
status: New → In Progress
description: updated
description: updated
description: updated
description: updated
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nfs-utils - 1:1.3.4-4ubuntu3

---------------
nfs-utils (1:1.3.4-4ubuntu3) impish; urgency=medium

  * d/nfs-common.postinst: always start nfs-utils.service, so the restart in
    the #DEBHELPER# section can do its job if needed (LP: #1928259)

 -- Andreas Hasenack <email address hidden> Mon, 24 May 2021 17:59:39 -0300

Changed in nfs-utils (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Andreas, or anyone else affected,

Accepted nfs-utils into hirsute-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/nfs-utils/1:1.3.4-4ubuntu2.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-hirsute to verification-done-hirsute. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-hirsute. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in nfs-utils (Ubuntu Hirsute):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-hirsute
Changed in nfs-utils (Ubuntu Groovy):
status: In Progress → Fix Committed
tags: added: verification-needed-groovy
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Hello Andreas, or anyone else affected,

Accepted nfs-utils into groovy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/nfs-utils/1:1.3.4-2.5ubuntu6.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-groovy to verification-done-groovy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-groovy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in nfs-utils (Ubuntu Focal):
status: In Progress → Fix Committed
tags: added: verification-needed-focal
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Hello Andreas, or anyone else affected,

Accepted nfs-utils into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/nfs-utils/1:1.3.4-2.5ubuntu3.4 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in nfs-utils (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed-bionic
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Hello Andreas, or anyone else affected,

Accepted nfs-utils into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/nfs-utils/1:1.3.4-2.1ubuntu5.5 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

# Hirsute verification

## TEST A

I did the test from bug #1927745, which actually sets up a kerberized NFSv4 server/client on localhost.
With the original hirsute packages, after all that configuration, rpc.gssd was running and I had the nfv4 mount point done:
ubuntu@h-gssd-restart-1928259-1927745:~$ ps fxaw|grep rpc\\.gssd
   7882 ? Ss 0:00 /usr/sbin/rpc.gssd

ubuntu@h-gssd-restart-1928259-1927745:~$ mount -t nfs4
h-gssd-restart-1928259-1927745.example.com:/export on /mnt/test_krb5 type nfs4 (rw,relatime,vers=4.2,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=krb5,clientaddr=192.168.122.123,local_lock=none,addr=192.168.122.123)

I then updated to the nfs-{common,server} packages from hirsute-proposed:
ubuntu@h-gssd-restart-1928259-1927745:~$ apt-cache policy nfs-common
nfs-common:
  Installed: 1:1.3.4-4ubuntu2.1
  Candidate: 1:1.3.4-4ubuntu2.1
  Version table:
 *** 1:1.3.4-4ubuntu2.1 500
        500 http://br.archive.ubuntu.com/ubuntu hirsute-proposed/main amd64 Packages
        100 /var/lib/dpkg/status

And immediately after apt finished, I listed the processes again, and rpc.gssd had a different pid:

ubuntu@h-gssd-restart-1928259-1927745:~$ ps fxaw|grep rpc\\.gssd
   8780 ? Ss 0:00 /usr/sbin/rpc.gssd

## TEST B
Installed nfs-common from hirsute:
nfs-common:
  Installed: 1:1.3.4-4ubuntu2
  Candidate: 1:1.3.4-4ubuntu2
  Version table:
 *** 1:1.3.4-4ubuntu2 500
        500 http://br.archive.ubuntu.com/ubuntu hirsute/main amd64 Packages
        100 /var/lib/dpkg/status

ubuntu@h-gssd-restart-1928259-1927745-B:~$ pstree > pstree.old
ubuntu@h-gssd-restart-1928259-1927745-B:~$ l pstree.old
-rw-rw-r-- 1 ubuntu ubuntu 707 Jun 11 18:30 pstree.old

Installed new nfs-common:
ubuntu@h-gssd-restart-1928259-1927745-B:~$ apt-cache policy nfs-common
nfs-common:
  Installed: 1:1.3.4-4ubuntu2.1
  Candidate: 1:1.3.4-4ubuntu2.1
  Version table:
 *** 1:1.3.4-4ubuntu2.1 500
        500 http://br.archive.ubuntu.com/ubuntu hirsute-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     1:1.3.4-4ubuntu2 500
        500 http://br.archive.ubuntu.com/ubuntu hirsute/main amd64 Packages

New pstree dump, and it's identical to the previous one:
ubuntu@h-gssd-restart-1928259-1927745-B:~$ pstree > pstree.new
ubuntu@h-gssd-restart-1928259-1927745-B:~$ l pstree.*
-rw-rw-r-- 1 ubuntu ubuntu 707 Jun 11 18:32 pstree.new
-rw-rw-r-- 1 ubuntu ubuntu 707 Jun 11 18:30 pstree.old
ubuntu@h-gssd-restart-1928259-1927745-B:~$ diff -u pstree.old pstree.new
ubuntu@h-gssd-restart-1928259-1927745-B:~$

Hirsute verification succeeded.

tags: added: verification-done-hirsute
removed: verification-needed-hirsute
description: updated
Revision history for this message
Andreas Hasenack (ahasenack) wrote :
Download full text (5.3 KiB)

Groovy verification

TEST A

This time I followed the test from this bug exactly, without mounting an actual NFSv4 share. I'll leave that test for the bionic case.

Reproducing the bug with the groovy package:
ubuntu@g-gssd-restart-1928259-1927745-A:~$ apt-cache policy nfs-common
nfs-common:
  Installed: 1:1.3.4-2.5ubuntu6
  Candidate: 1:1.3.4-2.5ubuntu6
  Version table:
 *** 1:1.3.4-2.5ubuntu6 500
        500 http://br.archive.ubuntu.com/ubuntu groovy/main amd64 Packages
        100 /var/lib/dpkg/status

ubuntu@g-gssd-restart-1928259-1927745-A:~$ pidof rpc.gssd
2600

Reinstall and we get the same pid:
ubuntu@g-gssd-restart-1928259-1927745-A:~$ sudo apt install --reinstall nfs-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 204 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://br.archive.ubuntu.com/ubuntu groovy/main amd64 nfs-common amd64 1:1.3.4-2.5ubuntu6 [204 kB]
Fetched 204 kB in 0s (10.7 MB/s)
(Reading database ... 64886 files and directories currently installed.)
Preparing to unpack .../nfs-common_1%3a1.3.4-2.5ubuntu6_amd64.deb ...
Unpacking nfs-common (1:1.3.4-2.5ubuntu6) over (1:1.3.4-2.5ubuntu6) ...
Setting up nfs-common (1:1.3.4-2.5ubuntu6) ...
nfs-utils.service is a disabled or a static unit not running, not starting it.
Processing triggers for man-db (2.9.3-2) ...
Processing triggers for systemd (246.6-1ubuntu1.3) ...

ubuntu@g-gssd-restart-1928259-1927745-A:~$ pidof rpc.gssd
2600

Now install the version from proposed:
ubuntu@g-gssd-restart-1928259-1927745-A:~$ apt-cache policy nfs-common
nfs-common:
  Installed: 1:1.3.4-2.5ubuntu6.1
  Candidate: 1:1.3.4-2.5ubuntu6.1
  Version table:
 *** 1:1.3.4-2.5ubuntu6.1 500
        500 http://br.archive.ubuntu.com/ubuntu groovy-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     1:1.3.4-2.5ubuntu6 500
        500 http://br.archive.ubuntu.com/ubuntu groovy/main amd64 Package...

Read more...

tags: added: verification-done-groovy
removed: verification-needed-groovy
Revision history for this message
Andreas Hasenack (ahasenack) wrote :
Download full text (6.1 KiB)

Focal verification

TEST A

Reproducing the bug with the focal package:
ubuntu@f-gssd-restart-1928259-1927745-A:~$ apt-cache policy nfs-common
nfs-common:
  Installed: 1:1.3.4-2.5ubuntu3.3
  Candidate: 1:1.3.4-2.5ubuntu3.3
  Version table:
 *** 1:1.3.4-2.5ubuntu3.3 500
        500 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
        500 http://br.archive.ubuntu.com/ubuntu focal-security/main amd64 Packages
        100 /var/lib/dpkg/status
     1:1.3.4-2.5ubuntu3 500
        500 http://br.archive.ubuntu.com/ubuntu focal/main amd64 Packages

rpc.gssd running:
ubuntu@f-gssd-restart-1928259-1927745-A:~$ pidof rpc.gssd
2968

Reinstall:
ubuntu@f-gssd-restart-1928259-1927745-A:~$ sudo apt install --reinstall nfs-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 48 not upgraded.
Need to get 204 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 nfs-common amd64 1:1.3.4-2.5ubuntu3.3 [204 kB]
Fetched 204 kB in 0s (10.1 MB/s)
(Reading database ... 63643 files and directories currently installed.)
Preparing to unpack .../nfs-common_1%3a1.3.4-2.5ubuntu3.3_amd64.deb ...
Unpacking nfs-common (1:1.3.4-2.5ubuntu3.3) over (1:1.3.4-2.5ubuntu3.3) ...
Setting up nfs-common (1:1.3.4-2.5ubuntu3.3) ...
nfs-utils.service is a disabled or a static unit not running, not starting it.
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for systemd (245.4-4ubuntu3.6) ...

Same PID as before, so it wasn't restarted:
ubuntu@f-gssd-restart-1928259-1927745-A:~$ pidof rpc.gssd
2968

Installing the package from proposed restarted rpc.gssd:
ubuntu@f-gssd-restart-1928259-1927745-A:~$ sudo apt install nfs-common
Reading pack...

Read more...

description: updated
tags: added: verification-done-focal
removed: verification-needed-focal
Revision history for this message
Andreas Hasenack (ahasenack) wrote (last edit ):
Download full text (6.2 KiB)

Bionic verification

"TEST A" verification was done following steps from bug #1927745, where the lack of the restart was first found, and that fix is included in this upload as well.

ubuntu@b-gssd-restart-1928259-1927745-A:~$ apt-cache policy nfs-common
nfs-common:
  Installed: 1:1.3.4-2.1ubuntu5.3
  Candidate: 1:1.3.4-2.1ubuntu5.3
  Version table:
 *** 1:1.3.4-2.1ubuntu5.3 500
        500 http://br.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        500 http://br.archive.ubuntu.com/ubuntu bionic-security/main amd64 Packages
        100 /var/lib/dpkg/status
     1:1.3.4-2.1ubuntu5 500
        500 http://br.archive.ubuntu.com/ubuntu bionic/main amd64 Packages

Problem quickly reproduced:
ubuntu@b-gssd-restart-1928259-1927745-a:~$ sudo ./bz1419280_test_threads
Iter 1
calling stat on '/mnt/test_krb5/foo' with uids 9995 through 10035
reproduced the bug after 1 iterations
ubuntu@b-gssd-restart-1928259-1927745-a:~$ ps axw|grep stat_as
 8012 pts/0 D 0:00 ./stat_as /mnt/test_krb5/foo 9995 10035
 8036 pts/0 D 0:00 ./stat_as /mnt/test_krb5/foo 9995 10035
 8091 pts/0 S+ 0:00 grep --color=auto stat_as

In this state, I installed the fixed packages from proposed. But first, let's
get the rpc.gssd pid:
ubuntu@b-gssd-restart-1928259-1927745-a:~$ ps axw | grep rpc\\.gssd
 7854 ? Ss 0:00 /usr/sbin/rpc.gssd

Now upgrade:
ubuntu@b-gssd-restart-1928259-1927745-a:~$ sudo apt install nfs-common
Reading package lists... Done
(...)
Do you want to continue? [Y/n]
Get:1 http://br.archive.ubuntu.com/ubuntu bionic-proposed/main amd64 nfs-common amd64 1:1.3.4-2.1ubuntu5.5 [206 kB]
Get:2 http://br.archive.ubuntu.com/ubuntu bionic-proposed/main amd64 nfs-kernel-server amd64 1:1.3.4-2.1ubuntu5.5 [93.8 kB]
Fetched 299 kB in 0s (1479 kB/s)
(Reading database ... 64831 files and directories currently installed.)
Preparing to unpack .../nfs-common_1%3a1.3.4-2.1ub...

Read more...

tags: added: verification-done-bionic
removed: verification-needed-bionic
Mathew Hodson (mhodson)
tags: removed: verification-needed
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for nfs-utils has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nfs-utils - 1:1.3.4-4ubuntu2.1

---------------
nfs-utils (1:1.3.4-4ubuntu2.1) hirsute; urgency=medium

  * d/nfs-common.postinst: always start nfs-utils.service, so the restart in
    the #DEBHELPER# section can do its job if needed (LP: #1928259)

 -- Andreas Hasenack <email address hidden> Mon, 24 May 2021 17:57:04 -0300

Changed in nfs-utils (Ubuntu Hirsute):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nfs-utils - 1:1.3.4-2.5ubuntu6.1

---------------
nfs-utils (1:1.3.4-2.5ubuntu6.1) groovy; urgency=medium

  * d/nfs-common.postinst: always start nfs-utils.service, so the restart in
    the #DEBHELPER# section can do its job if needed (LP: #1928259)

 -- Andreas Hasenack <email address hidden> Mon, 24 May 2021 17:55:01 -0300

Changed in nfs-utils (Ubuntu Groovy):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nfs-utils - 1:1.3.4-2.5ubuntu3.4

---------------
nfs-utils (1:1.3.4-2.5ubuntu3.4) focal; urgency=medium

  * d/nfs-common.postinst: always start nfs-utils.service, so the
    restart in the #DEBHELPER# section can do its job if needed
    (LP: #1928259)

 -- Andreas Hasenack <email address hidden> Mon, 24 May 2021 17:51:48 -0300

Changed in nfs-utils (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nfs-utils - 1:1.3.4-2.1ubuntu5.5

---------------
nfs-utils (1:1.3.4-2.1ubuntu5.5) bionic; urgency=medium

  * d/nfs-common.postinst: always start nfs-utils.service, so the
    restart in the #DEBHELPER# section can do its job if needed
    (LP: #1928259)

 -- Andreas Hasenack <email address hidden> Mon, 24 May 2021 17:38:47 -0300

Changed in nfs-utils (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
In , bcotton (bcotton-redhat-bugs) wrote :

This bug appears to have been reported against 'rawhide' during the Fedora 35 development cycle.
Changing version to 35.

Changed in nfs-utils (Debian):
status: New → Fix Released
Revision history for this message
In , bcotton (bcotton-redhat-bugs) wrote :

This message is a reminder that Fedora Linux 35 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 35 on 2022-12-13.
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
'version' of '35'.

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

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora Linux 35 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 Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.