Swift-storage dies if rsyslog is stopped
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Swift Storage Charm |
Invalid
|
Undecided
|
Unassigned | ||
Ubuntu Cloud Archive |
Fix Released
|
Undecided
|
Unassigned | ||
Icehouse |
Won't Fix
|
Critical
|
Unassigned | ||
Kilo |
Fix Released
|
Critical
|
Unassigned | ||
Mitaka |
Fix Released
|
Critical
|
Unassigned | ||
Newton |
Fix Released
|
Undecided
|
Unassigned | ||
swift (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Trusty |
Fix Released
|
Critical
|
Unassigned | ||
Xenial |
Fix Released
|
Critical
|
Unassigned |
Bug Description
Trusty, Mitaka, Juju 1.25.11
We have a cloud where swift replicators are constantly falling over on 2 nodes. This occurs whenever rsyslog restarts, as in
https:/
https:/
https:/
rsyslog restarts are unfortunately frequent right now, due to https:/
Nodes are landscape managed and up to date but still exhibit the failure.
Not much from running swift in verbose. https:/
sosreports are uploading to https:/
[Impact]
* Stopping rsyslog causes swift daemons to crash due to overflowing the call stack when attempting to write an entry to the logging subsystem and the attempt to write to /dev/log fails. When rsyslog stops, the /dev/log socket is unavailable and results in an exception. The swift logging code attempts to log the resultant error, which again results in an exception. This continues until the stack is overflowed and the swift daemons crash. When the swift daemons crash, the object, container and account data are not able to be replicated to other storage nodes in the system, which affects the data integrity of the data being written to the system.
* The patch should be backported to stable releases in order to ensure that the data integrity of objects, accounts, and containers within Swift are not adversely affected due to failed logging subsystems.
* The uploaded patches fix the bug by only attempting to log an entry to the logging subsystem if the current call stack does not include an attempt to write to the logs. If the current call stack includes an attempt to log to the logging subsystem, the log message is dropped avoiding the recursion.
[Test Case]
* Install swift storage cluster
* Log into one of the swift storage nodes
* Ensure the swift-{
* Stop the rsyslog service
* Wait a minute
* Observe the swift-{
[Regression Potential]
* This affects the logging capabilities provided by the Swift code. Possible regressions could occur in almost any subsystem, since the logging is universal throughout the code base and could result in lost log entries in the best regression scenario and possible crashing of swift daemons in the worst case scenario. The regression potential is mitigated by the fact that this patch has already been included upstream for over a year now and no regressions have been reported against this code since.
[Other Info]
* /dev/log is not provided by the rsyslog daemon in Xenial, but this patch still applies in that any persistent exception encountered when writing to /dev/log will cause the call stack to overflow and crash the swift daemons.
Changed in swift (Ubuntu): | |
status: | New → Invalid |
tags: | added: sts |
tags: | added: sts-sru-needed |
Changed in swift (Ubuntu Trusty): | |
status: | New → Triaged |
Changed in swift (Ubuntu Xenial): | |
status: | New → Triaged |
Changed in cloud-archive: | |
status: | New → Invalid |
status: | Invalid → Fix Released |
tags: |
added: verification-done-xenial removed: verification-needed-xenial |
tags: |
added: verification-mitaka-done removed: verification-mitaka-needed |
This appears to be a bug in the Swift logging behavior not in the charm itself.
There's an upstream commit located at [0] which fixes the problem. In a nutshell, the stopping of rsyslogd in an upstart system removes the /dev/log socket, which causes the swift service's attempt to log a message to fail - which it then proceeds to attempt to log, in the syslog. This spirals out and causes the program to crash due to the infinite recursion overflowing the call stack.
[0] https:/ /github. com/openstack/ swift/commit/ 95efd3f9035ec41 41e1b182516f040 a59a3e5aa6