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

Fix chattr/cleanup failure #6749

Merged
merged 1 commit into from Oct 11, 2017
Merged

Conversation

behlendorf
Copy link
Contributor

Description

The chattr cleanup step may fail to delete the user if there is still
an active process running as that user. Retry the userdel when this
occurs to eliminate spurious false positves.

ERROR: userdel quser1 exited 8
userdel: user quser1 is currently used by process 26814

Motivation and Context

Resolve occasional automated test failures like this.

How Has This Been Tested?

Locally by running the chattr tests in a loop.

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:

  • My code follows the ZFS on Linux code style requirements.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • All commit messages are properly formatted and contain Signed-off-by.
  • Change has been approved by a ZFS on Linux member.

The chattr cleanup step may fail to delete the user if there is still
an active process running as that user.  Retry the userdel when this
occurs to eliminate spurious false positves.

  ERROR: userdel quser1 exited 8
  userdel: user quser1 is currently used by process 26814

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
@behlendorf
Copy link
Contributor Author

behlendorf commented Oct 11, 2017

Fedora 26 seems to hit this pretty frequently, the retry in the patch was verified to address this issue. Test log.

Test: /usr/share/zfs/zfs-tests/tests/functional/chattr/cleanup (run as root) [00:01] [PASS]
23:10:04.80 ERROR: userdel quser1 Retry in 1 seconds
23:10:05.88 SUCCESS: userdel quser1
23:10:05.89 SUCCESS: del_user quser1
23:10:06.04 SUCCESS: userdel quser2
23:10:06.05 SUCCESS: del_user quser2
23:10:06.11 SUCCESS: groupdel qgroup
23:10:06.12 SUCCESS: del_group qgroup
23:10:06.13 SUCCESS: clean_user_group
23:10:06.26 SUCCESS: zpool destroy -f testpool
23:10:06.28 SUCCESS: rm -rf /mnt/testdir

@behlendorf behlendorf merged commit 29e07af into openzfs:master Oct 11, 2017
@tonyhutter tonyhutter added this to PR Needed in 0.7.3 Oct 16, 2017
tonyhutter pushed a commit that referenced this pull request Oct 18, 2017
The chattr cleanup step may fail to delete the user if there is still
an active process running as that user.  Retry the userdel when this
occurs to eliminate spurious false positves.

  ERROR: userdel quser1 exited 8
  userdel: user quser1 is currently used by process 26814

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #6749
@tonyhutter tonyhutter moved this from PR Needed to Merged to 0.7.3 in 0.7.3 Oct 18, 2017
@behlendorf behlendorf deleted the chattr-cleanup branch April 19, 2021 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
0.7.3
Merged to 0.7.3
Development

Successfully merging this pull request may close these issues.

None yet

3 participants