Ticket #2208 (closed defect: fixed)
GerritChangeSource: orphan SSH process
| Reported by: | sanxiyn | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.8.+ |
| Version: | 0.8.5 | Keywords: | gerrit |
| Cc: |
Description
When you stop a buildmaster using GerritChangeSource? you get:
[-] Received SIGTERM, shutting down. [-] starting 'gerrit stream-events' [-] Main loop terminated. [-] Server Shut Down.
That is, GerritChangeSource? restarts 'gerrit stream-events' SSH process while the buildmaster is shutting down. This results in an orphan SSH process.
Change History
comment:2 Changed 15 months ago by tom.prince
- Priority changed from major to minor
- Milestone changed from undecided to 0.8.+
comment:3 Changed 15 months ago by dustin
This:
def stopService(self): if self.process: self.process.signalProcess("KILL")
is killing the process, and then
def streamProcessStopped(self): self.process = None # if the service is stopped, don't try to restart if not self.parent: log.msg("service is not running; not reconnecting") return
is re-starting it. The check for self.parent is not the same as self.running which is, sadly, an undocumented attribute of service.Service.
I think that the fix here is to add a new attribute to track whether the process should be running.
Note: See
TracTickets for help on using
tickets.
![[Buildbot Logo]](/chrome/site/header-text-transparent.png)
This is probably best handled by using twisted.conch to connect to the server, instead of calling out to ssh as a seperate process.