User action locking to prevent race conditions

Version 1.54

Bugfix
Finished

If a backup is running, and you try to suspend or delete an account, interesting things can happen. New feature, internally enabled by default with: user_action_locking=30 will prevent the account from being suspended or deleted during a backup. To disable this feature, you can set it to the following in the user.conf file: user_action_locking=0 The value of the user_action_locking setting represents minutes of patience. If the lock file is older that 30 minute, DA will assume something went wrong and clear the lock so another lock can be created. Any of those 3 actions can create this lock. Whoever goes first will win. For now, deletion/suspension blocks will not be pushed to the background for later action, they'll just return a lock error, telling the caller to try again later. Note that the lock of an Account for backups only happens at the start of that account backup, not the start of the entire run. So you could issue a delete after a list of Users are being backed up (before the User is question is backed up), which will delete the User. This would then return a backup error, since the User would have vanished. T12569

Interested to try DirectAdmin? Get a 30-day Free Trial!