I created a workaround for this issue while its being worked on:

http://pastebin.ubuntu.com/25519820/

Create a file: /lib/systemd/system-shutdown/debug.sh and place the
contents in it.

This workaround (based on some ideas from sil2100 and slangasek for
iscsi / umount) is basically bringing the interfaces up and remounting /
so it can finally cleanup everything.

Things to note:

- It ONLY RUNS if there are iscsi leftovers
- It uses ifupdown only for networking (/etc/network/interfaces)
- It has to remount / to do networking and to run iscsid
- If it fails to bring network it will hang like before (kernel issue)
- It waits for iscsi to be logged in again (might take awhile to shutdown)
- If logout fails, it hangs again (unless the network is left configured, i 
could change it)

What is this script different then altering open-iscsi.service ?

It runs at the very end of systemd shutdown and it is very unlikely that
there are any services holding references to iscsi mounts, disallowing
them to be logged out.

Now I'll test Debian SID and check if this is found there, to open a bug in 
Debian project as well.
Before moving on into open-iscsi services - to create a cleanup unit file for 
the open-iscsi package, like this workaround - i'll dig into the kernel issue. 
I'm afraid no fix will be as good as making sure kernel let the queued I/O cmd 
go. I have also to make sure this workaround is changed to allow root iscsi to 
be logged out.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1569925

Title:
  Shutdown hang on 16.04 with iscsi targets

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1569925/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to