Bug #8611
closedService ensure running keeps staying repaired
Description
This is something systemd-shim-ish
@root@ref-one-master:~# ps -ef | grep sunstone
root 1011 30971 0 19:45 pts/1 00:00:00 grep sunstone
oneadmin 19214 1 0 15:50 ? 00:00:00 python /usr/share/one/websockify/websocketproxy.py --target-config=/var/lib/one/sunstone_vnc_tokens 29876
oneadmin 19236 1 0 15:50 ? 00:00:03 ruby /usr/lib/one/sunstone/sunstone-server.rb
root@ref-one-master:~# systemctl -a | grep sunstone
opennebula-sunstone.service loaded active exited LSB: Sunstone init script
root@ref-one-master:~# rudder agent run
Rudder agent 3.2.4-jessie0 (CFEngine Core 3.7.1)
Node uuid: 85f6affd-37a7-4fac-85fa-6f7005a2fde0
Start execution with config [279964146]
Result Technique Component Key Message
repaired bugfix_sunstone Service ensure running opennebula-sunsto| Ensure that service opennebula-sunstone is running was repaired
error config_ONE_sunstone_webs| Service check running opennebula-sunsto| Not applicable could not be repaired
error install_opennebula_client Package install nfs-client Install or update package nfs-client in version latest could not be repaired
- Summary #####################################################################
repaired: 1
error: 2
execution time: 19.69s ################################################################################
root@ref-one-master:~# rudder agent run
Rudder agent 3.2.4-jessie0 (CFEngine Core 3.7.1)
Node uuid: 85f6affd-37a7-4fac-85fa-6f7005a2fde0
Start execution with config [279964146]
Result Technique Component Key Message
repaired bugfix_sunstone Service ensure running opennebula-sunsto| Ensure that service opennebula-sunstone is running was repaired
error config_ONE_sunstone_webs| Service check running opennebula-sunsto| Not applicable could not be repaired
error install_opennebula_client Package install nfs-client Install or update package nfs-client in version latest could not be repaired
- Summary #####################################################################
repaired: 1
error: 2
execution time: 19.90s@
It'll try to restart it each time, while systemd says it's active.
( and it's running)
root@ref-one-master:~# cat /etc/debian_version
8.4
root@ref-one-master:~# rudder agent info
Hostname: ref-one-master
UUID: 85f6affd-37a7-4fac-85fa-6f7005a2fde0
Key Hash: sdflksdjflskjslfkjlksdjfkljsd983b5b8ae
Policy server:sljsdlfjsdlfjsdlfj
Roles: rudder-agent
Agent is enabled
Policy updated: 2016-06-27 19:31:10
Inventory sent: 2016-06-27 15:18:49
Version: Rudder agent 3.2.4-jessie0 (CFEngine Core 3.7.1)
Files
Updated by Ferenc Ulrich almost 8 years ago
The method keeps reporting repaired, even if service is running fine(since months).
It should bring _kept, if no action was taken, and _repaired, if service needed to be restarted.
Updated by Alexis Mousset almost 8 years ago
- Category changed from Generic methods to Generic methods - Service Management
Updated by Florian Heigl almost 8 years ago
As you can see in the logs it doesn't just incorrectly report. It tries starting the service on each run of the agent.
It also seems to ps / grep instead of asking systemd. Is that intentional?
The one thing systemd doesn't mess up is knowing if a process is running.
Updated by Florian Heigl almost 8 years ago
I'm not sure how exactly the query goes wrong but I can see that both services showing this issue have systemd unit files and systemctl status works on them.
So I'm pretty sure the good long term fix here would be to go and ask systemd.
Our lldp example is running twice with different users which might be part of the problem.
The other process (ossec-hids) was actually broken, so this seems a different story.
Updated by Alexis Mousset almost 8 years ago
- Target version changed from 0.x to 1.0
Updated by Alexis Mousset almost 8 years ago
- Status changed from New to In progress
Updated by Alexis Mousset almost 8 years ago
- Status changed from In progress to New
- Target version changed from 1.0 to 0.x
This happens because running process check is not done through systemd, but using the process list. We will backport (at least) the check for systemctl in v0.x.
Updated by Alexis Mousset almost 8 years ago
- Related to Bug #7247: service detection based on ps may not work for start/restart method added
Updated by Alexis Mousset almost 8 years ago
This was fixed in #7192 in master branch, we can try to backport a fix (systemd-based service status checks) for 0.x.
Updated by Alexis Mousset almost 8 years ago
- Related to Architecture #7192: Rewrite the service_* methods added
Updated by Benoît PECCATTE over 7 years ago
- Severity set to Minor - inconvenience | misleading | easy workaround
- User visibility set to Operational - other Techniques | Technique editor | Rudder settings
- Priority set to 15
Updated by Jonathan CLARKE over 7 years ago
- Assignee deleted (
Alexis Mousset) - Priority changed from 15 to 14
Updated by Alexis Mousset over 7 years ago
- Status changed from New to Rejected
This bug is fixed in 4.1, and the required changes are considered too big and impacting to backport them.
I'm closing this ticket, users should upgrade to 4.1 when possible.
Updated by Alexis Mousset over 2 years ago
- Target version changed from 0.x to ncf-0.x
- Priority changed from 14 to 0
Updated by Alexis Mousset over 2 years ago
- Project changed from 41 to Rudder
- Category changed from Generic methods - Service Management to Generic methods