Swift daemons die when syslog stops running
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Object Storage (swift) |
Expired
|
Undecided
|
Unassigned |
Bug Description
We noticed that on a machine running swift 1.7.5, the replicator, updater and auditor processes die as a side effect of rsyslogd crashing. This only happens if the swift processes are started while rsyslog is running (so swift.common.
Running the object-replicator in the foreground and then stopping rsyslog while object-replicator is running, we get:
-------
Starting object-
object-replicator Starting object replicator in daemon mode.
object-replicator Starting object replication pass.
object-replicator 775/775 (100.00%) partitions replicated in 4.76s (162.68/sec, 0s remaining)
object-replicator 70578 suffixes checked - 0.00% hashed, 0.00% synced
object-replicator Partition times: max 0.0290s, min 0.0040s, med 0.0047s
object-replicator Object replication complete. (0.08 minutes)
object-replicator Starting object replication pass.
object-replicator 775/775 (100.00%) partitions replicated in 4.72s (164.15/sec, 0s remaining)
object-replicator 70578 suffixes checked - 0.00% hashed, 0.00% synced
object-replicator Partition times: max 0.0241s, min 0.0041s, med 0.0047s
object-replicator Object replication complete. (0.08 minutes)
Error in sys.excepthook:
Original exception was:
-------
It seems that run-time exceptions occuring during calls to the logging system are not handled gracefully. Furthermore, the catch-all sys.excepthook (overriden in swift.common.
I think we should add a little change in capture_stdio:
logger. critical( _('UNCAUGHT EXCEPTION'), exc_info=exc_info)
if syslog works:
sys.excepthook = lambda * exc_info: \
else:
print xxxxx