PDA

View Full Version : F18: systemd-analyze



sea
10th October 2012, 01:19 AM
Heyas

Just wondering if anyone else has issues to analyze systemd?

When i run my beloved script: blame (http://sea.hostingsociety.com/?p=Scripts&stc=blame)
I get his output:


[simon@localhost ~]$ blame
Year / Month / Day : 2012 10 10
ERROR:dbus.proxies:Introspect error on :1.3:/org/freedesktop/systemd1: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.AccessDenied: SELinux policy denies access.
Traceback (most recent call last):
File "/bin/systemd-analyze", line 309, in <module>
verb.get(args[0], unknown_verb)()
File "/bin/systemd-analyze", line 108, in blame
data = acquire_time_data()
File "/bin/systemd-analyze", line 12, in acquire_time_data
units = manager.ListUnits()
File "/usr/lib/python2.7/site-packages/dbus/proxies.py", line 70, in __call__
return self._proxy_method(*args, **keywords)
File "/usr/lib/python2.7/site-packages/dbus/proxies.py", line 145, in __call__
**keywords)
File "/usr/lib/python2.7/site-packages/dbus/connection.py", line 651, in call_blocking
message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.AccessDenied: SELinux policy denies access.
0 services: Total = 0 seconds
ERROR:dbus.proxies:Introspect error on :1.3:/org/freedesktop/systemd1: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.AccessDenied: SELinux policy denies access.
Traceback (most recent call last):
File "/bin/systemd-analyze", line 309, in <module>
verb.get(args[0], unknown_verb)()
File "/bin/systemd-analyze", line 91, in time
initrd_time, start_time, finish_time = acquire_start_time()
File "/bin/systemd-analyze", line 34, in acquire_start_time
initrd_time = int(properties.Get('org.freedesktop.systemd1.Manag er', 'InitRDTimestampMonotonic'))
File "/usr/lib/python2.7/site-packages/dbus/proxies.py", line 70, in __call__
return self._proxy_method(*args, **keywords)
File "/usr/lib/python2.7/site-packages/dbus/proxies.py", line 145, in __call__
**keywords)
File "/usr/lib/python2.7/site-packages/dbus/connection.py", line 651, in call_blocking
message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.AccessDenied: SELinux policy denies access.


Because of the last line, I tried to reset SE settings with:

restorecon -rp /
But that didnt help:(

Any ideas?

DBelton
10th October 2012, 06:10 AM
I got the same thing here running systemd analyze..



[root@localhost sysconfig]# systemd-analyze
ERROR:dbus.proxies:Introspect error on :1.2:/org/freedesktop/systemd1: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.AccessDenied: SELinux policy denies access.
Traceback (most recent call last):
File "/bin/systemd-analyze", line 307, in <module>
time()
File "/bin/systemd-analyze", line 91, in time
initrd_time, start_time, finish_time = acquire_start_time()
File "/bin/systemd-analyze", line 34, in acquire_start_time
initrd_time = int(properties.Get('org.freedesktop.systemd1.Manag er', 'InitRDTimestampMonotonic'))
File "/usr/lib/python2.7/site-packages/dbus/proxies.py", line 70, in __call__
return self._proxy_method(*args, **keywords)
File "/usr/lib/python2.7/site-packages/dbus/proxies.py", line 145, in __call__
**keywords)
File "/usr/lib/python2.7/site-packages/dbus/connection.py", line 651, in call_blocking
message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.AccessDenied: SELinux policy denies access.


I got it to run by setting selinux to permissive temporarily



[root@localhost sysconfig]# setenforce 0
[root@localhost sysconfig]# systemd-analyze
Startup finished in 1009ms (kernel) + 2506ms (initramfs) + 9957ms (userspace) = 13474ms
[root@localhost sysconfig]# setenforce 1

AdamW
10th October 2012, 06:48 AM
This is probably the bit of https://bugzilla.redhat.com/show_bug.cgi?id=859614 that wasn't fixed by selinux-policy -32. It should be fixed by -33, according to Dan.

sea
10th October 2012, 01:49 PM
Weird, Bugzilla created a new bug for my issue: https://bugzilla.redhat.com/show_bug.cgi?id=864720
Shall i post a link in the report you posted Adam?

I ask this since i get the results (error) even after updating it yesterday.
Edit:
@ DBelton, thank you for the work around.

AdamW
10th October 2012, 06:47 PM
sea: check the version of selinux-policy first. i'm not sure if -33 a) actually exists yet and b) has been submitted as an update.

DBelton
10th October 2012, 11:52 PM
Adam. Currently, 32 is the latest version in updates-testing. Over in koji, it's up to 35.

sea
11th October 2012, 02:52 AM
Where can i find this information? :confused:
There is no selinux command, man selinux doesnt show a release version, and i cant get a release information about the selinuxexecccon, and yum info selinux returns nothing as well.

nonamedotc
11th October 2012, 02:44 PM
Sea, do this


yum list installed selinux-policy
Loaded plugins: langpacks, presto, refresh-packagekit, remove-with-leaves
Installed Packages
selinux-policy.noarch 3.10.0-149.fc17 @updates

sea
11th October 2012, 04:13 PM
selinux: 3.11.1-32.fc18

DBelton
11th October 2012, 04:44 PM
Well, you have the latest that is in the repos.

If you want to get a later selinux policy, you would have to get it from koji until they push another update to the repo.

They are now up to -36 in koji. I wonder if there is some reason they haven't pushed a SELinux update to the repo in awhile since there have been numerous changes to the policy to fix a few things.

sea
11th October 2012, 06:42 PM
OK, i know how to build a package on koji, but how do i install something from it?
Or shall i just download the built package from koji and do a 'local' install?

EDIT:
Or i wait for the update, its just the testing and scripting machine. ;)

nonamedotc
11th October 2012, 06:49 PM
If you want, you can just download the rpm and install it using yum. If there are dependencies, you might have to download them as well. I do not think selinux-policy has too many dependencies though.

DBelton
11th October 2012, 06:50 PM
If the package is built in koji, you can download it and install it with yum :) You would have to make sure to grab dependencies as well, or yum will tell you about it :D

But it probably would be easier to wait for the update unless you really need the fix.

Finalzone
12th October 2012, 08:26 PM
In addition, please add karma to bodhi in admin.fedoraproject.org/updates if you are a Fedora Project contributor or user.

DBelton
12th October 2012, 09:09 PM
-36 has been pushed into the repo. I got is in an update last night :)

sea
12th October 2012, 10:41 PM
Recieved the -36 this morning, -but it didnt help me.
Lennart said -37 would fix the issue.
We'll see ;)