Skip to content

Systemd services broken on Debian Wheezy #10309

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
torhve opened this issue Feb 9, 2014 · 8 comments
Closed

Systemd services broken on Debian Wheezy #10309

torhve opened this issue Feb 9, 2014 · 8 comments
Assignees
Labels
Bug broken, incorrect, or confusing behavior fixed-pls-verify fix is linked, bug author to confirm fix help-wanted Community help is needed to resolve this severity-low 4th level, cosemtic problems, work around exists
Milestone

Comments

@torhve
Copy link
Contributor

torhve commented Feb 9, 2014

The systemd module uses the command
systemctl --full list-unit-files | col -b to find all services.

The correct command should be
systemctl --all --full list-units --type service

@basepi
Copy link
Contributor

basepi commented Feb 10, 2014

Thanks for finding this! We'll get it fixed.

@basepi basepi added this to the Outstanding Bugs milestone Feb 10, 2014
@cachedout cachedout self-assigned this Mar 7, 2014
@cachedout
Copy link
Contributor

Hi @torhve. Can you elaborate on why you think that your change should be implemented? Is there a particular use case that's broken in the current implementation? Just as a cursory glance, I see that the current version outputs nearly twice as many services as does your suggested version. I just want to understand what we're doing here, as this change obviously has the potential to affect a large number of systems. :]

@torhve
Copy link
Contributor Author

torhve commented Mar 7, 2014

That's not what I see on my system. (Debian Wheezy)
The list-unit-files also list things that aren't services, and then salt uses regexp to match the unit files to services.

systemctl --full list-unit-files | col -b | grep -c service
87

systemctl --all --full list-units --type service | grep -c service```
98

In short, there can exist services that doesn't have unit files. (Atleast that's my understanding)

The error I typically get from salt is

State: - service
Name:      ntp
Function:  running
    Result:    False
    Comment:   The named service ntp is not available
    Changes:

So lets see what salt looks at:

systemctl --all --full list-unit-files --type service | grep -c ntp
0

But on the other hand:

systemctl --all --full list-units --type service | grep ntp
ntp.service                          loaded active   running     LSB: Start NTP daemon

Which means that the packagers of NTP didn't include systemd unit file, but it has a plain old init script, which systemd knows about, but not salt.

I hope that clears things up.

@herzi
Copy link

herzi commented Mar 22, 2014

I see this happening as well, currently affected services are at least “apache2“ and “ssh”.

Debian: 7.4
Salt: 2014.1.1+ds-1bpo70+1
Systemd: 204-7
bpo70+1

@TJuberg
Copy link

TJuberg commented Apr 14, 2014

I can confirm that at least for ntp this is also the case for Debian sid (8.0)

Salt: 2014.1.1+ds-1
Systemd: 204-8

@cachedout
Copy link
Contributor

In #11921 @mtorromeo says that this should now be fixed. Could somebody grab his patch and verify, please? Thanks!

@rallytime
Copy link
Contributor

Looks like this issue is fixed, but if anyone sees this one pop up again with that patch applied, leave a comment and we will be happy to re-open!

@bfleming-ciena
Copy link

bfleming-ciena commented Aug 8, 2017

Getting this for centos7 and ntp on the latest version of salt stack. Should this work? The module is already installed, it passes the install but fails on the service setting.

      ID: start-ntp
Function: service.running
    Name: ntp
  Result: False
 Comment: The named service ntp is not available
 Started: 23:42:15.041397
Duration: 29.39 ms
 Changes:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior fixed-pls-verify fix is linked, bug author to confirm fix help-wanted Community help is needed to resolve this severity-low 4th level, cosemtic problems, work around exists
Projects
None yet
Development

No branches or pull requests

7 participants