Bug 1203709

Summary: [anaconda] swap space disabled after installing Fedora 22 Beta TC2 to an existing file system
Product: [Fedora] Fedora Reporter: Joachim Frieben <jfrieben>
Component: python-blivetAssignee: Vratislav Podzimek <vpodzime>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: amulhern, anaconda-maint-list, bcl, dlehman, g.kaviyarasu, jonathan, omerusta, vanmeeuwen+fedora, vpodzime, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: anaconda-22.20.6-1.fc22 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-19 14:00:08 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:

Description Joachim Frieben 2015-03-19 13:54:27 UTC
Description of problem:
Installing Fedora 22 using the Beta TC2 boot image completes flawlessly. However, when booting into the new system, it turns out that swap space is disabled. The corresponding entry in /etc/fstab created by anaconda reads:

  /dev/mapper/VolGroup00-LogVol03 swap    swap    pri=-1    0 0

Version-Release number of selected component (if applicable):
anaconda-22.20.4-1.fc22

How reproducible:
Always

Steps to Reproduce:
1. Install Fedora 22 from Beta TC2 boot image and restart.
2. Check available swap size.

Actual results:
Swap space is disabled, and thus, the size of the available swap space is 0.

Expected results:
Swap space is enabled.

Additional info:
After replacing option "pri=-1" for the swap volume by "defaults" in /etc/fstab and restarting the system, swap space is enabled as expected.

Comment 2 Fedora Update System 2015-03-19 18:21:29 UTC
anaconda-22.20.6-1.fc22, python-blivet-1.0.5-1.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/python-blivet-1.0.5-1.fc22,anaconda-22.20.6-1.fc22

Comment 3 Zbigniew Jędrzejewski-Szmek 2015-03-21 15:58:55 UTC
systemd-fstab-generator upstream will now only warn about an invalid pri field. There's no need to be so strict about this:

http://cgit.freedesktop.org/systemd/systemd/commit/?id=e0952d9d02

Comment 4 Fedora Update System 2015-03-23 07:10:49 UTC
anaconda-22.20.6-1.fc22, python-blivet-1.0.5-1.fc22, libblockdev-0.7-1.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 5 Vratislav Podzimek 2015-03-23 07:26:19 UTC
(In reply to Zbigniew Jędrzejewski-Szmek from comment #3)
> systemd-fstab-generator upstream will now only warn about an invalid pri
> field. There's no need to be so strict about this:
> 
> http://cgit.freedesktop.org/systemd/systemd/commit/?id=e0952d9d02
Thanks for this, Zbigniew!

Comment 6 David Shea 2015-03-23 13:22:28 UTC
*** Bug 1204336 has been marked as a duplicate of this bug. ***

Comment 7 Ömer Fadıl Usta 2015-03-23 23:27:27 UTC
I'm happy to see that bug fixed in systemd.
On the other hand i'm still not happy to see pri=-1 value in
/etc/fstab If it doesn't define in there it will be -1. It makes 
/etc/fstab look ugly. Instead of pri=-1 isn't it will be much
better "defaults" value in /etc/fstab ?

@David : the commit you mentioned in rhinstaller/blivet/blob/master/blivet/formats/swap.py not merged in master or reverted.

Comment 8 Vratislav Podzimek 2015-03-24 07:42:42 UTC
(In reply to Ömer Fadıl Usta from comment #7)

> @David : the commit you mentioned in
> rhinstaller/blivet/blob/master/blivet/formats/swap.py not merged in master
> or reverted.
The patch from the f22-branch has been ported to master so this should now be resolved. However, until a new blivet build is done for Rawhide, this won't be effective in installations.

Comment 9 Joachim Frieben 2015-03-24 12:02:31 UTC
(In reply to Ömer Fadıl Usta from comment #7)
The /etc/fstab file is set up correctly when using Fedora 22 Beta TC4 images.

Comment 10 Ömer Fadıl Usta 2015-03-24 13:28:22 UTC
( I'm using rawhide thats the why i asked for merging to master not only for f22 branch )