swift-drive-audit crash when kern.log is empty

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

Bug Description

swift-drive-audit tool crashes if kern.log is empty. A change needs to be done to check whether it is empty before proceeding.

Console output while crash:
Traceback (most recent call last):
  File "./bin/swift-drive-audit", line 114, in <module>
    errors = get_errors(minutes)
  File "./bin/swift-drive-audit", line 66, in get_errors
    for line in open('/var/log/kern.log'):
IOError: [Errno 2] No such file or directory: '/var/log/kern.log'

Changed in swift:
assignee: nobody → Andy McCrae (andrew-mccrae)
Changed in swift:
assignee: Andy McCrae (andrew-mccrae) → Jola Mirecka (jola-mirecka)
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/12786

Changed in swift:
assignee: Jola Mirecka (jola-mirecka) → Andy McCrae (andrew-mccrae)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to swift (master)

Reviewed: https://review.openstack.org/12786
Committed: http://github.com/openstack/swift/commit/463da7e170bb185fd80862c948ab73d24ed7f9d5
Submitter: Jenkins
Branch: master

commit 463da7e170bb185fd80862c948ab73d24ed7f9d5
Author: Andy McCrae <email address hidden>
Date: Tue Sep 11 14:22:11 2012 +0000

    Adds Error Handling to swift-drive-audit for missing or unreadable /var/log/kern.log

    Fixes Bug 1049081

    Change-Id: If977080350cc5cdb6bc633b6af7d3c490ed23d46

Changed in swift:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in swift:
milestone: none → 1.7.5
status: Fix Committed → Fix Released
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.