Bug 1128308 - systemctl enable/disable does nothing, regression from systemd-204-18
Summary: systemctl enable/disable does nothing, regression from systemd-204-18
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1132735 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-08 21:41 UTC by Ben Greear
Modified: 2014-08-23 07:07 UTC (History)
10 users (show)

Fixed In Version: systemd-204-21.fc19
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-23 01:57:27 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Ben Greear 2014-08-08 21:41:27 UTC
Description of problem:

Latest systemctl does not do any sym links when you do systemctl enable foo
(or systemctl disable foo).

This version is broken:
systemd-libs-204-20.fc19.x86_64
systemd-python3-204-20.fc19.x86_64
systemd-python-204-20.fc19.x86_64
systemd-204-20.fc19.x86_64
systemd-sysv-204-20.fc19.x86_64


Before yum update on this system, it worked, and version was:


systemd-sysv-204-18.fc19.x86_64
systemd-libs-204-18.fc19.x86_64
systemd-python-204-18.fc19.x86_64
systemd-204-18.fc19.x86_64
systemd-python3-204-18.fc19.x86_64


[root@ath10k-2220 multi-user.target.wants]# systemctl enable NetworkManager
[root@ath10k-2220 multi-user.target.wants]# ls -ltr
total 0
lrwxrwxrwx. 1 root root 40 Jun 27  2013 remote-fs.target -> /usr/lib/systemd/system/remote-fs.target
lrwxrwxrwx. 1 root root 41 Jun 27  2013 mdmonitor.service -> /usr/lib/systemd/system/mdmonitor.service
lrwxrwxrwx. 1 root root 37 Jun 27  2013 crond.service -> /usr/lib/systemd/system/crond.service
lrwxrwxrwx. 1 root root 39 Jun 27  2013 rpcbind.service -> /usr/lib/systemd/system/rpcbind.service
lrwxrwxrwx. 1 root root 40 Jun 27  2013 vmtoolsd.service -> /usr/lib/systemd/system/vmtoolsd.service
lrwxrwxrwx. 1 root root 39 Jun 27  2013 chronyd.service -> /usr/lib/systemd/system/chronyd.service
lrwxrwxrwx. 1 root root 38 Jun 27  2013 auditd.service -> /usr/lib/systemd/system/auditd.service
lrwxrwxrwx. 1 root root 41 Jun 27  2013 abrt-xorg.service -> /usr/lib/systemd/system/abrt-xorg.service
lrwxrwxrwx. 1 root root 43 Jun 27  2013 abrt-vmcore.service -> /usr/lib/systemd/system/abrt-vmcore.service
lrwxrwxrwx. 1 root root 41 Jun 27  2013 abrt-oops.service -> /usr/lib/systemd/system/abrt-oops.service
lrwxrwxrwx. 1 root root 41 Jun 27  2013 abrt-ccpp.service -> /usr/lib/systemd/system/abrt-ccpp.service
lrwxrwxrwx. 1 root root 33 Jun 27  2013 cups.path -> /usr/lib/systemd/system/cups.path
lrwxrwxrwx. 1 root root 40 Jun 27  2013 libvirtd.service -> /usr/lib/systemd/system/libvirtd.service
lrwxrwxrwx. 1 root root 39 Jun 27  2013 rsyslog.service -> /usr/lib/systemd/system/rsyslog.service
lrwxrwxrwx. 1 root root 36 Jun 27  2013 rngd.service -> /usr/lib/systemd/system/rngd.service
lrwxrwxrwx. 1 root root 38 Jun 27  2013 mcelog.service -> /usr/lib/systemd/system/mcelog.service
lrwxrwxrwx. 1 root root 42 Jun 27  2013 irqbalance.service -> /usr/lib/systemd/system/irqbalance.service
lrwxrwxrwx. 1 root root 35 Jun 27  2013 atd.service -> /usr/lib/systemd/system/atd.service
lrwxrwxrwx. 1 root root 42 Feb 21 15:10 lm_sensors.service -> /usr/lib/systemd/system/lm_sensors.service
lrwxrwxrwx. 1 root root 36 Feb 21 15:15 sshd.service -> /usr/lib/systemd/system/sshd.service
lrwxrwxrwx. 1 root root 36 Feb 21 15:15 xrdp.service -> /usr/lib/systemd/system/xrdp.service
lrwxrwxrwx. 1 root root 39 Feb 21 15:15 radiusd.service -> /usr/lib/systemd/system/radiusd.service
lrwxrwxrwx. 1 root root 40 Feb 21 15:15 vncserver@:1.service -> /etc/systemd/system/vncserver@:1.service
lrwxrwxrwx. 1 root root 37 Feb 21 15:15 httpd.service -> /usr/lib/systemd/system/httpd.service
[root@ath10k-2220 multi-user.target.wants]# systemctl disable NetworkManager
[root@ath10k-2220 multi-user.target.wants]# ls -ltr
total 0
lrwxrwxrwx. 1 root root 40 Jun 27  2013 remote-fs.target -> /usr/lib/systemd/system/remote-fs.target
lrwxrwxrwx. 1 root root 41 Jun 27  2013 mdmonitor.service -> /usr/lib/systemd/system/mdmonitor.service
lrwxrwxrwx. 1 root root 37 Jun 27  2013 crond.service -> /usr/lib/systemd/system/crond.service
lrwxrwxrwx. 1 root root 39 Jun 27  2013 rpcbind.service -> /usr/lib/systemd/system/rpcbind.service
lrwxrwxrwx. 1 root root 40 Jun 27  2013 vmtoolsd.service -> /usr/lib/systemd/system/vmtoolsd.service
lrwxrwxrwx. 1 root root 39 Jun 27  2013 chronyd.service -> /usr/lib/systemd/system/chronyd.service
lrwxrwxrwx. 1 root root 38 Jun 27  2013 auditd.service -> /usr/lib/systemd/system/auditd.service
lrwxrwxrwx. 1 root root 41 Jun 27  2013 abrt-xorg.service -> /usr/lib/systemd/system/abrt-xorg.service
lrwxrwxrwx. 1 root root 43 Jun 27  2013 abrt-vmcore.service -> /usr/lib/systemd/system/abrt-vmcore.service
lrwxrwxrwx. 1 root root 41 Jun 27  2013 abrt-oops.service -> /usr/lib/systemd/system/abrt-oops.service
lrwxrwxrwx. 1 root root 41 Jun 27  2013 abrt-ccpp.service -> /usr/lib/systemd/system/abrt-ccpp.service
lrwxrwxrwx. 1 root root 33 Jun 27  2013 cups.path -> /usr/lib/systemd/system/cups.path
lrwxrwxrwx. 1 root root 40 Jun 27  2013 libvirtd.service -> /usr/lib/systemd/system/libvirtd.service
lrwxrwxrwx. 1 root root 39 Jun 27  2013 rsyslog.service -> /usr/lib/systemd/system/rsyslog.service
lrwxrwxrwx. 1 root root 36 Jun 27  2013 rngd.service -> /usr/lib/systemd/system/rngd.service
lrwxrwxrwx. 1 root root 38 Jun 27  2013 mcelog.service -> /usr/lib/systemd/system/mcelog.service
lrwxrwxrwx. 1 root root 42 Jun 27  2013 irqbalance.service -> /usr/lib/systemd/system/irqbalance.service
lrwxrwxrwx. 1 root root 35 Jun 27  2013 atd.service -> /usr/lib/systemd/system/atd.service
lrwxrwxrwx. 1 root root 42 Feb 21 15:10 lm_sensors.service -> /usr/lib/systemd/system/lm_sensors.service
lrwxrwxrwx. 1 root root 36 Feb 21 15:15 sshd.service -> /usr/lib/systemd/system/sshd.service
lrwxrwxrwx. 1 root root 36 Feb 21 15:15 xrdp.service -> /usr/lib/systemd/system/xrdp.service
lrwxrwxrwx. 1 root root 39 Feb 21 15:15 radiusd.service -> /usr/lib/systemd/system/radiusd.service
lrwxrwxrwx. 1 root root 40 Feb 21 15:15 vncserver@:1.service -> /etc/systemd/system/vncserver@:1.service
lrwxrwxrwx. 1 root root 37 Feb 21 15:15 httpd.service -> /usr/lib/systemd/system/httpd.service


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

systemd-204-20

How reproducible:

always

Steps to Reproduce:
1. Install Fedora 19
2. yum update
3. systemctl enable sshd

Actual results:

No errors, but sshd will not start, no sym links were created in systemd dir.

Expected results:

Expect systemd links to be created or at least an error explaining why not
and an error code, expect sshd to start on reboot.

Additional info:

This bug totally sucks!

Comment 1 Pavel Stárek (CZ) 2014-08-09 16:54:23 UTC
Yes, I can confirm this error in package systemd-204-20.fc19.x86_64 .

Comment 2 Aleksey Avdeev 2014-08-12 13:06:34 UTC
It seems that the problem is the patch 0139-systemctl-skip-native-unit-file-handling-if-sysv-fil.patch (see http://pkgs.fedoraproject.org/cgit/systemd.git/tree/0139-systemctl-skip-native-unit-file-handling-if-sysv-fil.patch?h=f19&id=674ca7db6e4cb440da1f4dbd56b122dafb9ddd20). After its application function enable_unit() acquires the following form:

static int enable_unit(DBusConnection *bus, char **args) {
        const char *verb = args[0];
        UnitFileChange *changes = NULL;
        unsigned n_changes = 0, i;
        int carries_install_info = -1;
        _cleanup_dbus_message_unref_ DBusMessage *m = NULL, *reply = NULL;
        int r;
        _cleanup_dbus_error_free_ DBusError error;
        _cleanup_strv_free_ char **mangled_names = NULL;
1                                ^^^^^^^^^^^^^^^^^^^^^^^

        dbus_error_init(&error);

        r = enable_sysv_units(args);
        if (r < 0)
                return r;

        if (!args[1])
                return 0;

        /* If the operation was fully executed by the SysV compat,
         * let's finish early */
        if (strv_isempty(mangled_names))
2       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                return 0;
3               ^^^^^^^^^

        if (!bus || avoid_bus()) {
...

Ie, at the time of adding the patch test (see selection 2) variable mangled_names is always NULL, because nebilo assignment except for initialization (see selection 1). Hence the function exits (see selection 3).

Comment 3 Ben Greear 2014-08-14 18:43:43 UTC
It's been 6 days, if nothing else, can someone just revert everything back to the previous release but bump the rpm version so that 'yum update' will get a properly working systemd package?

Comment 4 Fedora Update System 2014-08-15 03:06:59 UTC
systemd-204-21.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/systemd-204-21.fc19

Comment 5 Fedora Update System 2014-08-16 00:29:37 UTC
Package systemd-204-21.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing systemd-204-21.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-9450/systemd-204-21.fc19
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2014-08-23 01:57:27 UTC
systemd-204-21.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Alexander Bokovoy 2014-08-23 07:07:46 UTC
*** Bug 1132735 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.