Bug 5734 - systemd - enable/disable service - fails
Summary: systemd - enable/disable service - fails
Status: VERIFIED INVALID
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 1.6
Hardware: x86 Multiple
: Undecided normal
Target Milestone: ---
Assignee: Saul Wold
QA Contact: Ionut Chisanovici
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2014-01-17 08:45 UTC by Ionut Chisanovici
Modified: 2015-08-07 13:51 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
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 2014-01-17 08:45:32 UTC
STATUS: RUNNING
BUILD: 1.6_M2_RC1: e4c23f7bcb79072ea6028fbdf8f3f0dc17a63371
ENVIRONMENT: Multiple environments
STEPS TO REPRODUCE: 
  
Prepare a core-image-minimal image with systemd support and launch it. 
     Refer to TC-549 in order how to build it.
Show status of a service
    # systemctl show syslog.socket
Stop a running service:
    # systemctl stop syslog.socket
Enable a service:
    # systemctl enable syslog.socket
Verify the service status:
    # systemctl is-enabled syslog.socket
Disable the service
    # systemctl disable syslog.socket
Verify the service status:
    # systemctl is-enabled syslog.socket

EXPECTED OUTCOME: 2. Information should be displayed for the service
3. The service is stopped
4. The service is enabled
5. It is displayed that the service appears to be enabled
6. The service is disabled
7. It is displayed that the service appears to be disabled

Actual outcome:

1. When running systemctl stop syslog.socket, the service is not stopped:

root@qemux86:~# systemctl stop syslog.socket
root@qemux86:~# ps | grep syslog
  100 root      2480 S    /sbin/syslogd -n -C

2. When running systemctl enable syslog.socket, following issue appear:

root@qemux86:~# systemctl enable syslog.socket
The unit files have no [Install] section. They are not meant to be enabled
using systemctl.
Possible reasons for having this kind of units are:
1) A unit may be statically enabled by being symlinked from another unit's
   .wants/ or .requires/ directory.
2) A unit's purpose may be to act as a helper for some other unit which has
   a requirement dependency on it.
3) A unit may be started when needed via activation (socket, path, timer,
   D-Bus, udev, scripted systemctl call, ...).

3. When disabling the service, systemctl shows the syslog.socket as being static and not as disabled/enabled:

root@qemux86:~# systemctl disable syslog.socket
root@qemux86:~# systemctl is-enabled syslog.socket
static

Cheers,
Ionut C
Comment 1 Stefan Stanacar 2014-01-17 16:20:43 UTC
This isn't a bug, the TC should be updated. syslog.socket isn't a good option for a systemd unit file to test.
syslog.socket is a static unit file and that's the intended behaviour.
avahi-daemon.service it's much better choice.
Comment 2 Stefan Stanacar 2014-01-20 18:32:11 UTC
Ionut: can we update the TC and pick another unit file to test? avahi-daemon.service is a good choice.

syslog.socket it's a static unit file and you can't use enable/disable for those.
systemctl list-unit-files whill show you which units are static and which are enabled/disabled, so don't pick one from the static list (think of those as dependecies, they are started by a service file, in this case busybox-syslog.service or syslogd.services starts the socket)
Comment 3 Ionut Chisanovici 2014-01-21 08:53:45 UTC
Ok, this will be closed.
Verified.

Ionut C
Comment 4 Ionut Chisanovici 2014-04-15 12:55:55 UTC
Verified and closed.

IonutC