Comment 25 for bug 2000186

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

I tested this logic on Jammy which has the same logical change. The goal here is essentially a sanity check to ensure that removing /etc/init.d/multipath-tools doesn't cause things to go on fire. Nothing should be relying on that configuration file for us, and this is a check to confirm that.

NOTE: the laptop I used to test this is using Jammy if that is useful.
1. clone the test script repo
$ git clone https://github.com/canonical/server-test-scripts
$ cd server-test-scripts/ha/virsh

2. Setup test environment
$ export AGENT="multipath-tools-test"
$ ./setup-cluster.sh --iscsi-shared-device
// Wait here for a while

5. login to node 01 (can be any node)
$ ipaddr=$(sudo virsh domifaddr ha-agent-virsh-j-multipath-tools-test-node01 | grep ipv4 | head -n1 | awk '{print $4}' | sed 's/...$//')
$ ssh ubuntu@$ipaddr

6. Check that multipath is working properly
$ sudo multipath -ll
mpatha (36001405d94ad1e552f94b67b894b7794) dm-0 LIO-ORG,iscsi-disk01
size=1.0G features='0' hwhandler='1 alua' wp=rw
|-+- policy='service-time 0' prio=50 status=active
| `- 7:0:0:0 sda 8:0 active ready running
`-+- policy='service-time 0' prio=50 status=enabled
  `- 6:0:0:0 sdb 8:16 active ready running

7. check for init script
$ ll /etc/init.d/multipath-tools
-rwxr-xr-x 1 root root 2827 Feb 18 2022 /etc/init.d/multipath-tools*

8. update to the new multipath version
$ sudo add-apt-repository ppa:mitchdz/multipath-tools-2026881
$ sudo apt update -y && sudo apt upgrade -y
$ dpkg -l multipath-tools | grep multipath-tools | awk '{print $3}'
0.8.8-1ubuntu1.22.04.1
$ sudo apt upgrade
$ dpkg -l multipath-tools | grep multipath-tools | awk '{print $3}'
0.8.8-1ubuntu1.22.04.2~jammy5

9. check for init script
$ ll /etc/init.d/multipath-tools
ls: cannot access '/etc/init.d/multipath-tools': No such file or directory

10. Check multipath is still working fine after upgrade
$ sudo multipath -ll
mpatha (36001405d94ad1e552f94b67b894b7794) dm-0 LIO-ORG,iscsi-disk01
size=1.0G features='0' hwhandler='1 alua' wp=rw
|-+- policy='service-time 0' prio=50 status=active
| `- 7:0:0:0 sda 8:0 active ready running
`-+- policy='service-time 0' prio=50 status=enabled
  `- 6:0:0:0 sdb 8:16 active ready running

11. Reboot
wait for ssh
$ ssh ubuntu@$ipaddr

12. re-connect iscsi drives
$ sudo dhclient enp2s0 #enp2s0 is not in netplan for some reason
$ sudo iscsiadm -m node --login

13. Check multipath-tools is still working
$ sudo multipath -ll
mpatha (36001405d94ad1e552f94b67b894b7794) dm-0 LIO-ORG,iscsi-disk01
size=1.0G features='0' hwhandler='1 alua' wp=rw
|-+- policy='service-time 0' prio=50 status=active
| `- 6:0:0:0 sda 8:0 active ready running
`-+- policy='service-time 0' prio=50 status=enabled
  `- 7:0:0:0 sdb 8:16 active ready running