Bug 1446171

Summary: System fails to shutdown with /usr on iSCSI
Product: Red Hat Enterprise Linux 7 Reporter: David Kaspar // Dee'Kej <deekej>
Component: systemdAssignee: systemd-maint
Status: CLOSED ERRATA QA Contact: Frantisek Sumsal <fsumsal>
Severity: medium Docs Contact: Filip Hanzelka <fhanzelk>
Priority: high    
Version: 7.3CC: deekej, dracut-maint-list, fsumsal, jstodola, lnykryn, mbanas, msekleta, qe-baseos-daemons, systemd-maint-list
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: systemd-219-39.el7 Doc Type: Release Note
Doc Text:
The system no longer fails to terminate with `/usr` on *iSCSI* or *NFS* In previous versions of Red Hat Enterprise Linux 7, the termination of the system sometimes failed and the system remained hung if the `/usr` folder was mounted over a network (e.g. *NFS* or *iSCSI*). This issue has been resolved, and the system should now shut down normally.
Story Points: ---
Clone Of: 1369790 Environment:
Last Closed: 2017-08-01 09:14:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1369790    

Description David Kaspar // Dee'Kej 2017-04-27 11:36:26 UTC
+++ This bug was initially created as a clone of Bug #1369790 +++

Description of problem:
There are errors when shutting down a system with /usr on iSCSI (/boot, / and swap are on a local disk):

[root@localhost ~]# lsblk 
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0    8G  0 disk 
└─sda1   8:1    0    8G  0 part /usr
vda    253:0    0    8G  0 disk 
├─vda1 253:1    0  500M  0 part /boot
├─vda2 253:2    0  4.9G  0 part /
└─vda3 253:3    0  2.6G  0 part [SWAP]
[root@localhost ~]# reboot
[  OK  ] Started Show Plymouth Reboot Screen.
[  OK  ] Stopped Permit User Sessions.
[  OK  ] Stopped Dynamic System Tuning Daemon.
[  OK  ] Stopped Postfix Mail Transport Agent.
[  OK  ] Stopped LSB: Starts the Spacewalk Daemon.
[  OK  ] Stopped target Network is Online.
[  OK  ] Stopped target Remote File Systems.
[  OK  ] Stopped target Remote File Systems (Pre).
[  OK  ] Stopped Login and scanning of iSCSI devices.
         Stopping Login and scanning of iSCSI devices...
         Stopping Logout off all iSCSI sessions on shutdown...
[  OK  ] Stopped Logout off all iSCSI sessions on shutdown.
         Stopping Open-iSCSI...
[  OK  ] Stopped Open-iSCSI.
[  OK  ] Stopped target Network.
         Stopping LSB: Bring up/down networking...
[  OK  ] Started Restore /run/initramfs.
[     *] A stop job is running for LSB: Bring up/down networking (10s / 5min)[  560.001501]  connection1:0: ping timeout of 5 secs expired, recv timeout 5, last rx 4295218066, last ping 4295223072, now 4295228080
[  560.003572]  connection1:0: detected conn error (1022)
[   ***] A stop job is running for LSB: Bring up/down networking (51s / 5min)

The system will not shutdown, see attached console.log


Version-Release number of selected component (if applicable):
RHEL-7.2 GA
RHEL-7.3 Beta (anaconda-21.48.22.82-1.el7, systemd-219-26.el7, dracut-033-453.el7)

How reproducible:
always

Steps to Reproduce:
1. Install a system with /usr on iSCSI and /boot, / and swap stored on a local disk
2. try to reboot the installed system

Actual results:
error messages, connection timeout, system doesn't reboot

Expected results:
system reboots without errors, all file systems are unmounted cleanly

-----------------------------------------------------------------------------

This bug blocks initscripts BZ #1369790. We are using this code to test if the  root or /usr is located on network block device:

> systemctl show --property=RequiredBy -- -.mount usr.mount | grep -q 'remote-fs.target'
(https://github.com/fedora-sysv/initscripts/blob/master/rc.d/init.d/network#L165)

It is expected that the output of command above will contain 'remote-fs.target'. However, currently for /usr located on network block device it shows this:
> RequiredBy=initrd-root-fs.target

(This issue has been more discussed on github here:
https://github.com/fedora-sysv/initscripts/pull/94)

Comment 1 Lukáš Nykrýn 2017-04-28 12:47:34 UTC
Dracut only mounts /usr by itself when there is no systemd present. Otherwise this is don in fstab generator.

Comment 2 Lukáš Nykrýn 2017-04-28 13:32:29 UTC
https://github.com/lnykryn/systemd-rhel/pull/115

Comment 3 Frantisek Sumsal 2017-05-02 10:02:01 UTC
qa_ack+ for RHEL 7.4

Comment 4 Lukáš Nykrýn 2017-05-02 10:31:49 UTC
fix merged to upstream staging branch ->
https://github.com/lnykryn/systemd-rhel/commit/38815fb30199a76684d4153a0a2dcd6abd3a2dda
-> post

Comment 7 errata-xmlrpc 2017-08-01 09:14:52 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2297