Code review comment for ~mitchdz/ubuntu/+source/multipath-tools:mitch/manually_restart_multipathd_on_upgrade_to_systemd_only_package-lunar

Revision history for this message
Mitchell Dzurick (mitchdz) wrote :

Hi Andreas, I did some testing on the current package. I did 3 tests here and I am satisfied with them. Let me know what you think. I did the following:

1. Testing restart on package upgrade
2. Installing a fresh package (no warning message here because dpkg compare is lt-nl)
3. Upgrading to a future package

-----

1. Testing restart on package upgrade

$ lxc shell launch ubuntu:lunar l --vm
$ alias lxcrun="lxc exec l --"
$ lxcrun dpkg -l multipath-tools | grep multipath-tools | awk '{print $3}'
$ lxcrun pidof multipathd
137
$ lxcrun add-apt-repository ppa:mitchdz/multipath-tools-2035098 -y
$ lxcrun apt install -y multipath-tools=0.8.8-1ubuntu2.2~lunar5
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  kpartx
Suggested packages:
  multipath-tools-boot
The following packages will be upgraded:
  kpartx multipath-tools
2 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
Need to get 365 kB of archives.
After this operation, 1024 B disk space will be freed.
Get:1 https://ppa.launchpadcontent.net/mitchdz/multipath-tools-2035098/ubuntu lunar/main amd64 kpartx amd64 0.8.8-1ubuntu2.2~lunar5 [30.4 kB]
Get:2 https://ppa.launchpadcontent.net/mitchdz/multipath-tools-2035098/ubuntu lunar/main amd64 multipath-tools amd64 0.8.8-1ubuntu2.2~lunar5 [335 kB]
Fetched 365 kB in 2s (167 kB/s)
(Reading database ... 57593 files and directories currently installed.)
Preparing to unpack .../kpartx_0.8.8-1ubuntu2.2~lunar5_amd64.deb ...
Unpacking kpartx (0.8.8-1ubuntu2.2~lunar5) over (0.8.8-1ubuntu2) ...
Preparing to unpack .../multipath-tools_0.8.8-1ubuntu2.2~lunar5_amd64.deb ...
Unpacking multipath-tools (0.8.8-1ubuntu2.2~lunar5) over (0.8.8-1ubuntu2) ...
Setting up kpartx (0.8.8-1ubuntu2.2~lunar5) ...
Setting up multipath-tools (0.8.8-1ubuntu2.2~lunar5) ...
The following warning from stopping multipathd.service is safe to ignore. See (LP: #2035098).
Warning: The unit file, source configuration file or drop-ins of multipathd.service changed on
 disk. Run 'systemctl daemon-reload' to reload units.
Could not execute systemctl: at /usr/bin/deb-systemd-invoke line 145.
Removing obsolete conffile /etc/init.d/multipath-tools ...
Processing triggers for man-db (2.11.2-1) ...
Processing triggers for libc-bin (2.37-0ubuntu2.1) ...
Scanning processes...
Scanning linux images...

Running kernel seems to be up-to-date.

No services need to be restarted.

No containers need to be restarted.

No user sessions are running outdated binaries.

No VM guests are running outdated hypervisor (qemu) binaries on this host.
# lxcrun pidof multipathd
1959
# lxcrun systemctl status multipathd.{service,socket} | grep Active -B2

● multipathd.service - Device-Mapper Multipath Device Controller
     Loaded: loaded (/lib/systemd/system/multipathd.service; enabled; preset: enabled)
     Active: active (running) since Thu 2023-10-05 16:40:20 UTC; 1min 5s ago
--
○ multipathd.socket - multipathd control socket
     Loaded: loaded (/lib/systemd/system/multipathd.socket; enabled; preset: enabled)
     Active: inactive (dead) since Thu 2023-10-05 16:40:19 UTC; 1min 6s ago

2. Installing a fresh package (no warning message here because dpkg is lt-nl)

# lxcrun apt purge multipath-tools -y
$ lxcrun apt install -y multipath-tools=0.8.8-1ubuntu2.2~lunar5
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Suggested packages:
  multipath-tools-boot
The following NEW packages will be installed:
  multipath-tools
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 335 kB of archives.
After this operation, 1231 kB of additional disk space will be used.
Get:1 https://ppa.launchpadcontent.net/mitchdz/multipath-tools-2035098/ubuntu lunar/main amd64 multipath-tools amd64 0.8.8-1ubuntu2.2~lunar5 [335 kB]
Fetched 335 kB in 1s (239 kB/s)
Selecting previously unselected package multipath-tools.
(Reading database ... 57494 files and directories currently installed.)
Preparing to unpack .../multipath-tools_0.8.8-1ubuntu2.2~lunar5_amd64.deb ...
Unpacking multipath-tools (0.8.8-1ubuntu2.2~lunar5) ...
Setting up multipath-tools (0.8.8-1ubuntu2.2~lunar5) ...
Created symlink /etc/systemd/system/multipath-tools.service → /lib/systemd/system/multipathd.s
ervice.
Created symlink /etc/systemd/system/sysinit.target.wants/multipathd.service → /lib/systemd/sys
tem/multipathd.service.
Created symlink /etc/systemd/system/sockets.target.wants/multipathd.socket → /lib/systemd/syst
em/multipathd.socket.
Could not execute systemctl: at /usr/bin/deb-systemd-invoke line 145.
Processing triggers for man-db (2.11.2-1) ...
Processing triggers for libc-bin (2.37-0ubuntu2.1) ...
Scanning processes...
Scanning linux images...

Running kernel seems to be up-to-date.

No services need to be restarted.

No containers need to be restarted.

No user sessions are running outdated binaries.

No VM guests are running outdated hypervisor (qemu) binaries on this host.
# lxcrun systemctl status multipathd.{service,socket} | grep Active -B2
● multipathd.service - Device-Mapper Multipath Device Controller
     Loaded: loaded (/lib/systemd/system/multipathd.service; enabled; preset: enabled)
     Active: active (running) since Thu 2023-10-05 16:43:11 UTC; 5s ago
--
○ multipathd.socket - multipathd control socket
     Loaded: loaded (/lib/systemd/system/multipathd.socket; enabled; preset: enabled)
     Active: inactive (dead)

3. Upgrading to a future package

# lxcrun wget https://launchpad.net/~mitchdz/+archive/ubuntu/multipath-tools-2035098/+files/multipath-tools_0.8.8-1ubuntu2.2~lunar5_amd64.deb
# lxrun mkdir tmp
# lxcrun dpkg-deb -R multipath-tools_0.8.8-1ubuntu2.2\~lunar5_amd64.deb tmp
# lxcrun sed -i s/1ubuntu2.2~lunar5/1ubuntu2.2/g tmp/DEBIAN/control
# lxcrun sed -i s/"kpartx (>= 0.8.8-1ubuntu2.2), "//g tmp/DEBIAN/control
# lxcrun dpkg-deb -b tmp/ 2.2.deb
# lxcrun sed -i s/1ubuntu2.2/1ubuntu2.3/g tmp/DEBIAN/control
# lxcrun dpkg-deb -b tmp/ 2.3.deb
# lxcrun dpkg -i 2.2.deb
# lxcrun dpkg -l multipath-tools | grep multipath-tools | awk '{print $3}'
0.8.8-1ubuntu2.2
# lxcrun pidof multipathd
2973
# dpkg -i 2.3.deb
(Reading database ... 57589 files and directories currently installed.)
Preparing to unpack 2.3.deb ...
Unpacking multipath-tools (0.8.8-1ubuntu2.3) over (0.8.8-1ubuntu2.2) ...
Setting up multipath-tools (0.8.8-1ubuntu2.3) ...
Could not execute systemctl: at /usr/bin/deb-systemd-invoke line 145.
Processing triggers for libc-bin (2.37-0ubuntu2.1) ...
Processing triggers for man-db (2.11.2-1) ...
# lxcrun pidof multipathd
3062
# lxcrun dpkg -l multipath-tools | grep multipath-tools | awk '{print $3}'
0.8.8-1ubuntu2.3
# lxcrun systemctl status multipathd.{service,socket} | grep Active -B2

● multipathd.service - Device-Mapper Multipath Device Controller
     Loaded: loaded (/lib/systemd/system/multipathd.service; enabled; preset: enabled)
     Active: active (running) since Thu 2023-10-05 16:55:49 UTC; 12s ago
--
○ multipathd.socket - multipathd control socket
     Loaded: loaded (/lib/systemd/system/multipathd.socket; enabled; preset: enabled)
     Active: inactive (dead)

« Back to merge proposal