Merge ~mitchdz/ubuntu/+source/multipath-tools:mitch/remove_init_conf_mantic into ubuntu/+source/multipath-tools:ubuntu/mantic-devel

Proposed by Mitchell Dzurick
Status: Merged
Merged at revision: 77f751f921528b5b00975bdedd8f5c7b4a612a26
Proposed branch: ~mitchdz/ubuntu/+source/multipath-tools:mitch/remove_init_conf_mantic
Merge into: ubuntu/+source/multipath-tools:ubuntu/mantic-devel
Diff against target: 26 lines (+12/-0)
2 files modified
debian/changelog (+11/-0)
debian/multipath-tools.maintscript (+1/-0)
Reviewer Review Type Date Requested Status
Bryce Harrington (community) Approve
Canonical Server Pending
Canonical Server Reporter Pending
Review via email: mp+448287@code.qastaging.launchpad.net
To post a comment you must log in.
Revision history for this message
Mitchell Dzurick (mitchdz) wrote :

This MP is part of https://bugs.launchpad.net/ubuntu/focal/+source/multipath-tools/+bug/2000186 but the full resolution was not included in the Mantic merge. This MP aims to include the removal of /etc/init.d/multipath-tools for users upgrading from previous versions.

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

I tested that removing /etc/init.d/multipath-tools does not cause any adverse affects for Jammy and noted the testing steps in the bug I mentioned above. Linking the exact comment for ease of tracking - https://bugs.launchpad.net/ubuntu/+source/multipath-tools/+bug/2000186/comments/25

Revision history for this message
Bryce Harrington (bryce) wrote :

Do I understand you tested the Jammy->Mantic upgrade? Have you also tested Lunar->Mantic? Is it possible to test this behavior in LXC?

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

I did not test on upgrade, but I don't see why it can't be tested in LXC.

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

And to Clarify on my first comment, I tested (in Jammy) that removing /etc/init.d/multipath-tools through upgrading the multipath-tools package does not cause any noticeable regressions, not the distro itself. I'll do a distro upgrade test with LXC today.

The reason I'm proposing this MP is in the case that people do upgrade from lunar or a previous distro and are holding onto the old /etc/init.d/multipath-tools configuration file. This change is intended to be carried as an ubuntu delta going forward with future multipath-tools merges.

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

Testing the conffile removal behavior is easy enough to do in LXD. Of course this simple example doesn't show that multipath is working properly, just that the conf file is being removed on upgrade (the goal of this MP). I understand that checking multipath-tools working properly is important, so I'm looking to setup a Mantic testbed using https://github.com/canonical/server-test-scripts/tree/main/ha/virsh. Currently I'm exploring these scripts to help test the other multipath-tool SRUs [1][2] that is in-progress, and these tests will be focused on ensuring daemon restarts/system reboots do not cause regressions.

1. Setup lunar LXC container
$ lxc launch images:ubuntu/lunar/cloud mpath-test
$ lxc exec mpath-test -- bash

2. set sources to Mantic
# sed -i 's/lunar/mantic/g' /etc/apt/sources.list

3. If testing the new PPA
# apt install -y software-properties-common
# add-apt-repository ppa:mitchdz/multipath-tools-mantic-rm-initscript
# sed -i 's/lunar/mantic/g' /etc/apt/sources.list.d/mitchdz-ubuntu-multipath-tools-mantic-rm-initscript-lunar.list

4. ll /etc/init.d/multipath-tools
-rwxr-xr-x 1 root root 2827 Feb 18 2022 /etc/init.d/multipath-tools*

5. Upgrade packages to Mantic
#apt dist-upgrade

6. Check behavior
// Case with private PPA
# dpkg -l multipath-tools | awk '/^ii/ {print $3}'
0.9.4-5ubuntu2~mantic2
# ll /etc/init.d/multipath-tools
ls: cannot access '/etc/init.d/multipath-tools': No such file or directory

// Current Case without fix
# dpkg -l multipath-tools | awk '/^ii/ {print $3}'
0.9.4-5ubuntu1
# ll /etc/init.d/multipath-tools
-rwxr-xr-x 1 root root 2827 Feb 18 2022 /etc/init.d/multipath-tools*

[1] - https://bugs.launchpad.net/ubuntu/focal/+source/multipath-tools/+bug/2000186
[2] - https://bugs.launchpad.net/ubuntu/+source/multipath-tools/+bug/2026881

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

In my opinion, the current autopkgtests are good enough to test for regressions with this change. The tests that I would end up doing are essentially the autopkgtests. With that said, I will still set up a testbed environment and do extra testing just out of caution (and I also want to play around with the testbed).

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

Tested this in a Mantic VM. Like I said, the autopkgtests are good enough to test against regressions. This test is mainly checking that the in-place upgrade has no errors and that the daemon still works.

1. Create Mantic VM
2. Install required packages
# apt install -y lsscsi multipath-tools open-iscsi tgt fio
3. Setup iscsi targets
```
targetname="iqn.2016-11.foo.com:target.iscsi"
cwd=$(pwd)
testdir="/mnt/tgtmpathtest"
localhost="127.0.0.1"
portal="${localhost}:3260"
maxpaths=4
backfn="backingfile"
expectwwid="60000000000000000e00000000010001"
testdisk="/dev/disk/by-id/wwn-0x${expectwwid}"

### Setup mpath devices

# Restart tgtd to make sure modules are all loaded
service tgt restart || echo "Failed to restart tgt" >&2

# prep SINGLE test file
truncate --size 100M ${backfn}

# create target
tgtadm --lld iscsi --op new --mode target --tid 1 -T "${targetname}"
# allow all to bind the target
tgtadm --lld iscsi --op bind --mode target --tid 1 -I ALL
# set backing file
tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 1 -b "${cwd}/${backfn}"

# scan for targets (locally)
iscsiadm --mode discovery --type sendtargets --portal ${localhost}

# login
echo "login #1"
iscsiadm --mode node --targetname "${targetname}" --portal ${portal} --login
# duplicate this session (always 1)
for i in $(seq 2 ${maxpaths})
do
    echo "extra login #${i}"
    iscsiadm --mode session -r 1 --op new
done

udevadm settle
sleep 5 # sleep a bit to allow device to be created.

# status summary
echo "Status after initial setup"
tgtadm --lld iscsi --mode target --op show
tgtadm --lld iscsi --op show --mode conn --tid 1
iscsiadm --mode session -P 1
lsscsi -liv
multipath -v3 -ll
dmsetup table

echo "Test WWN should now point to DM"
readlink "${testdisk}" | grep dm
```
4. Check multipath devices
# multipath -ll
mpatha (360000000000000000e00000000010001) dm-0 IET,VIRTUAL-DISK
size=100M features='0' hwhandler='0' wp=rw
|-+- policy='service-time 0' prio=1 status=active
| `- 9:0:0:1 sdd 8:48 active ready running
|-+- policy='service-time 0' prio=1 status=enabled
| `- 6:0:0:1 sda 8:0 active ready running
|-+- policy='service-time 0' prio=1 status=enabled
| `- 7:0:0:1 sdb 8:16 active ready running
`-+- policy='service-time 0' prio=1 status=enabled
  `- 8:0:0:1 sdc 8:32 active ready running

5. Test in-place ugprade (which calls a daemon restart)
# dpkg -l multipath-tools | awk '/^ii/ {print $3}'
0.9.4-5ubuntu1
# add-apt-repository ppa:mitchdz/multipath-tools-mantic-rm-initscript -y && apt update -y && apt upgrade -y
# dpkg -l multipath-tools | awk '/^ii/ {print $3}'
0.9.4-5ubuntu2~mantic2
# multipath -ll
mpatha (360000000000000000e00000000010001) dm-0 IET,VIRTUAL-DISK
size=100M features='0' hwhandler='0' wp=rw
|-+- policy='service-time 0' prio=1 status=active
| `- 9:0:0:1 sdd 8:48 active ready running
|-+- policy='service-time 0' prio=1 status=enabled
| `- 6:0:0:1 sda 8:0 active ready running
|-+- policy='service-time 0' prio=1 status=enabled
| `- 7:0:0:1 sdb 8:16 active ready running
`-+- policy='service-time 0' prio=1 status=enabled
  `- 8:0:0:1 sdc 8:32 active ready running

Revision history for this message
Bryce Harrington (bryce) wrote :

All looks good, thanks for the extra testing work!

 signfile dsc multipath-tools_0.9.4-5ubuntu2.dsc A661100B3DAC1D4F2CAD8A54E603B2578FB8F0FB

 fixup_buildinfo multipath-tools_0.9.4-5ubuntu2.dsc multipath-tools_0.9.4-5ubuntu2_source.buildinfo
 signfile buildinfo multipath-tools_0.9.4-5ubuntu2_source.buildinfo A661100B3DAC1D4F2CAD8A54E603B2578FB8F0FB

 fixup_changes dsc multipath-tools_0.9.4-5ubuntu2.dsc multipath-tools_0.9.4-5ubuntu2_source.changes
 fixup_changes buildinfo multipath-tools_0.9.4-5ubuntu2_source.buildinfo multipath-tools_0.9.4-5ubuntu2_source.changes
 signfile changes multipath-tools_0.9.4-5ubuntu2_source.changes A661100B3DAC1D4F2CAD8A54E603B2578FB8F0FB

Successfully signed dsc, buildinfo, changes files
triage-mantic+23.10: ~/pkg/MultipathTools/review-lp2000186/multipath-tools-gu$ grep ^Vcs ../multipath-tools_0.9.4-5ubuntu2_source.changes
Vcs-Git: https://git.launchpad.net/~bryce/ubuntu/+source/multipath-tools
Vcs-Git-Commit: 77f751f921528b5b00975bdedd8f5c7b4a612a26
Vcs-Git-Ref: refs/heads/remove_init_conf_mantic

triage-mantic+23.10: ~/pkg/MultipathTools/review-lp2000186/multipath-tools-gu$ dput ubuntu ../multipath-tools_0.9.4-5ubuntu2_source.changes
D: Setting host argument.
Checking signature on .changes
gpg: ../multipath-tools_0.9.4-5ubuntu2_source.changes: Valid signature from E603B2578FB8F0FB
Checking signature on .dsc
gpg: ../multipath-tools_0.9.4-5ubuntu2.dsc: Valid signature from E603B2578FB8F0FB
Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading multipath-tools_0.9.4-5ubuntu2.dsc: done.
  Uploading multipath-tools_0.9.4-5ubuntu2.debian.tar.xz: done.
  Uploading multipath-tools_0.9.4-5ubuntu2_source.buildinfo: done.
  Uploading multipath-tools_0.9.4-5ubuntu2_source.changes: done.
Successfully uploaded packages.

review: Approve

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches