Crash from swift-drive-audit when no date at the beginning of kern.log line

Bug #1152658 reported by Jola Mirecka
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
Fix Released
Low
Jola Mirecka

Bug Description

Sometimes there is no date at the beginning of a line in kern.log. This may be caused by '\n' character in the text of a previous line. For example:

Feb 27 16:49:44 sw-aw1st13-object0001 kernel: imklog 5.8.1, log source = /proc/kmsg started.
libgcc_s.so.1 must be installed for pthread_cancel to work << no date!

Although it does not happen often, there should be a check ensuring the program doesn't crash in case this situation occurs.

Changed in swift:
assignee: nobody → Jola Mirecka (jola-mirecka)
description: updated
description: updated
description: updated
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to swift (master)

Fix proposed to branch: master
Review: https://review.openstack.org/23932

Changed in swift:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to swift (master)

Reviewed: https://review.openstack.org/23932
Committed: http://github.com/openstack/swift/commit/5e427e5e3b41ab2ddb377840f7ea196c1ba7327a
Submitter: Jenkins
Branch: master

commit 5e427e5e3b41ab2ddb377840f7ea196c1ba7327a
Author: jola-mirecka <email address hidden>
Date: Fri Mar 8 16:25:13 2013 +0000

    Add exception to swift-drive-audit if no date in line.

    Sometimes there is no date at the beginning of a line in kern.log.
    Although it does not happen often, there should be a check ensuring
    the program doesn't crash in case it happens.

    Added try-except block surrounding parsing string to date format.

    Change-Id: I44a101266582eea2199189a006afa1037a9bd4ea
    Fixes: bug #1152658

Changed in swift:
status: In Progress → Fix Committed
Changed in swift:
importance: Undecided → Low
Thierry Carrez (ttx)
Changed in swift:
milestone: none → 1.8.0-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in swift:
milestone: 1.8.0-rc1 → 1.8.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.