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: harden xattr/cleanup.ksh #9358

Merged
merged 1 commit into from
Sep 25, 2019

Conversation

behlendorf
Copy link
Contributor

Motivation and Context

Improve the reliability of the test suite. This failure mode has been
observed by the CI occasionally, though I've been unable to reproduce
it locally.

http://build.zfsonlinux.org/builders/Ubuntu%2016.04%20x86_64%20%28TEST%29/builds/8661/steps/shell_9/logs/log

Description

When the xattr/cleanup.ksh script is unable to remove the test group
due to an active process then it will not call default_cleanup. This
will result in a zvol_ENOSPC/setup.ksh failure when attempting to create
the /mnt/testdir directory which will already exist.

Resolve the issue by performing the default_cleanup before removing
the test user and group to ensure this step always happens. Also
allow one more retry to further minimize the likelyhood of the
cleanup failing.

Test: /usr/share/zfs/zfs-tests/tests/functional/xattr/cleanup (run as root) [00:31] [FAIL]
22:54:51.24 userdel: user zxtr is currently used by process 5400
22:54:51.24 ERROR: userdel zxtr Retry in 1 seconds
22:54:52.25 userdel: user zxtr is currently used by process 5400
22:54:52.25 ERROR: userdel zxtr Retry in 2 seconds
22:54:54.26 userdel: user zxtr is currently used by process 5400
22:54:54.26 ERROR: userdel zxtr Retry in 4 seconds
22:54:58.27 userdel: user zxtr is currently used by process 5400
22:54:58.27 ERROR: userdel zxtr Retry in 8 seconds
22:55:06.29 userdel: user zxtr is currently used by process 5400
22:55:06.29 ERROR: userdel zxtr Retry in 16 seconds
22:55:22.30 userdel: user zxtr is currently used by process 5400
22:55:22.30 ERROR: userdel zxtr exited 8
22:55:22.31 groupdel: cannot remove the primary group of user 'zxtr'
22:55:22.31 ERROR: groupdel zfsgrp exited 8

How Has This Been Tested?

Locally by running ./scripts/zfs-tests.sh -T xattr,zvol to test the
relevant test groups.

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:

When the xattr/cleanup.ksh script is unable to remove the test group
due to an active process then it will not call default_cleanup.  This
will result in a zvol_ENOSPC/setup failure when attempting to create
the /mnt/testdir directory which will already exist.

Resolve the issue by performing the default_cleanup before removing
the test user and group to ensure this step always happens.  Also
allow one more retry to further minimize the likelyhood of the
cleanup failing.

Signed-off-by: Brian Behlendorf <[email protected]>
@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 Sep 25, 2019
@behlendorf behlendorf requested a review from a user September 25, 2019 00:16
@codecov
Copy link

codecov bot commented Sep 25, 2019

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9358      +/-   ##
==========================================
+ Coverage   79.06%   79.07%   +0.01%     
==========================================
  Files         401      401              
  Lines      122495   122495              
==========================================
+ Hits        96845    96861      +16     
+ Misses      25650    25634      -16
Flag Coverage Δ
#kernel 79.8% <ø> (+0.02%) ⬆️
#user 66.41% <ø> (-0.16%) ⬇️

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 d359e99...011192d. Read the comment docs.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Sep 25, 2019
@behlendorf behlendorf merged commit 5e5cefb into openzfs:master Sep 25, 2019
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Dec 24, 2019
When the xattr/cleanup.ksh script is unable to remove the test group
due to an active process then it will not call default_cleanup.  This
will result in a zvol_ENOSPC/setup failure when attempting to create
the /mnt/testdir directory which will already exist.

Resolve the issue by performing the default_cleanup before removing
the test user and group to ensure this step always happens.  Also
allow one more retry to further minimize the likelihood of the
cleanup failing.

Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes openzfs#9358
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Dec 27, 2019
When the xattr/cleanup.ksh script is unable to remove the test group
due to an active process then it will not call default_cleanup.  This
will result in a zvol_ENOSPC/setup failure when attempting to create
the /mnt/testdir directory which will already exist.

Resolve the issue by performing the default_cleanup before removing
the test user and group to ensure this step always happens.  Also
allow one more retry to further minimize the likelihood of the
cleanup failing.

Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes openzfs#9358
tonyhutter pushed a commit that referenced this pull request Jan 23, 2020
When the xattr/cleanup.ksh script is unable to remove the test group
due to an active process then it will not call default_cleanup.  This
will result in a zvol_ENOSPC/setup failure when attempting to create
the /mnt/testdir directory which will already exist.

Resolve the issue by performing the default_cleanup before removing
the test user and group to ensure this step always happens.  Also
allow one more retry to further minimize the likelihood of the
cleanup failing.

Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #9358
@behlendorf behlendorf deleted the zts-xattr-cleanup branch April 19, 2021 19:25
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.

1 participant