race in slave/process-kerberos-renewal-principals
Created by: kouril
There's a small window where the maintained files (with principals) are either missing (deleted by rm) or potentially corrupted (when cp hasn't copy the whole file at once), see
I'd move the file delete part only at the end (for those files that are left), and for the moving data use something more atomic, eg.:
mv "{FROM_PERUN_FILE}" "
{DST_DIR}/{FILE_NAME}.conf".
$
mv "{DST_DIR}/
{FILE_NAME}.conf".$ "
{DST_DIR}/${FILE_NAME}.conf"