Project

General

Profile

Actions

Bug #51262

closed

Bug #45434: qa: test_full_fsync (tasks.cephfs.test_full.TestClusterFull) failed

test_full.py test has incorrect assumption

Added by Jeff Layton almost 3 years ago. Updated almost 3 years ago.

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

0%

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

Description

Snippet from test_full.py:

            # Okay, now we're going to fill up the filesystem, and then keep
            # writing until we see an error from fsync.  As long as we're doing
            # buffered IO, the error should always only appear from fsync and not
            # from write
            full = False

            for n in range(0, int({fill_mb} * 1.1)):
                try:
                    bytes += os.write(f, b'x' * 1024 * 1024)
                    print("wrote bytes via buffered write, moving on to fsync")
                except OSError as e:
                    print("Unexpected error %s from write() instead of fsync()" % e)
                    raise

The comment and exception handling are wrong here. It's quite possible that we'll see an error on write instead of fsync in this scenario. The dirty data gets written back in the background and when there are writeback errors (like ENOSPC), the client will switch to doing synchronous writes.

Actions #1

Updated by Jeff Layton almost 3 years ago

  • Status changed from New to Duplicate
  • Parent task set to #45434
Actions

Also available in: Atom PDF