Project

General

Profile

Refactor #11323

Refactor PID writing, interrupt trap and daemon logging

Added by Lukas Zapletal about 4 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Category:
Core
Target version:
Difficulty:
Triaged:
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Currently, our deamonizing works as follows:

- initialize configuration, logger and plugins
- create http/https rack servers
- daemonize the main process
- start rack servers in own threads (each writes own pid file into same file)
- wait five seconds
- override interrupt signal trap
- wait for both threads to finish

Problems:

- Rack writes main process pid twice (the main process should do this on its own)
- pid file is written AFTER the main process exited (this is causing irregular warnings with systemd "not readable (yet?) after start")
- we should get rid of the 5 seconds sleep (what is this needed for)?
- when logging is setup to STDOUT it does not work (we need to error out when STDOUT is set and provide a way to configure foreman-proxy with syslog properly)


Related issues

Related to Smart Proxy - Bug #11653: stdout warning about use of "SYSLOG" logger on every startupClosed2015-09-02
Related to Smart Proxy - Bug #11654: Error logged: Unable to overwrite interrupt trap: undefined method `version' for nil:NilClassClosed2015-09-02
Related to Smart Proxy - Feature #676: Syslog supportResolved2011-02-20
Related to Smart Proxy - Refactor #12402: Configure proxy with syslog by defaultNew2015-11-05
Related to Smart Proxy - Bug #2174: Wrong log settings should have the proxy terminate on startupResolved2013-02-03

Associated revisions

Revision 335a1610 (diff)
Added by Lukas Zapletal almost 4 years ago

Fixes #11323 - fixed PID writing, interrupt trap and daemon logging

History

#1 Updated by Lukas Zapletal about 4 years ago

  • Subject changed from Refactor proxy daemonizing code to Refactor PID writing, interrupt trap and daemon logging

#2 Updated by The Foreman Bot about 4 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/smart-proxy/pull/311 added
  • Pull request deleted ()

#3 Updated by Dominic Cleal almost 4 years ago

  • Category set to Core
  • Legacy Backlogs Release (now unused) set to 63

#4 Updated by Anonymous almost 4 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#5 Updated by Dominic Cleal almost 4 years ago

  • Related to Bug #11653: stdout warning about use of "SYSLOG" logger on every startup added

#6 Updated by Dominic Cleal almost 4 years ago

  • Related to Bug #11654: Error logged: Unable to overwrite interrupt trap: undefined method `version' for nil:NilClass added

#7 Updated by Lukas Zapletal almost 4 years ago

#8 Updated by Lukas Zapletal almost 4 years ago

#9 Updated by Dmitri Dolguikh over 3 years ago

  • Related to Bug #2174: Wrong log settings should have the proxy terminate on startup added

Also available in: Atom PDF