gerritbot should be interruptable

Bug #1021696 reported by Andrew Hutchings
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Core Infrastructure
Triaged
Medium
Tim Kelsey

Bug Description

at the moment the only way to stop gerritbot is a kill -9. It should have a proper signal handler to take normal kills and nohups and clean up it's pid file. This may require having everything in threads so the main thread can handle signals

Monty Taylor (mordred)
Changed in openstack-ci:
status: New → Triaged
milestone: folsom → grizzly
Changed in openstack-ci:
assignee: nobody → Elizabeth Krumbach (lyz)
Jeremy Stanley (fungi)
Changed in openstack-ci:
milestone: grizzly → havana
Clark Boylan (cboylan)
tags: added: low-hanging-fruit
Changed in openstack-ci:
assignee: Elizabeth Krumbach Joseph (lyz) → nobody
Revision history for this message
Clark Boylan (cboylan) wrote :

I think this will be fixed by pushing and using a new gerritlib release. Lifeless, made the gerritlib listener thread a daemon thread so that if the main thread exits so will the entire program. We should work on getting a new gerritlib release out and test this theory.

Changed in openstack-ci:
milestone: havana → icehouse
Revision history for this message
Jeremy Stanley (fungi) wrote :

We released gerritlib 0.3.0 as of 2013-12-02 18:01:44 http://git.openstack.org/cgit/openstack-infra/gerritlib/tag/?id=0.3.0 so I'll test that theory.

Changed in openstack-ci:
assignee: nobody → Jeremy Stanley (fungi)
Revision history for this message
Clark Boylan (cboylan) wrote :

I just tested this with gerritlib 0.3.0 and it is still not interruptable. I am guessing there is another thread somewhere not willing to give up control (perhaps in the irc lib?)

Jeremy Stanley (fungi)
Changed in openstack-ci:
assignee: Jeremy Stanley (fungi) → nobody
Revision history for this message
Tim Kelsey (tim-kelsey) wrote :

I would like to work on this.

Changed in openstack-ci:
assignee: nobody → Tim Kelsey (tim-kelsey)
Revision history for this message
Tim Kelsey (tim-kelsey) wrote :

I can't seem to reproduce this exactly, `kill -TERM pid` will exit gerritbot and delete the pid file. Interestingly using any other signal will exit gerritbot but leave the pid file, I'm thinking its probably due to an uncaught exception. Pip freeze lists the following notable package versions in my virtualenv:

gerritbot==0.2.0.1.g6208bd9
gerritlib==0.4.0
irc==8.9.1
lockfile==0.9.1
python-daemon==1.6

Jeremy Stanley (fungi)
Changed in openstack-ci:
milestone: icehouse → kilo
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.