Bug 1379268

Summary: backport upstream commit 681c8d8 to make sure all swap units are ordered before the swap target
Product: Red Hat Enterprise Linux 7 Reporter: Ryan Sawhill <rsawhill>
Component: systemdAssignee: systemd-maint
Status: CLOSED DUPLICATE QA Contact: qe-baseos-daemons
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3CC: bblaskov, caslivkoff, jsynacek, loberman, systemd-maint-list, thierry.laurion, vagrawal
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-13 07:44:14 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: 1383699    

Description Ryan Sawhill 2016-09-26 09:03:51 UTC
DESCRIPTION OF PROBLEM:

  See: https://github.com/systemd/systemd/commit/681c8d81bdc946360d13185632d1920ffaeb5ad9
  systemd stops swap too early in the shutdown process.
  Note that the commit and originating PR seem to me to be about dealing with multiple swapdevs, though I'm only using one.
  
VERSION-RELEASE NUMBER OF SELECTED COMPONENT (IF APPLICABLE):

  systemd-219-26.el7.x86_64
  
HOW REPRODUCIBLE:

  100%
  
STEPS TO REPRODUCE:

  1. Make sure a system has swap enabled
  2. To make life easy, enable persistent journaling (mkdir /var/log/journal; systemctl kill -s SIGUSR1 systemd-journald.service)
  3. Open the logs (journalctl -b -1) and search for "Deactiv.*swap"

ACTUAL RESULTS:

  Swap begins deactivating before multi-user.target is stopped.
  Swap appears to be deactivated before many services have stopped.
  
EXPECTED RESULTS:

  Swap should be one of the last things to be deactivated. Let all applications shut down before we page remaining swap back into RAM.
  
ADDITIONAL INFO:

  If I'm understanding this behavior correctly, well ... it seems like a really big deal. Thus, I hope I'm missing something here and if so, my apologies.

Comment 1 Jan Synacek 2016-09-29 09:20:07 UTC
I'll provide testing packages with the patch backported.

Comment 3 Charles Slivkoff 2017-01-12 17:10:41 UTC
(In reply to Jan Synacek from comment #2)
> Testing packages can be found at
> http://file.brq.redhat.com/~jsynacek/systemd/bz1379268/.

This URL does not resolve.

Are these packages publicly accessible?

Comment 4 Jan Synacek 2017-01-13 06:45:44 UTC
Nope, sorry about the confusion. We (systemd maintainers) publicly provide backported patches for testing at https://copr.fedorainfracloud.org/coprs/lnykryn/systemd-rhel-staging. I'm not sure if this patch has already been backported, though.

Comment 5 Jan Synacek 2017-01-13 07:44:14 UTC
This bug has already been pushed to staging in https://bugzilla.redhat.com/show_bug.cgi?id=1298355.

*** This bug has been marked as a duplicate of bug 1298355 ***

Comment 6 thierry.laurion 2017-04-13 15:36:31 UTC
This is not a duplicate of bug 1298355. https://bugzilla.redhat.com/show_bug.cgi?id=1031158#c12

Comment 7 Jan Synacek 2017-04-24 13:30:58 UTC
(In reply to thierry.laurion from comment #6)
> This is not a duplicate of bug 1298355.

Yes it is, the fix for both is the same.

> https://bugzilla.redhat.com/show_bug.cgi?id=1031158#c12

This is not relevant.