Skip to content
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

Tries to restart a text file #116

Closed
duck-rh opened this issue May 21, 2018 · 3 comments
Closed

Tries to restart a text file #116

duck-rh opened this issue May 21, 2018 · 3 comments
Labels
Milestone

Comments

@duck-rh
Copy link
Contributor

duck-rh commented May 21, 2018

Quack,

Since CentOS 7.5, developers have decided to remind people to use systemd and added /etc/init.d/README. This result into:

WARNING: /etc/init.d/README has no LSB tags!

and later:

Failed to restart README.service: Unit not found.

From what I can see, there is also a /etc/init.d/functions file but not sure how it is ignored (not in the blacklist_rc).

We have a README file in Debian too but never had this problem.

Seems non-executable files in this directory should be ignored (at least on CentOS and Debian is would work), that might be a solution.

_o<

@liske
Copy link
Owner

liske commented May 21, 2018

Hi,

if needrestart is unable to find a service unit to restart a daemon it uses a heuristic to detect Sys-V init scripts. Could you please provide the debugging output of needrestart -v -r l?

@liske liske added the bug label May 21, 2018
@duck-rh
Copy link
Contributor Author

duck-rh commented May 21, 2018

Here it is:

needrestart_issue_116.log

@liske
Copy link
Owner

liske commented May 21, 2018

Thanks!

This looks wired:

[main] #1 exe => /usr/lib/systemd/systemd
[main] #1 unexpected cgroup '/'
[main] trying systemctl status
Failed to get unit for PID 1: PID 1 does not belong to any loaded unit.
[main] #1 running /etc/needrestart/hook.d/10-dpkg
[main] #1 running /etc/needrestart/hook.d/20-rpm
[main] #1 package: systemd-219-57.el7.x86_64
WARNING: /etc/init.d/README has no LSB tags!
[main] no LSB headers found at README

I would expect systemctl status 1 to report that it belongs to init.scope (so it does on Debian stretch). The README is detected as init script since cgroup and systemctl detection has failed and it using the README since it looks like a init script. Fixing the README stuff is easy but it looks like another problem (or a problem on the host/CentOS's systemd?).

@liske liske closed this as completed in e5d49d0 May 26, 2018
@liske liske added this to the v3.2 milestone May 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants