Merge ~renanrodrigo/ubuntu/+source/open-iscsi:flag-disable-configure-network into ubuntu/+source/open-iscsi:ubuntu/devel

Proposed by Renan Rodrigo
Status: Approved
Approved by: git-ubuntu bot
Approved revision: not available
Proposed branch: ~renanrodrigo/ubuntu/+source/open-iscsi:flag-disable-configure-network
Merge into: ubuntu/+source/open-iscsi:ubuntu/devel
Diff against target: 58 lines (+26/-6)
2 files modified
debian/changelog (+8/-0)
debian/extra/initramfs/local-top/iscsi (+18/-6)
Reviewer Review Type Date Requested Status
git-ubuntu bot Approve
Lena Voytek (community) Approve
Ubuntu Sponsors Pending
Canonical Server Reporter Pending
Review via email: mp+484151@code.launchpad.net

Description of the change

This change introduces the ISCSI_AUTO_SKIP_INITRAMFS_NETWORKING flag, which can be used in the scenario where iscsi is set to 'auto' but there is no iBFT available. This scenario happens on Oracle Cloud, because there is a single image being shipped there and some machines will boot from iscsi and some will not.

Please check the linked bug and the commit message for more information or context.

This change has been forwarded to Debian, but it's still under discussion there:
https://salsa.debian.org/linux-blocks-team/open-iscsi/-/merge_requests/21

Landing it in Ubuntu solves the problem for now. If upstream or Debian decide to deal with this in a different way, this patch can be revisited in the future.

The package is built in https://launchpad.net/~renanrodrigo/+archive/ubuntu/patch-open-iscsi-lp2098515

autopkgtest results:
- amd64: https://autopkgtest.ubuntu.com/results/autopkgtest-plucky-renanrodrigo-patch-open-iscsi-lp2098515/plucky/amd64/o/open-iscsi/20250409_160038_88faa@/log.gz
- arm64: https://autopkgtest.ubuntu.com/results/autopkgtest-plucky-renanrodrigo-patch-open-iscsi-lp2098515/plucky/arm64/o/open-iscsi/20250410_175139_a0f6b@/log.gz
- armhf (didn't actually runs anything): https://autopkgtest.ubuntu.com/results/autopkgtest-plucky-renanrodrigo-patch-open-iscsi-lp2098515/plucky/armhf/o/open-iscsi/20250409_153147_46ed5@/log.gz
- ppc64e: https://autopkgtest.ubuntu.com/results/autopkgtest-plucky-renanrodrigo-patch-open-iscsi-lp2098515/plucky/ppc64el/o/open-iscsi/20250410_173404_eb6c5@/log.gz
- s390x: https://autopkgtest.ubuntu.com/results/autopkgtest-plucky-renanrodrigo-patch-open-iscsi-lp2098515/plucky/s390x/o/open-iscsi/20250410_173124_8fd9c@/log.gz

To post a comment you must log in.
Revision history for this message
Renan Rodrigo (renanrodrigo) wrote :

After talking to @utkarsh (Ubuntu Release Team) in a side channel, we concluded that it's better to make this a 0-day SRU to plucky when released. This gives us more time to test the change and guarantees a smooth release, because open-iscsi is a package present in several Ubuntu seeds.

Revision history for this message
Renan Rodrigo (renanrodrigo) wrote :

I will change this to point to QQ once the development is open, then prepare SRU paperwork - no need for sponsoring right now

Revision history for this message
Lena Voytek (lvoytek) wrote :

LGTM, this may not be what the final change looks like when Debian incorporates it, but should still be fine as an Ubuntu delta depending on how urgently we feel the fix is needed. We'll just have to keep it in mind in case Debian makes changes on their end :)

review: Approve
Revision history for this message
git-ubuntu bot (git-ubuntu-bot) wrote :

Approvers: lvoytek, renanrodrigo
Uploaders: lvoytek
MP auto-approved

review: Approve
Revision history for this message
Lena Voytek (lvoytek) wrote :

Sponsored for questing

dput ubuntu ../open-iscsi_2.1.10-3ubuntu4_source.changes
D: Setting host argument.
Checking signature on .changes
gpg: ../open-iscsi_2.1.10-3ubuntu4_source.changes: Valid signature from 34B8AD7D9529E793
Checking signature on .dsc
gpg: ../open-iscsi_2.1.10-3ubuntu4.dsc: Valid signature from 34B8AD7D9529E793
Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading open-iscsi_2.1.10-3ubuntu4.dsc: done.
  Uploading open-iscsi_2.1.10-3ubuntu4.debian.tar.xz: done.
  Uploading open-iscsi_2.1.10-3ubuntu4_source.buildinfo: done.
  Uploading open-iscsi_2.1.10-3ubuntu4_source.changes: done.
Successfully uploaded packages.

Unmerged commits

a611be0... by Renan Rodrigo

Update changelog

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 630744b..fc4292f 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,11 @@
6+open-iscsi (2.1.10-3ubuntu4) plucky; urgency=medium
7+
8+ * d/extra/initramfs/local-top/iscsi: add a flag to skip network
9+ configuration when iscsi is set to 'auto' but no iBFT data is present.
10+ Thanks to Alec Warren <alecwarren19@gmail.com>. (LP: #2098515)
11+
12+ -- Renan Rodrigo <renanrodrigo@canonical.com> Wed, 09 Apr 2025 10:21:33 -0300
13+
14 open-iscsi (2.1.10-3ubuntu3) plucky; urgency=medium
15
16 * d/t/{patch-image,testlib.py}: clean tests to make them work again
17diff --git a/debian/extra/initramfs/local-top/iscsi b/debian/extra/initramfs/local-top/iscsi
18index 24bf637..d294da9 100755
19--- a/debian/extra/initramfs/local-top/iscsi
20+++ b/debian/extra/initramfs/local-top/iscsi
21@@ -177,12 +177,21 @@ do_iscsi_login ()
22 done
23 fi
24
25- # run configure_networking even if we have iscsi_auto, because there
26- # could be other network interfaces that need to be configured
27- # also, if we set up DHCP iBFT, we need ipconfig to run so it creates
28- # a proper /run/net-${DEVICE}.conf file that includes the DNS search
29- # domain, which we don't get in our iBFT data (see LP: #1806777)
30- configure_networking
31+ # If ISCSI is set to auto and there is no IBFT device/data,
32+ # then configuring ISCSI "automatically" isn't possible,
33+ # so there is no point in trying to configure networking.
34+ # If the opt-in cmdline option iscsi_auto_skip_initramfs_networking is set,
35+ # then we skip the unnecessary call to configure_networking.
36+ if [ -n "$ISCSI_AUTO_SKIP_INITRAMFS_NETWORKING" ] && [ -n "$ISCSI_AUTO" ] && ! [ -e /sys/firmware/ibft ]; then
37+ echo "No iBFT data found and cmdline option iscsi_auto_skip_initramfs_networking is set. Skipping unnecessary attempt to configure networking."
38+ else
39+ # run configure_networking even if we have iscsi_auto, because there
40+ # could be other network interfaces that need to be configured
41+ # also, if we set up DHCP iBFT, we need ipconfig to run so it creates
42+ # a proper /run/net-${DEVICE}.conf file that includes the DNS search
43+ # domain, which we don't get in our iBFT data (see LP: #1806777)
44+ configure_networking
45+ fi
46
47 if [ -n "$IBFT_DHCP_DEVICE" ]; then
48 if ! [ -e "/run/net-${DEVICE}.conf" ] ; then
49@@ -316,6 +325,9 @@ parse_iscsi_ops ()
50 root=iscsi:*)
51 parse_root_param "${x##root=iscsi:}" ""
52 ;;
53+ iscsi_auto_skip_initramfs_networking)
54+ ISCSI_AUTO_SKIP_INITRAMFS_NETWORKING=true
55+ ;;
56 esac
57 done
58 }

Subscribers

People subscribed via source and target branches