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:
parent
523d5ce0f4
commit
29e07af5ae
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user