Project

General

Profile

Actions

Bug #51369

closed

vstart_runner: use FileNotFoundError instead of OSError

Added by Rishabh Dave almost 3 years ago. Updated 3 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
% Done:

100%

Source:
Tags:
backport_processed
Backport:
pacific
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Found a py3 compatibility-related TODO in vstart_runner.py's clear_old_log() -

    from os import stat

    try:
        stat(logpath)
    # would need an update when making this py3 compatible. Use FileNotFound
    # instead.
    except OSError:
        return
    else:
        os.remove(logpath)
        with open(logpath, 'w') as logfile:
            logfile.write('')
        init_log()
        log.debug('logging in a fresh file now...')

Related issues 1 (0 open1 closed)

Copied to Ceph - Backport #51653: pacific: vstart_runner: use FileNotFoundError instead of OSErrorResolvedKonstantin ShalyginActions
Actions #1

Updated by Rishabh Dave almost 3 years ago

I suppose it's best to backport this fix to avoid re-discovery of this bug?

Actions #2

Updated by Rishabh Dave almost 3 years ago

  • Status changed from In Progress to Fix Under Review
  • Pull request ID set to 42029
Actions #3

Updated by Patrick Donnelly almost 3 years ago

  • Status changed from Fix Under Review to Pending Backport
  • Assignee set to Rishabh Dave
  • Target version set to v17.0.0
  • Source set to Development
  • Backport set to pacific
Actions #4

Updated by Patrick Donnelly almost 3 years ago

  • Tracker changed from Bug to Cleanup
Actions #5

Updated by Backport Bot almost 3 years ago

  • Copied to Backport #51653: pacific: vstart_runner: use FileNotFoundError instead of OSError added
Actions #6

Updated by Backport Bot over 1 year ago

  • Tags set to backport_processed
Actions #7

Updated by Konstantin Shalygin 3 months ago

  • Tracker changed from Cleanup to Bug
  • Status changed from Pending Backport to Resolved
  • % Done changed from 0 to 100
  • Regression set to No
  • Severity set to 3 - minor
Actions

Also available in: Atom PDF