Bug 1245129

Summary: slow stop of poller shinken daemon
Product: [Fedora] Fedora EPEL Reporter: rasoso
Component: shinkenAssignee: David Hannequin <david.hannequin>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: epel7CC: david.hannequin, rasoso
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: shinken-2.4.1-1.fc22 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-13 20:19:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description rasoso 2015-07-21 09:21:17 UTC
Description of problem:

When there is an issue (e.g. bug 1245110) the stop of the poller daemon is slow because TimeoutStopSec is not used.

[root@centos7 ~]# time systemctl stop shinken-poller

real    1m5.303s
user    0m0.002s
sys     0m0.003s


When using TimeoutStopSec=X (X=3 or 4) the behavior is more similar to https://github.com/naparuba/shinken/blob/master/bin/init.d/shinken where
sleep loops are used. 

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

shinken-arbiter-2.2-6.el7.noarch
shinken-scheduler-2.2-6.el7.noarch
shinken-reactionner-2.2-6.el7.noarch
shinken-broker-2.2-6.el7.noarch
shinken-poller-2.2-6.el7.noarch
shinken-receiver-2.2-6.el7.noarch
shinken-2.2-6.el7.noarch

How reproducible:

Always.

Steps to Reproduce:

See bug 1245110

Actual results:

More than 60s for stop.

Expected results:

Few seconds to stop.

Additional info:

[root@centos7 ~]# diff -up /usr/lib/systemd/system/shinken-poller.service.ORIG /usr/lib/systemd/system/shinken-poller.service
--- /usr/lib/systemd/system/shinken-poller.service.ORIG 2015-07-21 04:34:00.712000000 -0400
+++ /usr/lib/systemd/system/shinken-poller.service      2015-07-21 05:13:51.708000000 -0400
@@ -5,6 +5,7 @@ After=syslog.target
 [Service]
 Type=forking
 ExecStart=/usr/sbin/shinken-poller -d -c /etc/shinken/daemons/pollerd.ini
+TimeoutStopSec=4

 [Install]
 WantedBy=multi-user.target

[root@centos7 ~]# time systemctl stop shinken-poller

real    0m4.018s
user    0m0.002s
sys     0m0.004s

Comment 1 David Hannequin 2015-07-21 21:55:29 UTC
Hi,

Thanks for your issue, i fix soon. 

Best regard

Comment 2 Fedora Update System 2015-07-24 14:17:03 UTC
shinken-2.2-9.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/shinken-2.2-9.fc22

Comment 3 Fedora Update System 2015-07-24 14:22:34 UTC
shinken-2.2-9.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/shinken-2.2-9.el6

Comment 4 Fedora Update System 2015-07-24 14:27:00 UTC
shinken-2.2-9.el7 has been submitted as an update for Fedora EPEL 7.
https://admin.fedoraproject.org/updates/shinken-2.2-9.el7

Comment 5 Fedora Update System 2015-07-24 16:20:33 UTC
shinken-2.4.1-1.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/shinken-2.4.1-1.fc22

Comment 6 Fedora Update System 2015-07-24 16:24:39 UTC
shinken-2.4.1-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/shinken-2.4.1-1.el6

Comment 7 Fedora Update System 2015-07-24 16:31:35 UTC
shinken-2.4.1-1.el7 has been submitted as an update for Fedora EPEL 7.
https://admin.fedoraproject.org/updates/shinken-2.4.1-1.el7

Comment 8 Fedora Update System 2015-07-27 23:09:52 UTC
Package shinken-2.4.1-1.el6:
* should fix your issue,
* was pushed to the Fedora EPEL 6 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing shinken-2.4.1-1.el6'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2015-7321/shinken-2.4.1-1.el6
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2015-08-13 20:19:18 UTC
shinken-2.4.1-1.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2015-08-13 20:23:34 UTC
shinken-2.4.1-1.el7 has been pushed to the Fedora EPEL 7 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2015-08-15 02:11:22 UTC
shinken-2.4.1-1.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.