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 GitHub
parent 523d5ce0f4
commit 29e07af5ae

View 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