]> granicus.if.org Git - zfs/commitdiff
Fix chattr/cleanup failure
authorBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 11 Oct 2017 16:15:44 +0000 (09:15 -0700)
committerGitHub <noreply@github.com>
Wed, 11 Oct 2017 16:15:44 +0000 (09:15 -0700)
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

tests/zfs-tests/include/libtest.shlib

index d72ebc8edc0e40b3467724a0d2cac3af55ee360d..14348d7c6058774c81cb0148b8c5516e233765ee 100644 (file)
@@ -2296,7 +2296,7 @@ function del_user #<logname> <basedir>
        fi
 
        if id $user > /dev/null 2>&1; then
-               log_must userdel $user
+               log_must_retry "currently used" 5 userdel $user
        fi
 
        [[ -d $basedir/$user ]] && rm -fr $basedir/$user