rgw: reopen ops log file on sighup#44488
Conversation
mattbenjamin
left a comment
There was a problem hiding this comment.
yup, this is needed; I'm a bit concerned about the signal delivery semantics here; @cbodley is it safe because it's registered in the thread managing the logs? i thought posix signal delivery was to the pgrp leader; I didn't refresh my memory...
well, in fact, some type of handling of the rotation case is needed. another approach I think I've used is to ignore the signal and notice (with a periodic stat of the path) whether there is a new ino (in which event you must reopen); if it actually is being truncated, you can I think just retry reads on the same timer |
|
jenkins test make check |
|
jenkins test api |
9d77cea to
fed15b8
Compare
Handles radosgw SIGHUP such that ops log file is reopened if applicable. Fixes: https://tracker.ceph.com/issues/53788 Signed-off-by: Cory Snyder <csnyder@iland.com>
fed15b8 to
f26523f
Compare
@mattbenjamin sorry i didn't reply here; i'm not sure i understand your concern. does it matter which thread is running the signal handler, if it's just setting |
Probably not? Just worrying. |
cbodley
left a comment
There was a problem hiding this comment.
looks ok to me. ops_log_file is guaranteed to exist the whole time this rgw_sighup_handler is registered, and ops_log_file->reopen() is atomic
|
jenkins test api |
Handles radosgw SIGHUP such that ops log file is reopened if applicable.
Fixes: https://tracker.ceph.com/issues/53788
Signed-off-by: Cory Snyder csnyder@iland.com
Checklist