[Bug 1928259] Re: Package upgrade won't restart services
** Changed in: nfs-utils (Debian) Status: New => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1928259 Title: Package upgrade won't restart services To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/1928259/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1928259] Re: Package upgrade won't restart services
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 Mon, 24 May 2021 17:38:47 -0300 ** Changed in: nfs-utils (Ubuntu Bionic) Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1928259 Title: Package upgrade won't restart services To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/1928259/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1928259] Re: Package upgrade won't restart services
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 Mon, 24 May 2021 17:51:48 -0300 ** Changed in: nfs-utils (Ubuntu Focal) Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1928259 Title: Package upgrade won't restart services To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/1928259/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1928259] Re: Package upgrade won't restart services
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 Mon, 24 May 2021 17:55:01 -0300 ** Changed in: nfs-utils (Ubuntu Groovy) Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1928259 Title: Package upgrade won't restart services To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/1928259/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1928259] Re: Package upgrade won't restart services
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 Mon, 24 May 2021 17:57:04 -0300 ** Changed in: nfs-utils (Ubuntu Hirsute) Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1928259 Title: Package upgrade won't restart services To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/1928259/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1928259] Re: Package upgrade won't restart services
** Tags removed: verification-needed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1928259 Title: Package upgrade won't restart services To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/1928259/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1928259] Re: Package upgrade won't restart services
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/0D 0:00 ./stat_as /mnt/test_krb5/foo 9995 10035 8036 pts/0D 0:00 ./stat_as /mnt/test_krb5/foo 9995 10035 8091 pts/0S+ 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.1ubuntu5.5_amd64.deb ... Unpacking nfs-common (1:1.3.4-2.1ubuntu5.5) over (1:1.3.4-2.1ubuntu5.3) ... Preparing to unpack .../nfs-kernel-server_1%3a1.3.4-2.1ubuntu5.5_amd64.deb ... Unpacking nfs-kernel-server (1:1.3.4-2.1ubuntu5.5) over (1:1.3.4-2.1ubuntu5.3) ... Setting up nfs-common (1:1.3.4-2.1ubuntu5.5) ... Setting up nfs-kernel-server (1:1.3.4-2.1ubuntu5.5) ... 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) ... Not only was rpc.gssd restarted automatically (see new pid): ubuntu@b-gssd-restart-1928259-1927745-a:~$ ps axw | grep rpc\\.gssd 8886 ?Ss 0:00 /usr/sbin/rpc.gssd We also got rid of the stuck stat_as processes: ubuntu@b-gssd-restart-1928259-1927745-a:~$ ps axw|grep stat_as 9550 pts/0S+ 0:00 grep --color=auto stat_as TEST B ubuntu@b-gssd-restart-1928259-1927745-b:~$ diff -u pstree.old pstree.new ubuntu@b-gssd-restart-1928259-1927745-b:~$ l pstree.* -rw-rw-r-- 1 ubuntu ubuntu 633 Jun 11 20:55 pstree.new -rw-rw-r-- 1 ubuntu ubuntu 633 Jun 11 20:55 pstree.old ubunt
[Bug 1928259] Re: Package upgrade won't restart services
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 package lists... Done Building dependency tree Reading state information... Done Suggested packages: watchdog The following packages will be upgraded: nfs-common 1 upgraded, 0 newly installed, 0 to remove and 67 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-proposed/main amd64 nfs-common amd64 1:1.3.4-2.5ubuntu3.4 [204 kB] Fetched 204 kB in 0s (1411 kB/s) (Reading database ... 63643 files and directories currently installed.) Preparing to unpack .../nfs-common_1%3a1.3.4-2.5ubuntu3.4_amd64.deb ... Unpacking nfs-common (1:1.3.4-2.5ubuntu3.4) over (1:1.3.4-2.5ubuntu3.3) ... Setting up nfs-common (1:1.3.4-2.5ubuntu3.4) ... Processing triggers for man-db (2.9.1-1) ... Processing triggers for systemd (245.4-4ubuntu3.6) ... New PID: ubuntu@f-gssd-restart-1928259-1927745-A:~$ pidof rpc.gssd 4131 TEST B ubuntu@f-gssd-restart-1928259-1927745-B:~$ diff -u pstree.old pstree.new ubuntu@f-gssd-restart-1928259-1927745-B:~$ l pstree.*
[Bug 1928259] Re: Package upgrade won't restart services
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 Packages And rpc.gssd restarted: ubuntu@g-gssd-restart-1928259-1927745-A:~$ pidof rpc.gssd 3721 TEST B There was a diff in the pstree output, but unrelated to nfs services: ubuntu@g-gssd-restart-1928259-1927745-B:~$ diff -u pstree.old pstree.new --- pstree.old 2021-06-11 20:08:05.431952295 + +++ pstree.new 2021-06-11 20:09:08.581416621 + @@ -6,7 +6,7 @@ |-irqbalance---{irqbalance} |-multipathd---6*[{multipathd}] |-networkd-dispat -|-packagekitd---3*[{packagekitd}] +|-packagekitd---2*[{packagekitd}] |-polkitd---2*[{polkitd}] |-rpcbind |-rsyslogd---3*[{rsyslogd}] ubuntu@g-gssd-restart-1928259-1927745-B:~$ l pstree.* -rw-rw-r-- 1 ubuntu ubuntu 678 Jun 11 20:09 pstree.new -rw-rw-r-- 1 ubuntu ubuntu 678 Jun 11 20:08 pstree.old Second pstree was with the package 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:
[Bug 1928259] Re: Package upgrade won't restart services
** Description changed: [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 - systemctl start rpc-gssd.service + 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 purge 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-serve
[Bug 1928259] Re: Package upgrade won't restart services
# 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 removed: verification-needed-hirsute ** Tags added: verification-done-hirsute -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1928259 Title: Package upgrade won't restart services To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/1928259/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1928259] Re: Package upgrade won't restart services
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 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1928259 Title: Package upgrade won't restart services To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/1928259/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1928259] Re: Package upgrade won't restart services
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 Mon, 24 May 2021 17:59:39 -0300 ** Changed in: nfs-utils (Ubuntu) Status: In Progress => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1928259 Title: Package upgrade won't restart services To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/1928259/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1928259] Re: Package upgrade won't restart services
** Merge proposal linked: https://code.launchpad.net/~ahasenack/ubuntu/+source/nfs-utils/+git/nfs-utils/+merge/403835 ** Merge proposal linked: https://code.launchpad.net/~ahasenack/ubuntu/+source/nfs-utils/+git/nfs-utils/+merge/403836 ** Merge proposal linked: https://code.launchpad.net/~ahasenack/ubuntu/+source/nfs-utils/+git/nfs-utils/+merge/403837 ** Merge proposal linked: https://code.launchpad.net/~ahasenack/ubuntu/+source/nfs-utils/+git/nfs-utils/+merge/403838 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1928259 Title: Package upgrade won't restart services To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/1928259/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1928259] Re: Package upgrade won't restart services
** Description changed: [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 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: - sudo apt install nfs-commont + # 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 purge 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_
[Bug 1928259] Re: Package upgrade won't restart services
** Description changed: [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. # create a VM for the affected ubuntu release under test, login and run: - sudo touch /etc/krb5.keytab + 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: + # 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 + # 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 systemctl start rpc-gssd.service - # Check it's running, and make note of its pid: - pidof rpc.gssd - 2994 + # Check it's running, and make note of its pid: + pidof rpc.gssd + 2994 - # reinstall nfs-common + # reinstall nfs-common sudo apt install --reinstall nfs-common - # note rpc-gssd wasn't restarted - pidof rpc.gssd - 2994 + # note rpc-gssd wasn't restarted + pidof rpc.gssd + 2994 - # install the fixed nfs-common package: - sudo apt install nfs-commont - - # this time, rpc.gssd is restarted - pidof rpc.gssd - 5000 + # install the fixed nfs-common package: + sudo apt install nfs-commont + # this time, rpc.gssd is restarted + pidof rpc.gssd + 5000 [Where problems could occur] - - * Think about what the upload changes in the software. Imagine the change is - wrong or breaks something else: how would this show up? - - * It is assumed that any SRU candidate patch is well-tested before - upload and has a low overall risk of regression, but it's important - to make the effort to think about what ''could'' happen in the - event of a regression. - - * This must '''never''' be "None" or "Low", or entirely an argument as to why - your upload is low risk. - - * This both shows the SRU team that the risks have been considered, - and provides guidance to testers in regression-testing the SRU. + 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. - * Anything else you think is useful to include - * Anticipate questions from users, SRU, +1 maintenance, security teams and the Technical Board - * and address these questions in advance + 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 [I
[Bug 1928259] Re: Package upgrade won't restart services
** Description changed: [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). - * An explanation of the effects of the bug on users and - - * justification for backporting the fix to the stable release. - - * In addition, it is helpful, but not required, to include an -explanation of how the upload fixes this bug. + 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. - * detailed instructions how to reproduce the bug + # create a VM for the affected ubuntu release under test, login and run: + sudo touch /etc/krb5.keytab + sudo chmod 0600 /etc/krb5.keytab - * these should allow someone who is not familiar with the affected -package to reproduce the bug and verify that the updated package fixes -the problem. + # install nfs-common + sudo apt install nfs-common -y - * if other testing is appropriate to perform before landing this update, -this should also be described here. + # 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 + 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: + sudo apt install nfs-commont + + # this time, rpc.gssd is restarted + pidof rpc.gssd + 5000 + [Where problems could occur] - * Think about what the upload changes in the software. Imagine the change is -wrong or breaks something else: how would this show up? + * Think about what the upload changes in the software. Imagine the change is + wrong or breaks something else: how would this show up? - * It is assumed that any SRU candidate patch is well-tested before -upload and has a low overall risk of regression, but it's important -to make the effort to think about what ''could'' happen in the -event of a regression. + * It is assumed that any SRU candidate patch is well-tested before + upload and has a low overall risk of regression, but it's important + to make the effort to think about what ''could'' happen in the + event of a regression. - * This must '''never''' be "None" or "Low", or entirely an argument as to why -your upload is low risk. + * This must '''never''' be "None" or "Low", or entirely an argument as to why + your upload is low risk. - * This both shows the SRU team that the risks have been considered, -and provides guidance to testers in regression-testing the SRU. + * This both shows the SRU team that the risks have been considered, + and provides guidance to testers in regression-testing the SRU. [Other Info] - - * Anything else you think is useful to include - * Anticipate questions from users, SRU, +1 maintenance, security teams and the Technical Board - * and address these questions in advance + * Anything else you think is useful to include + * Anticipate questions from users, SRU, +1 maintenance, security teams and the Technical Board + * and address these questions in advance [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 con
[Bug 1928259] Re: Package upgrade won't restart services
** Description changed: + [Impact] + + * An explanation of the effects of the bug on users and + + * justification for backporting the fix to the stable release. + + * In addition, it is helpful, but not required, to include an +explanation of how the upload fixes this bug. + + [Test Plan] + + * detailed instructions how to reproduce the bug + + * these should allow someone who is not familiar with the affected +package to reproduce the bug and verify that the updated package fixes +the problem. + + * if other testing is appropriate to perform before landing this update, +this should also be described here. + + [Where problems could occur] + + * Think about what the upload changes in the software. Imagine the change is +wrong or breaks something else: how would this show up? + + * It is assumed that any SRU candidate patch is well-tested before +upload and has a low overall risk of regression, but it's important +to make the effort to think about what ''could'' happen in the +event of a regression. + + * This must '''never''' be "None" or "Low", or entirely an argument as to why +your upload is low risk. + + * This both shows the SRU team that the risks have been considered, +and provides guidance to testers in regression-testing the SRU. + + [Other Info] + + * Anything else you think is useful to include + * Anticipate questions from users, SRU, +1 maintenance, security teams and the Technical Board + * and address these questions in advance + + + [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. + .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. + a requirement dependency on it. 3) A unit may be started when needed via activation (socket, path, timer, -D-Bus, udev, scripted systemctl call, ...). + D-Bus, udev, scripted systemctl call, ...). 4) In case of template units, the unit is meant to be enabled with some -instance name specified + 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 + 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) + Loaded: loaded (/lib/system
[Bug 1928259] Re: Package upgrade won't restart services
** Changed in: nfs-utils (Ubuntu Hirsute) Assignee: (unassigned) => Andreas Hasenack (ahasenack) ** Changed in: nfs-utils (Ubuntu Groovy) Assignee: (unassigned) => Andreas Hasenack (ahasenack) ** Changed in: nfs-utils (Ubuntu Focal) Assignee: (unassigned) => Andreas Hasenack (ahasenack) ** Changed in: nfs-utils (Ubuntu Bionic) Assignee: (unassigned) => Andreas Hasenack (ahasenack) ** Changed in: nfs-utils (Ubuntu Bionic) 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 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1928259 Title: Package upgrade won't restart services To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/1928259/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1928259] Re: Package upgrade won't restart services
** Changed in: nfs-utils (Ubuntu) Status: New => In Progress ** Changed in: nfs-utils (Ubuntu) Assignee: (unassigned) => Andreas Hasenack (ahasenack) ** Also affects: nfs-utils (Ubuntu Groovy) Importance: Undecided Status: New ** Also affects: nfs-utils (Ubuntu Focal) Importance: Undecided Status: New ** Also affects: nfs-utils (Ubuntu Bionic) Importance: Undecided Status: New ** Also affects: nfs-utils (Ubuntu Hirsute) Importance: Undecided Status: New ** 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 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1928259 Title: Package upgrade won't restart services To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/1928259/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1928259] Re: Package upgrade won't restart services
** Merge proposal linked: https://code.launchpad.net/~ahasenack/ubuntu/+source/nfs-utils/+git/nfs-utils/+merge/403288 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1928259 Title: Package upgrade won't restart services To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/1928259/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1928259] Re: Package upgrade won't restart services
** Changed in: nfs-utils (Fedora) Status: Unknown => Confirmed ** Changed in: nfs-utils (Fedora) Importance: Unknown => Undecided -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1928259 Title: Package upgrade won't restart services To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/1928259/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1928259] Re: Package upgrade won't restart services
** Bug watch added: Red Hat Bugzilla #1961322 https://bugzilla.redhat.com/show_bug.cgi?id=1961322 ** Also affects: nfs-utils (Fedora) via https://bugzilla.redhat.com/show_bug.cgi?id=1961322 Importance: Unknown Status: Unknown -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1928259 Title: Package upgrade won't restart services To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/1928259/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1928259] Re: Package upgrade won't restart services
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/0S+ 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/0S+ 0:00 \_ grep --color=auto rpc 1489 ?Ss 0:00 /usr/sbin/rpc.svcgssd 1490 ?Ss 0:00 /usr/sbin/rpc.gssd -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1928259 Title: Package upgrade won't restart services To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/1928259/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1928259] Re: Package upgrade won't restart services
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. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1928259 Title: Package upgrade won't restart services To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/1928259/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1928259] Re: Package upgrade won't restart services
** Changed in: nfs-utils (Debian) Status: Unknown => New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1928259 Title: Package upgrade won't restart services To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/1928259/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1928259] Re: Package upgrade won't restart services
** Bug watch added: Debian Bug tracker #988430 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=988430 ** Also affects: nfs-utils (Debian) via https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=988430 Importance: Unknown Status: Unknown -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1928259 Title: Package upgrade won't restart services To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/1928259/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs