From 8b91d9a6e87412c36d4f1191abf15fcda0815c60 Mon Sep 17 00:00:00 2001 From: Adam Misnyovszki Date: Tue, 25 Mar 2014 14:47:03 +0100 Subject: automember rebuild nowait feature added automember-rebuild uses asynchronous 389 task, and returned success even if the task didn't run. this patch fixes this issue adding a --nowait parameter to 'ipa automember-rebuild', defaulting to False, thus when the script runs without it, it waits for the 'nstaskexitcode' attribute, which means the task has finished. Old usage can be enabled using --nowait, and returns the DN of the task for further polling. New tests added also. https://fedorahosted.org/freeipa/ticket/4239 Reviewed-By: Petr Viktorin --- ipalib/errors.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'ipalib/errors.py') diff --git a/ipalib/errors.py b/ipalib/errors.py index 311127f62..8ef35f590 100644 --- a/ipalib/errors.py +++ b/ipalib/errors.py @@ -1530,6 +1530,22 @@ class DNSDataMismatch(ExecutionError): format = _('DNS check failed: Expected {%(expected)s} got {%(got)s}') +class TaskTimeout(DatabaseError): + """ + **4213** Raised when an LDAP task times out + + For example: + + >>> raise TaskTimeout() + Traceback (most recent call last): + ... + TaskTimeout: Automember LDAP task timeout, Task DN: '' + """ + + errno = 4213 + format = _("%(task)s LDAP task timeout, Task DN: '%(task_dn)s'") + + class CertificateError(ExecutionError): """ **4300** Base class for Certificate execution errors (*4300 - 4399*). -- cgit