Comment 1 for bug 1713537

Revision history for this message
Scott Moser (smoser) wrote :

When I first saw this, I assumed that it was a result of ifupdown being
dropped from the image (bug 1698181). However, it seems (as of the
20170826 cloud image) that that has not yet happened.

Additionally, I've not been able to reproduce this with the dep8 tests
that are in open-iscsi. And those tests *do* a boot and shutdown
on a iscsi target root.

In an effort to describe what happened previously in zesty and how that
might have gone wrong, I wrote the info below.

In iscsi root environment, the initrams brings up the network connection,
and then connects to the iscsi target. It has to communicate with the target
root in order to acheive the following things:

  a. make the network device not be bounced on the re-played coldplug after
     pivot.
  b. do not take the network device *down* on shutdown.
  c. update DNS information from the result of a dhcp or other network
     configuration.

Artful dropped ifupdown, so the methods which were present in xenial-zesty
to accomplish those things have broken.
I suspect it is possible that 'a' and 'b' can be accomplished by somehow
informing systemd that the root mount was a '_netdev' (mount -O _netdev).
An untested patch for this might look like:
  http://paste.ubuntu.com/25418884/

Its possible that resolvconf integration will still work.

iscsi root works in xenial -> zesty like this:
 * in its local-top [1] initramfs hooks, open-iscsi writes the interface
   that the root device lives on to /run/initramfs/open-iscsi.interface.
 * on interface add (coldplug) or remove (shutdown)
   udev rules /lib/udev/rules.d/70-iscsi-network-interface.rules [2]
   call /lib/open-iscsi/net-interface-handler [3].
 * net-interface-handler is then responsible for basically mocking the
   interface up and interface down for the root network device. This
   includes all of 'a', 'b', and 'c'.
   For dns configuration, see the lines around 'command -v resolvconf' at [3].

[1] https://git.launchpad.net/~usd-import-team/ubuntu/+source/open-iscsi/tree/debian/extra/initramfs.local-top?h=applied/ubuntu/zesty
[2] https://git.launchpad.net/~usd-import-team/ubuntu/+source/open-iscsi/tree/debian/iscsi-network-interface.rules?h=applied/ubuntu/zesty
[3] https://git.launchpad.net/~usd-import-team/ubuntu/+source/open-iscsi/tree/debian/net-interface-handler?h=applied/ubuntu/zesty