Project

General

Profile

Actions

Bug #6401

closed

run.py should reopen files if they encounter transient I/O errors

Added by Will Andrews almost 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2015-10-27
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

In the ZFS test suite, the test usr/src/test/zfs-tests/tests/functional/rootpool/rootpool_003_neg.ksh attempts to forcibly rename the root filesystem. This has the side effect of closing open file descriptors, resulting in errors such as the following (with a runfile limited to the rootpool tests):

vagrant@oi-vagrant:/opt/zfs-tests$ /opt/zfs-tests/bin/zfstest -c /tmp/runfile.run
Test: /opt/zfs-tests/tests/functional/rootpool/setup (run as root) [00:00] [PASS]
Test: /opt/zfs-tests/tests/functional/rootpool/rootpool_002_neg (run as root) [00:00] [PASS]
Traceback (most recent call last):
File "/usr/lib/python2.6/logging/__init__.py", line 800, in emit
self.flush()
File "/usr/lib/python2.6/logging/__init__.py", line 762, in flush
self.stream.flush()
IOError: [Errno 5] I/O error
Test: /opt/zfs-tests/tests/functional/rootpool/rootpool_003_neg (run as root) [00:00] [PASS]
Traceback (most recent call last):
File "/usr/lib/python2.6/logging/__init__.py", line 800, in emit
self.flush()
File "/usr/lib/python2.6/logging/__init__.py", line 762, in flush
self.stream.flush()
IOError: [Errno 5] I/O error
[..IOError instances continue until end of run regardless of original cause..]

A fix is to subclass logging.FileHandler for this utility so that it will try to reopen log files to overcome transient IOError exceptions. This is admittedly somewhat specific to the ZFS test suite, but doing something specific to that test suite seems needlessly difficult, unless this function is hidden behind a config option that is only enabled for that specific test suite.

Actions #1

Updated by Electric Monk almost 7 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 00688ee4ba3ea60a806b06503957b12281135587

commit  00688ee4ba3ea60a806b06503957b12281135587
Author: Will Andrews <will@firepipe.net>
Date:   2015-10-31T20:24:01.000Z

    6401 run.py should reopen files if they encounter transient I/O errors
    Reviewed by: John Kennedy <john.kennedy@delphix.com>
    Approved by: Matthew Ahrens <mahrens@delphix.com>

Actions

Also available in: Atom PDF