Merge ~ddstreet/ubuntu/+source/open-iscsi:lp1806777 into ubuntu/+source/open-iscsi:ubuntu/devel

Proposed by Dan Streetman
Status: Merged
Merged at revision: a64d0722431a76a6acb59da0b16750a545323fc3
Proposed branch: ~ddstreet/ubuntu/+source/open-iscsi:lp1806777
Merge into: ubuntu/+source/open-iscsi:ubuntu/devel
Diff against target: 69 lines (+32/-2)
2 files modified
debian/changelog (+9/-0)
debian/extra/initramfs.local-top (+23/-2)
Reviewer Review Type Date Requested Status
Scott Moser (community) Approve
Review via email: mp+360146@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Scott Moser (smoser) :
Revision history for this message
Scott Moser (smoser) wrote :

Looks good, thanks!

review: Approve

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 d20f76d..c0a9c53 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,12 @@
6+open-iscsi (2.0.874-5ubuntu12) disco; urgency=medium
7+
8+ [Scott Moser]
9+ * debian/extra/initramfs.local-top: handle iSCSI iBFT DHCP to correctly
10+ run ipconfig to gather all DHCP config info, including DNS search
11+ domain, which iBFT can't provide. (LP: #1806777)
12+
13+ -- Dan Streetman <ddstreet@canonical.com> Wed, 05 Dec 2018 11:28:12 -0500
14+
15 open-iscsi (2.0.874-5ubuntu11) disco; urgency=medium
16
17 * debian/tests/test-open-iscsi.py: Fix called process error.
18diff --git a/debian/extra/initramfs.local-top b/debian/extra/initramfs.local-top
19index 93fea1d..9f3af32 100755
20--- a/debian/extra/initramfs.local-top
21+++ b/debian/extra/initramfs.local-top
22@@ -93,6 +93,7 @@ do_iscsi_login ()
23 . /scripts/functions
24
25 udevadm settle
26+ IBFT_DHCP_DEVICE=""
27
28 if [ -n "$ISCSI_AUTO" ] ; then
29 # try to auto-configure network interface based
30@@ -136,7 +137,13 @@ do_iscsi_login ()
31 echo "UPTIME='${UPTIME}'"
32 echo "DHCPLEASETIME='${DHCPLEASETIME}'"
33 echo "DOMAINSEARCH=''"
34- } > "/run/net-${DEVICE}.conf"
35+ } > "/run/net-${DEVICE}.conf.ibft"
36+ if [ "$PROTO" != "dhcp" -a "$DHCPLEASETIME" = "0" ]; then
37+ # this is static ibft configuration.
38+ mv "/run/net-${DEVICE}.conf.ibft" "/run/net-${DEVICE}.conf"
39+ else
40+ IBFT_DHCP_DEVICE="$DEVICE"
41+ fi
42 echo "${DEVICE}" > /run/initramfs/open-iscsi.interface
43 # iscsistart -N doesn't set the default gateway. Therefore,
44 # we need to add it ourselves. However, the ip command is
45@@ -172,9 +179,23 @@ do_iscsi_login ()
46
47 # run configure_networking even if we have iscsi_auto, because there
48 # could be other network interfaces that need to be configured
49- # manually
50+ # also, if we set up DHCP iBFT, we need ipconfig to run so it creates
51+ # a proper /run/net-${DEVICE}.conf file that includes the DNS search
52+ # domain, which we don't get in our iBFT data (see LP: #1806777)
53 configure_networking
54
55+ if [ -n "$IBFT_DHCP_DEVICE" ]; then
56+ if ! [ -e "/run/net-${DEVICE}.conf" ] ; then
57+ echo "WARN: ipconfig dhcp failed, using iSCSI iBFT config - DNS search domain may be missing at runtime" >&2
58+ # We have DHCP iBFT, but ipconfig DHCP failed;
59+ # so we should fallback to just using the iBFT config,
60+ # though that will not include the DNS search domain
61+ mv "/run/net-${DEVICE}.conf.ibft" "/run/net-${DEVICE}.conf"
62+ # need to re-run configure_networking to process conf file
63+ configure_networking
64+ fi
65+ fi
66+
67 # Save network device we configured via configure_networking, but only
68 # if we didn't already get one from autoconfiguration (then we always
69 # prefer that).

Subscribers

People subscribed via source and target branches