Bug 1201733 - Add After=iscsi-shutdown.service to blk-availability.service for proper shutdown before iscsi sessions are logged out
Summary: Add After=iscsi-shutdown.service to blk-availability.service for proper shutd...
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2
Version: 7.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Peter Rajnoha
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-13 11:32 UTC by Peter Rajnoha
Modified: 2015-11-19 12:46 UTC (History)
10 users (show)

(edit)
Before, the blk-availability.service was not ordered with respect to iSCSI services properly. The blk-availability service is responsible for handling shutdown of dm-based block devices (including LVM and multipath devices) and such improper ordering could have caused the iSCSI devices to be detached on system shutdown sequence before dm-based devices were deactivated, ending up with possible IO errors then.

The blk-availability.service systemd unit is now properly ordered so that it's always executed before iscsi-shutdown.service responsible for detaching iSCSI devices.
Clone Of:
(edit)
Last Closed: 2015-11-19 12:46:16 UTC


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2147 normal SHIPPED_LIVE lvm2 bug fix and enhancement update 2015-11-19 11:11:07 UTC

Description Peter Rajnoha 2015-03-13 11:32:19 UTC
RHEL uses a separate iscsi-shutdown.service for iscsi session logout in contrast to upstream's iscsi.service. Add After=iscsi-shutdown.service to blk-availability.service that is responsible for deactivating dm-based devices. This should be done before any iscsi devices underneath are logged out.

(I expect the iscsi-shutdown will eventually get upstream as well.)

The patch is here:

https://git.fedorahosted.org/cgit/lvm2.git/commit/?id=05f23e77634b2ed3d7861511c07ed73a3bb6d096

Comment 1 Peter Rajnoha 2015-03-13 14:01:05 UTC
See also related bug #1201030.

Comment 3 Corey Marthaler 2015-10-19 17:11:55 UTC
Marking verified (SanityOnly) based on results listed in bug 1201030.


3.10.0-325.el7.x86_64
lvm2-2.02.130-5.el7    BUILT: Wed Oct 14 08:27:29 CDT 2015
lvm2-libs-2.02.130-5.el7    BUILT: Wed Oct 14 08:27:29 CDT 2015
lvm2-cluster-2.02.130-5.el7    BUILT: Wed Oct 14 08:27:29 CDT 2015
device-mapper-1.02.107-5.el7    BUILT: Wed Oct 14 08:27:29 CDT 2015
device-mapper-libs-1.02.107-5.el7    BUILT: Wed Oct 14 08:27:29 CDT 2015
device-mapper-event-1.02.107-5.el7    BUILT: Wed Oct 14 08:27:29 CDT 2015
device-mapper-event-libs-1.02.107-5.el7    BUILT: Wed Oct 14 08:27:29 CDT 2015
device-mapper-persistent-data-0.5.5-1.el7    BUILT: Thu Aug 13 09:58:10 CDT 2015
cmirror-2.02.130-5.el7    BUILT: Wed Oct 14 08:27:29 CDT 2015
sanlock-3.2.4-1.el7    BUILT: Fri Jun 19 12:48:49 CDT 2015
sanlock-lib-3.2.4-1.el7    BUILT: Fri Jun 19 12:48:49 CDT 2015
lvm2-lockd-2.02.130-5.el7    BUILT: Wed Oct 14 08:27:29 CDT 2015



[root@host-082 ~]# systemctl enable blk-availability.service
Created symlink from /etc/systemd/system/sysinit.target.wants/blk-availability.service to /usr/lib/systemd/system/blk-availability.service.
[root@host-082 ~]# systemctl status blk-availability.service
â blk-availability.service - Availability of block devices
   Loaded: loaded (/usr/lib/systemd/system/blk-availability.service; enabled; vendor preset: disabled)
   Active: active (exited) since Mon 2015-10-19 16:08:57 CDT; 4h 7min left
 Main PID: 1108 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/blk-availability.service

Oct 19 16:08:57 host-082.virt.lab.msp.redhat.com systemd[1]: Starting Availability of block devices...
Oct 19 16:08:57 host-082.virt.lab.msp.redhat.com systemd[1]: Started Availability of block devices.

[root@host-082 ~]# systemctl stop blk-availability.service
[root@host-082 ~]# systemctl status blk-availability.service
â blk-availability.service - Availability of block devices
   Loaded: loaded (/usr/lib/systemd/system/blk-availability.service; enabled; vendor preset: disabled)
   Active: inactive (dead) since Mon 2015-10-19 12:09:46 CDT; 6s ago
  Process: 2913 ExecStop=/usr/sbin/blkdeactivate -u -l wholevg (code=exited, status=0/SUCCESS)
 Main PID: 1108 (code=exited, status=0/SUCCESS)

Oct 19 16:08:57 host-082.virt.lab.msp.redhat.com systemd[1]: Starting Availability of block devices...
Oct 19 16:08:57 host-082.virt.lab.msp.redhat.com systemd[1]: Started Availability of block devices.
Oct 19 12:03:48 host-082.virt.lab.msp.redhat.com systemd[1]: Started Availability of block devices.
Oct 19 12:09:46 host-082.virt.lab.msp.redhat.com systemd[1]: Stopping Availability of block devices...
Oct 19 12:09:46 host-082.virt.lab.msp.redhat.com blkdeactivate[2913]: Deactivating block devices:
Oct 19 12:09:46 host-082.virt.lab.msp.redhat.com blkdeactivate[2913]: [SKIP]: unmount of rhel_host--082-swap (dm-1) mounted on [SWAP]
Oct 19 12:09:46 host-082.virt.lab.msp.redhat.com blkdeactivate[2913]: [SKIP]: unmount of rhel_host--082-root (dm-0) mounted on /
Oct 19 12:09:46 host-082.virt.lab.msp.redhat.com blkdeactivate[2913]: [LVM]: deactivating Volume Group cache_sanity... done
Oct 19 12:09:46 host-082.virt.lab.msp.redhat.com systemd[1]: Stopped Availability of block devices.

Comment 4 errata-xmlrpc 2015-11-19 12:46:16 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://rhn.redhat.com/errata/RHBA-2015-2147.html


Note You need to log in before you can comment on or make changes to this bug.