Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZTS: Fix pool_state cleanup #9777

Merged
merged 1 commit into from
Dec 28, 2019
Merged

Conversation

behlendorf
Copy link
Contributor

Motivation and Context

When running the ZTS tests in a different order it was observed that
pool_state.ksh does not wipe one of the vdev labels which can result
in the next test group failing when -f isn't used with zpool create.
In this case, several refreserv test cases failed incorrectly.

Description

The externally faulted vdev should be brought back online and have
its errors cleared before the pool is destroyed. Failure to do so
will leave a vdev with a valid active label. This vdev may then
not be used to create a new pool without the -f flag potentially
leading to subsequent test failures.

Additionally remove an unreachable log_pass from setup.ksh.

How Has This Been Tested?

Without this PR running only the procfs,refreserv test groups:

$ ./scripts/zfs-tests.sh -T procfs,refreserv
Test (Linux): /home/behlendo/src/git/zfs/tests/zfs-tests/tests/functional/procfs/setup (run as root) [00:01] [PASS]
Test (Linux): /home/behlendo/src/git/zfs/tests/zfs-tests/tests/functional/procfs/procfs_list_basic (run as root) [00:10] [PASS]
...
Tests with result of PASS that are unexpected:

Tests with results other than PASS that are unexpected:
    FAIL refreserv/refreserv_multi_raidz (expected PASS)
    FAIL refreserv/refreserv_raidz (expected PASS)

With this PR:

$ ./scripts/zfs-tests.sh -T procfs,refreserv
Test (Linux): /home/behlendo/src/git/zfs/tests/zfs-tests/tests/functional/procfs/setup (run as root) [00:01] [PASS]
Test (Linux): /home/behlendo/src/git/zfs/tests/zfs-tests/tests/functional/procfs/procfs_list_basic (run as root) [00:06] [PASS]
...
Tests with result of PASS that are unexpected:

Tests with results other than PASS that are unexpected:

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (a change to man pages or other documentation)

Checklist:

The externally faulted vdev should be brought back online and have
its errors cleared before the pool is destroyed.  Failure to do so
will leave a vdev with a valid active label.  This vdev may then
not be used to create a new pool without the -f flag potentially
leading to subsequent test failures.

Additionally remove an unreachable log_pass from setup.ksh.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
@behlendorf behlendorf added Component: Test Suite Indicates an issue with the test framework or a test case Status: Code Review Needed Ready for review and testing labels Dec 27, 2019
@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Dec 27, 2019
@codecov
Copy link

codecov bot commented Dec 28, 2019

Codecov Report

Merging #9777 into master will increase coverage by 13%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9777      +/-   ##
==========================================
+ Coverage      67%      80%     +13%     
==========================================
  Files         303      385      +82     
  Lines      104240   121475   +17235     
==========================================
+ Hits        69658    96686   +27028     
+ Misses      34582    24789    -9793
Flag Coverage Δ
#kernel 80% <ø> (?)
#user 67% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d5c97f3...b35896a. Read the comment docs.

@behlendorf behlendorf merged commit 2c47bd5 into openzfs:master Dec 28, 2019
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Jan 2, 2020
The externally faulted vdev should be brought back online and have
its errors cleared before the pool is destroyed.  Failure to do so
will leave a vdev with a valid active label.  This vdev may then
not be used to create a new pool without the -f flag potentially
leading to subsequent test failures.

Additionally remove an unreachable log_pass from setup.ksh.

Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Kjeld Schouten <kjeld@schouten-lebbing.nl>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#9777
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Jan 7, 2020
The externally faulted vdev should be brought back online and have
its errors cleared before the pool is destroyed.  Failure to do so
will leave a vdev with a valid active label.  This vdev may then
not be used to create a new pool without the -f flag potentially
leading to subsequent test failures.

Additionally remove an unreachable log_pass from setup.ksh.

Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Kjeld Schouten <kjeld@schouten-lebbing.nl>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#9777
tonyhutter pushed a commit that referenced this pull request Jan 23, 2020
The externally faulted vdev should be brought back online and have
its errors cleared before the pool is destroyed.  Failure to do so
will leave a vdev with a valid active label.  This vdev may then
not be used to create a new pool without the -f flag potentially
leading to subsequent test failures.

Additionally remove an unreachable log_pass from setup.ksh.

Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Kjeld Schouten <kjeld@schouten-lebbing.nl>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #9777
@behlendorf behlendorf deleted the zts-pool_state branch April 19, 2021 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Test Suite Indicates an issue with the test framework or a test case Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants