Bug 746589

Summary: swap is not activated by default
Product: [openSUSE] openSUSE 12.1 Reporter: Michal Svec <msvec>
Component: BasesystemAssignee: Frederic Crozat <fcrozat>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P3 - Medium CC: fcrozat, msvec
Version: Final   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: /etc/fstab
/var/log/messages
dmesg
systemctl show dev-md0.swap

Description Michal Svec 2012-02-11 17:25:35 UTC
After upgrade to 12.1 swap is not being activated by default after reboot,
one has to issue 'swapon -ae' by hand to make it work. The system is now
using systemd.
Comment 1 Petr Uzel 2012-02-12 13:41:45 UTC
Please post your /etc/fstab and /var/log/messages after reboot. Thx
Comment 2 Michal Svec 2012-02-12 16:30:00 UTC
Created attachment 475756 [details]
/etc/fstab
Comment 3 Michal Svec 2012-02-12 16:34:52 UTC
Created attachment 475757 [details]
/var/log/messages
Comment 4 Petr Uzel 2012-02-13 09:39:31 UTC
Thanks for the logs. Could you please try with Frederic's latest systemd package:
https://bugzilla.novell.com/show_bug.cgi?id=731230#c11 ?
Comment 5 Petr Uzel 2012-03-05 09:48:56 UTC
New systemd maintenance update has been released. Could you please recheck? Thanks
Comment 6 Michal Svec 2012-03-13 21:45:04 UTC
The behavior is still the same (all latest updates installed):

bash# free
             total       used       free     shared    buffers     cached
Mem:       1019532     949184      70348          0       5884     179332
-/+ buffers/cache:     763968     255564
Swap:            0          0          0
bash# grep -i swap /etc/fstab 
/dev/md0             swap                 swap       defaults         0 0
bash# grep -i swap /var/log/messages
bash# grep -i swap /var/log/boot.*
bash# rpm -q systemd
systemd-37-3.8.1.x86_64
Comment 7 Petr Uzel 2012-03-14 10:26:06 UTC
OK, thanks for testing. I'll try to reproduce myself and see what I can do.
Comment 9 Frederic Crozat 2012-03-15 13:24:50 UTC
hmm, /var/log/messages isn't really useful. Better to reboot with "systemd.log_level=debug systemd.log_target=kmsg" and attach dmesg output.
Comment 10 Michal Svec 2012-03-15 13:27:47 UTC
Created attachment 481606 [details]
dmesg
Comment 11 Petr Uzel 2012-03-15 13:30:35 UTC
Frederic: missing dependency between swapon and MD assembly?
Comment 12 Frederic Crozat 2012-03-15 13:54:55 UTC
from the logs, swapon is started when /dev/md0 become available through udev but probably not before md.service (ie boot.md) is done..

Michal, could you attach output of "systemctl show dev-md0.swap" ?

I'm not sure if I can easily dependency on md.service on the fly (I'd prefer to avoid it if no swap is on md).
Comment 13 Michal Svec 2012-03-15 13:59:06 UTC
bash# systemctl status dev-md0.swap
dev-md0.swap - /dev/md0
  Loaded: loaded
  Active: failed since Thu, 15 Mar 2012 14:23:20 +0100; 46s ago
    What: /dev/md0
 Process: 664 ExecActivate=/sbin/swapon -p 0 /dev/md0 (code=exited, status=255)
  CGroup: name=systemd:/system/dev-md0.swap
Comment 14 Frederic Crozat 2012-03-15 14:02:43 UTC
careful : systemctl show dev-md0.swap (not status) ;)
Comment 15 Michal Svec 2012-03-20 10:01:43 UTC
Created attachment 482128 [details]
systemctl show dev-md0.swap
Comment 16 Michal Svec 2012-06-25 12:07:22 UTC
This seems to have been fixed meanwhile, probably with one of the
recent updates, not sure exactly when that happened.
Comment 17 Michal Svec 2012-06-25 12:07:44 UTC
.
Comment 18 Frederic Crozat 2012-06-25 12:18:00 UTC
just for the record, on 12.1 or on Factory ? I didn't fix anything on 12.1 regarding this (it was still on my TODO list) but on Factory, maybe needed kernel events are set now.
Comment 19 Michal Svec 2012-06-26 07:15:12 UTC
12.1. There have been like two (or more) systemd package updates lately
and I assume one of them fixed that.
Comment 20 Frederic Crozat 2012-06-26 07:25:55 UTC
ok, thanks :)