Bug 7393 - systemd - check failed services - failed for systemd-tmpfiles-setup.service
Summary: systemd - check failed services - failed for systemd-tmpfiles-setup.service
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 1.8
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 1.8 M4
Assignee: Randy Witt
QA Contact: Costin
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2015-03-04 16:30 UTC by Ionut Chisanovici
Modified: 2015-09-16 07:24 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: Regression (Used to work)
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ionut Chisanovici 2015-03-04 16:30:52 UTC
Hi,

The systemd check failed services failed for systemd-tmpfiles-setup.service:

======================================================================
| FAIL: test_systemd_failed (oeqa.runtime.systemd.SystemdBasicTests)
| ----------------------------------------------------------------------
| Traceback (most recent call last):
|   File "/home/autobuilder/yocto-autobuilder/yocto-worker/nightly-qa-systemd/build/meta/lib/oeqa/utils/decorators.py", line 97, in wrapped_f
|     return func(*args)
|   File "/home/autobuilder/yocto-autobuilder/yocto-worker/nightly-qa-systemd/build/meta/lib/oeqa/utils/decorators.py", line 86, in wrapped_f
|     return f(*args)
|   File "/home/autobuilder/yocto-autobuilder/yocto-worker/nightly-qa-systemd/build/meta/lib/oeqa/runtime/systemd.py", line 65, in test_systemd_failed
|     self.assertTrue(match, msg="Some systemd units failed:\n%s" % output)
| AssertionError: None is not true : Some systemd units failed:
|   UNIT                           LOAD   ACTIVE SUB    DESCRIPTION
| ● systemd-tmpfiles-setup.service loaded failed failed Create Volatile Files and Directories
| 
| LOAD   = Reflects whether the unit definition was properly loaded.
| ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
| SUB    = The low-level unit activation state, values depend on unit type.
| 
| 1 loaded units listed. Pass --all to see loaded but inactive units, too.
| To show all installed unit files use 'systemctl list-unit-files'.● qemux86-64
|     State: degraded
|      Jobs: 0 queued
|    Failed: 1 units
|     Since: Wed 2015-03-04 15:56:29 UTC; 17min ago
|    CGroup: /
|            ├─ 1 /sbin/init
|            ├─81 /sbin/v86d
|            └─system.slice
|              ├─avahi-daemon.service
|              │ ├─303 avahi-daemon: running [qemux86-64.local
|              │ └─309 avahi-daemon: chroot helpe
|              ├─dbus.service
|              │ └─298 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
|              ├─distcc.service
|              │ ├─300 /usr/bin/distccd --verbose --no-detach --daemon --allow 192.168.7.0/24
|              │ ├─313 /usr/bin/distccd --verbose --no-detach --daemon --allow 192.168.7.0/24
|              │ ├─316 /usr/bin/distccd --verbose --no-detach --daemon --allow 192.168.7.0/24
|              │ └─320 /usr/bin/distccd --verbose --no-detach --daemon --allow 192.168.7.0/24
|              ├─wpa_supplicant.service
|              │ └─331 /usr/sbin/wpa_supplicant -u
|              ├─busybox-klogd.service
|              │ └─297 /sbin/klogd -n
|              ├─system-serial\x2dgetty.slice
|              │ └─serial-getty@ttyS0.service
|              │   └─325 /sbin/agetty -8 -L --keep-baud ttyS0 115200 xterm
|              ├─systemd-journald.service
|              │ └─65 /lib/systemd/systemd-journald
|              ├─connman.service
|              │ └─319 /usr/sbin/connmand -n
|              ├─systemd-logind.service
|              │ └─302 /lib/systemd/systemd-logind
|              ├─system-getty.slice
|              │ └─getty@tty1.service
|              │   └─326 /sbin/agetty --noclear tty1 linux
|              ├─ofono.service
|              │ └─301 /usr/sbin/ofonod -n
|              ├─systemd-udevd.service
|              │ └─99 /lib/systemd/systemd-udevd
|              ├─busybox-syslog.service
|              │ └─454 /sbin/syslogd -n -C
|              ├─system-dropbear.slice
|              │ ├─dropbear@111-192.168.7.2:22-192.168.7.1:33974.service
|              │ │ ├─1506 /usr/sbin/dropbear -i -r /etc/dropbear/dropbear_rsa_host_key -B
|              │ │ ├─1507 sh -c  . /etc/profile; systemctl status --full --failed
|              │ │ └─1508 systemctl status --full --failed
|              │ ├─dropbear@82-192.168.7.2:22-192.168.7.1:33945.service
|              │ │ └─1326 /usr/bin/psplash --angle 0
|              │ └─dropbear@14-192.168.7.2:22-192.168.7.1:33869.service
|              │   └─486 x11vnc -display :0 -bg -o x11vnc.log
|              └─xserver-nodm.service
|                ├─304 xinit /etc/X11/Xsession -- /usr/bin/Xorg :0 -br -pn
|                ├─314 /usr/bin/Xorg :0 -br -pn
|                ├─340 matchbox-window-manager -theme Sato -use_desktop_mode decorated -use_cursor no
|                ├─345 dbus-launch --sh-syntax --exit-with-session
|                ├─346 /usr/bin/dbus-daemon --fork --print-pid 4 --print-address 6 --session
|                ├─364 connman-applet
|                ├─370 /usr/lib/gconf/gconfd-2
|                ├─383 matchbox-desktop
|                ├─384 matchbox-panel --titlebar --start-applets showdesktop,windowselector --end-applets clock,battery,,systray,startup-notify,notify
|                └─385 /usr/bin/settings-daemon

BUILD: 1.8_M3.RC3: 5c1c8af083ca7b57cc339d16ce0513b27c5dac90
ENVIRONMENT: Ubuntu 14.10 x86_64
STEPS TO REPRODUCE: 
1.  Prepare a core-image-minimal image with systemd support and launch it. 
     Refer to TC-549 in order how to build it.
2. List all the failed services by running the following command:
    $ systemctl --failed

EXPECTED OUTCOME:
2. All failed service should be listed.

Build Configuration:
BB_VERSION        = "1.25.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Ubuntu-14.10"
TARGET_SYS        = "x86_64-poky-linux"
MACHINE           = "qemux86-64"
DISTRO            = "poky"
DISTRO_VERSION    = "1.7"
TUNE_FEATURES     = "m64 core2"
TARGET_FPU        = ""
meta              
meta-yocto        
meta-yocto-bsp    = "master:5c1c8af083ca7b57cc339d16ce0513b27c5dac90"

Cheers,
Ionut C
Comment 1 Randy Witt 2015-03-04 18:11:32 UTC
*** Bug 7388 has been marked as a duplicate of this bug. ***
Comment 2 Khem Raj 2015-03-04 22:24:49 UTC
Please check if you still see it with 

http://patchwork.openembedded.org/patch/89779/

applied
Comment 3 Randy Witt 2015-03-04 22:29:55 UTC
(In reply to comment #2)
> Please check if you still see it with 
> 
> http://patchwork.openembedded.org/patch/89779/
> 
> applied

It still fails. The failures aren't related to ACL entries. It seems to be because systemd-tmpfiles doesn't actually honor ordering in files and so /var/volatile/tmp doesn't exist when systemd-tmpfiles tries to create /var/tmp.
Comment 4 Randy Witt 2015-03-16 18:18:43 UTC
This is fixed with change:

commit 1662423b8a8dc4907638a5717720d2911363e71a
Author: Randy Witt <randy.e.witt@linux.intel.com>
Date:   Wed Mar 4 19:01:05 2015 -0800
Comment 5 Alexandru Georgescu 2015-03-27 06:24:39 UTC
Costin, can you verify this?
Also, do we need a TC to make sure this doesn't happen again?
Comment 6 Costin 2015-03-30 10:53:51 UTC
Hello,

I checked on master by building a core-image-minimal for qemux86.
The hash  i used was 5c76cebc24675edb3dff473fce9b67cedff615db from master.

The test case that this bug is addressed to is TC550 (https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=550). This test case is confusing because the expected results should be: "2. All failed service should be listed.". However, the runtime test verifies if the string match = re.search("0 loaded units listed", output) is present in the output of command systemctl --faied (poky/meta/lib/oeqa/runtime/systemd.py). I believe this is not in accordance with what the test case is intended for "systemd - check failed services".

After running the resulted image for qemux86, my findings were:
root@qemux86:~# systemctl --failed | grep "loaded units listed"
1 loaded units listed. Pass --all to see loaded but inactive units, too.
meaning the auto test will fail. 

As a conclusion, i don't know if this test is intended to see if all services were loaded and there is no service failed or it is intended to see that systemctl --failed returns the components that failed to load.

Costin
Comment 7 Costin 2015-09-16 07:24:37 UTC
Hello,

I will mark this as verified. In my opinion the related TC550 needs a double check.
We'll do that separately