Bug 767610

Summary: restorecon runs on every boot
Product: [Fedora] Fedora Reporter: Kjartan Maraas <kmaraas>
Component: ovirt-nodeAssignee: Alan Pevec (Fedora) <apevec>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: apevec, dpierce, dwalsh, jboggs, johannbg, lpoetter, mburns, metherid, mgrepl, mschmidt, notting, plautrba, systemd-maint
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-14 22:52:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Kjartan Maraas 2011-12-14 13:45:30 UTC
Description of problem:

Every time I boot my laptop I see restorecon running the first 15-20 minutes and it chews CPU to the point where my system is close to unusable for that period.

The process runs as a child of systemd with the following command line:
 2545 ?        D      5:22 /sbin/restorecon -e /var/lib/stateless/writable -e /data -e /config -e /proc -e /sys -rv /

A full relabel was run before I checked the last time. I booted a new kernel, full relabel was run during boot. Then I logged in and saw restorecon running after login.

After this I rebooted and this time no relabel during boot, but restorecon is running after I log in.

Version-Release number of selected component (if applicable):


How reproducible:
Every time

Steps to Reproduce:
1.
2. 
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Daniel Walsh 2011-12-14 15:18:27 UTC
Are you sure it is restorecon or restorecond? There is a difference.  restorecond is a user daemon that watches for you creating content in your homedir and fixes the labels.

Comment 2 Kjartan Maraas 2011-12-14 19:21:39 UTC
You can see the command line above in my comment. I don't have policycoreutils-restorecond installed on my system.

Comment 3 Daniel Walsh 2011-12-14 20:44:39 UTC
Kjartan,   Do you have a /.autorelabel file on your machine?

systemd should be blocking waiting for the relabel to finish.  And the relabel is supposed to remove the /.autorelabel when it is done.

/lib/systemd/fedora-autorelabel  is the script that does the relabel.

Comment 4 Kjartan Maraas 2011-12-14 21:00:45 UTC
No the /.autorelabel file is gone. I created one to see if a forced relabel would help, but it didn't.

Comment 5 Daniel Walsh 2011-12-14 21:10:34 UTC
If you are seeing restorecon running in back ground on every boot then something is going very wrong on your system.

I would check the /lib/systemd/fedora-autorelabel and comment out the fixfiles line and see if that stops the problem.

This would tell us that systemd thinks the system wants to relabel after every boot.  

One last thing, you did not add auditrelabel to a grub line on the kernel?  Check /etc/grub.conf

Comment 6 Daniel Walsh 2011-12-14 21:12:36 UTC
cat /proc/cmdline

Comment 7 Michal Schmidt 2011-12-14 21:35:38 UTC
(In reply to comment #0)
>  2545 ?        D      5:22 /sbin/restorecon -e /var/lib/stateless/writable -e
> /data -e /config -e /proc -e /sys -rv /

I don't think that's the commandline that the fedora-autorelabel script uses.
Can you try to find out which systemd service this process belongs to?
To do that you can use:
systemctl status 2545
or
cat /proc/2545/cgroup

(of course the PID will be different every boot, so substitute the right one)

Comment 8 Kjartan Maraas 2011-12-14 22:19:25 UTC
no auditrelabel in grub.conf. I'll check the other suggestions when I reboot next.

Comment 9 Kjartan Maraas 2011-12-14 22:28:25 UTC
[kmaraas@e4300 ~]$ systemctl status 3231
ovirt-firstboot.service - SYSV: ovirt-firstboot node configuration script
	  Loaded: loaded (/etc/rc.d/init.d/ovirt-firstboot)
	  Active: activating (start) since Wed, 14 Dec 2011 23:25:41 +0100; 1min 27s ago
	 Control: 3223 (ovirt-firstboot)
	  CGroup: name=systemd:/system/ovirt-firstboot.service
		  ├ 3223 /bin/bash /etc/rc.d/init.d/ovirt-firstboot start
		  └ 3231 /sbin/restorecon -e /var/lib/stateless/writable -e...
[kmaraas@e4300 ~]$

Comment 10 Bill Nottingham 2011-12-14 22:41:01 UTC
=> ovirt-node.

Comment 11 Bill Nottingham 2011-12-14 22:41:21 UTC
Although, why do you have this enabled? Is it intentional?

Comment 12 Kjartan Maraas 2011-12-14 22:43:33 UTC
No, probably just because I installed the ovirt stuff just to check it out at some point.

Comment 13 Perry Myers 2011-12-14 22:52:47 UTC
This isn't a bug.  This is normal behavior on an oVirt Node Livecd.  ovirt-node package isn't meant to be installed on normal Fedora systems, only on the Livecd based image oVirt Node ISO.

I'll close this as notabug, and the solution should just be to yum remove the ovirt-node package from your system.