#5115 (Production site doesn't log when supervisor is down)
by Luc Saffre · in Developers · assigned to Sharif Mehedi
Summary
Children
Comments
- 3 years, 1 month ago by Luc Saffre about #5115 (Production site doesn't log when supervisor is down) : Yes, an individual process in unable to decide whether it should start a logserver process. It can only wait until timeout and then it should raise an exception and do nothing. If the site admin decides to run some management command without a logserver then he must set use_linod to False in the set...
- 3 years, 1 month ago by Luc Saffre about #5115 (Production site doesn't log when supervisor is down) (2 replies) : Let's try to remove the check_and_start_linod() thing in lino.management.commands.__init__(). When there is no socket file for the log server, Lino sould simply write himself to the lino.log file.
- 3 years, 1 month ago by Luc Saffre about #5115 (Production site doesn't log when supervisor is down) : But what to do when we want to make our snapshot? We know that the logserver is down because we stopped supervisor, and we want Lino to write directly to the lino.log.
- 3 years, 1 month ago by Luc Saffre about #5115 (Production site doesn't log when supervisor is down) : Lino should raise an exception when use_linod is True and no log server sock file can be found.
- 3 years, 1 month ago by Luc Saffre about #5115 (Production site doesn't log when supervisor is down) : WatchedFileHandler won't help because the runworker isn't even running.
- 3 years, 1 month ago by Sharif Mehedi about #5115 (Production site doesn't log when supervisor is down) : I just replaced FileHandler with WatchedFileHandler in logging config. Let's observe how it does.
- 3 years, 1 month ago by Sharif Mehedi about #5115 (Production site doesn't log when supervisor is down) : If my hunch on my last comment is right, we can use logging.handlers.WatchedFileHandler to fix it.
- 3 years, 1 month ago by Sharif Mehedi about #5115 (Production site doesn't log when supervisor is down) : The other day, I was thinking that this may happen when logrotate changes the filename. And now I am thinking, if the log server is still logging to the "already opened"/"renamed" file (the file descriptor probably won't change even after logrotate renaming it, not sure just something we should chec...
- 3 years, 1 month ago by Luc Saffre about #5115 (Production site doesn't log when supervisor is down) : When use_linod is True, admin commands should raise an exception when the log server times out.
- 3 years, 1 month ago by Luc Saffre about #5115 (Production site doesn't log when supervisor is down) : When I upgrade a production site, I stop supervisor before making a snapshot, pulling new source code and running restore.py. All these operations aren't logged at all. I guess it is because Lino doesn't realize that the log server is down.
- 3 years, 1 month ago by Luc Saffre about #5115 (Production site doesn't log when supervisor is down) : Created new Ticket #5115 (Production site doesn't log when supervisor is down).