net-interface-handler operates on all adds and removes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
open-iscsi (Ubuntu) |
Fix Released
|
Low
|
Unassigned | ||
Xenial |
Fix Released
|
High
|
Unassigned | ||
Bionic |
Fix Released
|
Low
|
Unassigned | ||
Cosmic |
Fix Released
|
Low
|
Unassigned |
Bug Description
=== Begin SRU Template ===
[Impact]
Incorrect handling of udev events by open-iscsi's net-interface-
results in nameserver and dns search entries being removed from
/etc/resolv.conf and thus potentially breaking dns on a system.
This problem is limited to iscsi-root systems, but is easily tripped
by common use of linux networking. This was first discovered on
Oracle Public Cloud, which utilizes iscsi-root for its systems.
[Test Case]
dep8 tests have been backported from cosmic with a functional reproducer.
When run without the tests will fail. So passing of dep8 actually indicates
that the fix is working.
As a manual test case:
1. Start a system with iscsi root. One such easily obtained environment is Oracle Public Cloud.
2. Collect resolvconf and ifupdown state
name="before"
mkdir $name
cp -r /run/resolvconf $name/run-
cp /etc/resolv.conf $name/etc-
cp -r /run/network $name/run-network
3. Create a tun/tap device
sudo ip tuntap add mode tap user root mytap0
4. Remove the tun/tap device.
sudo ip tuntap del mode tap mytap0
5. Collect resolvconf and ifupdown state and compare against '2'. The creation and removal of a tuntap device should not have affected resolvconf or ifupdown state. The 'diff' at the end should not show any differences.
name="after"
mkdir $name
cp -r /run/resolvconf $name/run-
cp /etc/resolv.conf $name/etc-
cp -r /run/network $name/run-network
diff -Naur before/ after/
[Regression Potential]
The codepath executed was and is entirely limited to systems with iscsi-root.
So regressions should also be limited as such. The most likely regression
would seem to be the failure to add or remove entries to resolvconf for the
iscsi-root interface. Before this was happening to often. A bad fix could
result in it happening not enough.
[Other Info]
net-interface-
new network interfaces and 'resolvconf -d' on removal of all network
interfaces.
The problem with that is that an add and remove of any new interface
will have the result of effectively marking the iscsi-root interface down.
That includes removing the resolvconf entries for that interface.
This add/remove can happen for any number of reasons. Two such examples:
a.) docker container create/delete
- sudo apt-get install -qy docker.io
- sudo docker run --rm busybox date
b.) add/remove of a tuntap device.
- sudo ip tuntap add mode tap user root mytap0
- sudo ip tuntap del mode tap mytap0
=== End SRU Template ===
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: open-iscsi 2.0.873+
ProcVersionSign
Uname: Linux 4.4.0-130-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.18
Architecture: amd64
Date: Thu Aug 2 17:18:06 2018
ProcEnviron:
TERM=xterm-
PATH=(custom, no user)
XDG_RUNTIME_
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: open-iscsi
UpgradeStatus: No upgrade log present (probably fresh install)
modified.
Related branches
- git-ubuntu developers: Pending requested
-
Diff: 273 lines (+99/-19)7 files modifieddebian/changelog (+8/-0)
debian/net-interface-handler (+18/-4)
debian/tests/README-boot-test.md (+10/-5)
debian/tests/patch-image (+44/-5)
debian/tests/test-open-iscsi.py (+15/-1)
debian/tests/tgt-boot-test (+2/-2)
debian/tests/xkvm (+2/-2)
- Francis Ginther: Pending requested
- git-ubuntu developers: Pending requested
-
Diff: 2137 lines (+1518/-298)9 files modifieddebian/changelog (+8/-0)
debian/net-interface-handler (+18/-4)
debian/tests/README-boot-test.md (+139/-0)
debian/tests/control (+6/-2)
debian/tests/get-image (+123/-31)
debian/tests/patch-image (+288/-0)
debian/tests/test-open-iscsi.py (+191/-75)
debian/tests/tgt-boot-test (+494/-159)
debian/tests/xkvm (+251/-27)
- Christian Ehrhardt (community): Approve
-
Diff: 168 lines (+53/-13)6 files modifieddebian/changelog (+10/-0)
debian/net-interface-handler (+18/-4)
debian/tests/README-boot-test.md (+7/-5)
debian/tests/test-open-iscsi.py (+15/-1)
debian/tests/tgt-boot-test (+1/-1)
debian/tests/xkvm (+2/-2)
description: | updated |
Changed in open-iscsi (Ubuntu Cosmic): | |
importance: | Medium → Low |
Changed in open-iscsi (Ubuntu Bionic): | |
importance: | Undecided → Low |
status: | New → Confirmed |
Changed in open-iscsi (Ubuntu Xenial): | |
status: | New → Confirmed |
importance: | Undecided → High |
tags: | added: id-5b76d0fbc67b5470c265f714 |
tags: | added: id-5b76d0fbc67b5470c265f714 |
I've uploaded a fix to cosmic.
If that passes dep8 tests there I will plan to upload the fix to xenial-proposed as shown in the MP attached.