mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-22 15:13:50 -06:00
Use a unique task name for each backend in ipa-backup
The name used to be "export_%Y_%m_%d_%H_%M_%S" so if the tasks were added within the same second the second backend would fail. Add the backend name to the task name to ensure uniqueness. export_{backend}_%Y_%m_%d_%H_%M_%S Fixes: https://pagure.io/freeipa/issue/9584 Signed-off-by: Rob Crittenden <rcritten@redhat.com> Reviewed-By: Mark Reynolds <mreynolds@redhat.com>
This commit is contained in:
parent
5b3735b09d
commit
584d0cecbc
@ -501,7 +501,8 @@ class Backup(admintool.AdminTool):
|
||||
'''
|
||||
logger.info('Backing up %s in %s to LDIF', backend, instance)
|
||||
|
||||
cn = time.strftime('export_%Y_%m_%d_%H_%M_%S')
|
||||
cn = 'export_{}_{}'.format(
|
||||
backend, time.strftime('%Y_%m_%d_%H_%M_%S'))
|
||||
dn = DN(('cn', cn), ('cn', 'export'), ('cn', 'tasks'), ('cn', 'config'))
|
||||
|
||||
ldifname = '%s-%s.ldif' % (instance, backend)
|
||||
|
Loading…
Reference in New Issue
Block a user