Fix chattr/cleanup failure

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
This commit is contained in:
Brian Behlendorf 2017-10-11 09:15:44 -07:00 committed by Tony Hutter
parent e0eaaf8144
commit 6e893ef62a
1 changed files with 1 additions and 1 deletions

View File

@ -2255,7 +2255,7 @@ function del_user #<logname> <basedir>
fi fi
if id $user > /dev/null 2>&1; then if id $user > /dev/null 2>&1; then
log_must userdel $user log_must_retry "currently used" 5 userdel $user
fi fi
[[ -d $basedir/$user ]] && rm -fr $basedir/$user [[ -d $basedir/$user ]] && rm -fr $basedir/$user