Bug 1204336

Summary: systemd creates swaps pri value wrongly ( -1 ) thus it cause to swap disabled
Product: [Fedora] Fedora Reporter: Ömer Fadıl Usta <omerusta>
Component: anacondaAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: rawhideCC: anaconda-maint-list, g.kaviyarasu, jfrieben, jonathan, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-23 13:22:28 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 Ömer Fadıl Usta 2015-03-21 04:06:59 UTC
anaconda or systemd creates swap values in /etc/fstab with a wrong pri value.

in /etc/fstab it shows as uuid=.... swap swap pri=1 0 0
on the other hand after system reboots systemd's fstab-generator gives
error and not enables swap. ( So if you didn't edit your /etc/fstab
and change value to uuid=... swap swap defaults 0 0  you will have
a DISABLED swap )

Why fstab-generator couldn't handle swap ? Because it is not programmed for
getting a negative value as pri parameter. Thus in logs it says :

systemd-fstab-generator[16571]: Failed to parse priority: Numerical result out of range

PS: I'm not sure systemd or anaconda or basesystem have wrong pri=-1 entry
thus i entered bug as anaconda bug, please reassign it to correct package.
Thanks

Comment 1 Ömer Fadıl Usta 2015-03-21 04:49:10 UTC
systemd's fstab generator is checking if pri exist or it is between 0 - 32767 
so if we delete pri=-1 part from /etc/fstab it will be not a problem for 
fstab-generator ( pri is optional )

Comment 2 Ömer Fadıl Usta 2015-03-21 05:09:11 UTC
Edit : in my bug description i wrote that 
uuid=... swap swap pri=1 0 0
but it was a typo and in /etc/fstab it was
uuid=... swap swap pri=-1 0 0

(this -1 causing problem )

Comment 3 Joachim Frieben 2015-03-21 13:27:33 UTC
This report is a duplicate of bug 1203709.

Comment 4 David Shea 2015-03-23 13:22:28 UTC

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