[Bug 1447807] Re: systemctl enable fails to enable a SysV service
Thanks for the fast fix, is there already a package built from the patch somewhere that I could test? Also you might want to amend the title of the bug, as enabling the service is in fact performed properly, systemctl just throws an error in the end when it should simply terminate successfully instead. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1447807 Title: systemctl enable fails to enable a SysV service To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1447807/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1447807] Re: systemctl enable fails to enable a SysV service
I wouldn't agree that this is purely cosmetical, as it breaks things like Chef automation: https://github.com/gmiranda23/ntp/issues/105 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1447807 Title: systemctl enable fails to enable a SysV service To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1447807/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1447807] Re: systemctl enable fails to enable a SysV service
Looking at the source code a bit, I see that in systemctl.c:enable_sysv_units there is a comment that it should reshuffle the args array, but it seems it never does that? So strv_isempty(names) in enable_unit never matches, causing the call to systemd which is failing, because there is no unit file. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1447807 Title: systemctl enable fails to enable a SysV service To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1447807/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1447807] Re: systemctl enable fails to enable a SysV service
** Changed in: systemd (Ubuntu) Importance: Wishlist = Low ** Changed in: systemd (Ubuntu) Assignee: (unassigned) = Martin Pitt (pitti) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1447807 Title: systemctl enable fails to enable a SysV service To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1447807/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1447807] Re: systemctl enable fails to enable a SysV service
Debian experimental (will land in wily): Test case: http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/commit/?h=experimentalid=19135a96074bfb2 Fix: http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/commit/?h=experimentalid=4ac741db2d66 Backported to Ubuntu branch for vivid: http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/commit/?h=ubuntuid=8c649c0e http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/commit/?h=ubuntuid=439a7731 ** Changed in: systemd (Ubuntu) Status: In Progress = Fix Committed ** Also affects: systemd (Ubuntu Wily) Importance: Low Assignee: Martin Pitt (pitti) Status: Fix Committed ** Also affects: systemd (Ubuntu Vivid) Importance: Undecided Status: New ** Changed in: systemd (Ubuntu Vivid) Status: New = In Progress ** Changed in: systemd (Ubuntu Vivid) Importance: Undecided = Medium ** Changed in: systemd (Ubuntu Wily) Importance: Low = Medium ** Description changed: - Trying to enable a SysV init service results in an error: + SRU TEST CASE: + -- + Trying to enable a SysV init service which does not have a corresponding systemd unit results in an error: - # systemctl enable sysstat - Synchronizing state for sysstat.service with sysvinit using update-rc.d... - Executing /usr/sbin/update-rc.d sysstat defaults - Executing /usr/sbin/update-rc.d sysstat enable + # systemctl enable pulseaudio + Synchronizing state for pulseaudio.service with sysvinit using update-rc.d... + Executing /usr/sbin/update-rc.d pulseaudio defaults + Executing /usr/sbin/update-rc.d pulseaudio enable Failed to execute operation: No such file or directory - I expected the service to be enabled. + /etc/init.d/pulseaudio actually does get enabled (check + /etc/rc*/*pulse*), but the command fails with code 1 and you get that + error message. With the fix the command succeeds. + + SRU Regression potential + + Low, the modes for sysv script + systemd unit as well as systemd unit only already have automatic tests, and now this scenario (sysv script only) has a test too. In the worst case this has the potential of completely breaking systemctl enable/disable, which can be worked around with changing symlinks manually, and isn't breaking the boot. + Version details: Description: Ubuntu 15.04 Release: 15.04 systemd: - Installed: 219-7ubuntu3 - Candidate: 219-7ubuntu3 - Version table: - *** 219-7ubuntu3 0 - 500 http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ vivid/main amd64 Packages - 100 /var/lib/dpkg/status + Installed: 219-7ubuntu3 + Candidate: 219-7ubuntu3 + Version table: + *** 219-7ubuntu3 0 + 500 http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ vivid/main amd64 Packages + 100 /var/lib/dpkg/status -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1447807 Title: systemctl enable fails to enable a SysV service To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1447807/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1447807] Re: systemctl enable fails to enable a SysV service
I wrote a test case in debian/tests/unit-config for this which reproduces this. ** Changed in: systemd (Ubuntu) Status: Triaged = In Progress -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1447807 Title: systemctl enable fails to enable a SysV service To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1447807/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1447807] Re: systemctl enable fails to enable a SysV service
** Changed in: systemd (Ubuntu) Importance: High = Wishlist ** Changed in: systemd (Ubuntu) Status: Confirmed = Triaged ** Changed in: systemd (Ubuntu) Importance: Wishlist = Low ** Changed in: systemd (Ubuntu) Importance: Low = Wishlist -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1447807 Title: systemctl enable fails to enable a SysV service To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1447807/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1447807] Re: systemctl enable fails to enable a SysV service
@pitti I don't understand. @eheydrick said update-rc.d suscceed but systemd still rturning an error. So why update-rc.d or manual symlink would change anything ? This still an issue. Systemd states it is compatible with init.d script. So it should work. I have the same issue with a script that is already enabled, but enabling or starting it ends up with the Failed to execute operation: No such file or directory. ** Changed in: systemd (Ubuntu) Status: Invalid = Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1447807 Title: systemctl enable fails to enable a SysV service To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1447807/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1447807] Re: systemctl enable fails to enable a SysV service
** Changed in: systemd (Ubuntu) Importance: Undecided = High -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1447807 Title: systemctl enable fails to enable a SysV service To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1447807/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1447807] Re: systemctl enable fails to enable a SysV service
Looking closer, the service is getting enabled - the update-rc.d commands are succeeding and the init.d links are getting created - but systemctl is still returning an error. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1447807 Title: systemctl enable fails to enable a SysV service To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1447807/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1447807] Re: systemctl enable fails to enable a SysV service
This is because the sysstat package does not actually have a systemd unit. It just has a sysvinit init.d script, so you can't enable/disable this via systemd. You need to enable/disable it via update-rc.d (or manual symlinks in /etc/rc?.d/). ** Changed in: systemd (Ubuntu) Status: New = Invalid -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1447807 Title: systemctl enable fails to enable a SysV service To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1447807/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs