mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
DNS update: reduce timeout for CA records
Timeout 120 seconds is quite long and it makes uninstallation too long for. Given that this is non critical operation and may be executed manually later, waiting 120 seconds is too much. Usually waiting longer will not help at all to resolve missing record. 30 seconds is long enough 🕯 https://pagure.io/freeipa/issue/6176 Reviewed-By: Tomas Krizek <tkrizek@redhat.com>
This commit is contained in:
committed by
Stanislav Laznicka
parent
ee5345ac05
commit
dffddbd2c0
@@ -55,6 +55,8 @@ IPA_DEFAULT_NTP_SRV_REC = (
|
||||
(DNSName("_ntp._udp"), 123),
|
||||
)
|
||||
|
||||
CA_RECORDS_DNS_TIMEOUT = 30 # timeout in seconds
|
||||
|
||||
|
||||
class IPADomainIsNotManagedByIPAError(Exception):
|
||||
pass
|
||||
@@ -134,7 +136,7 @@ class IPASystemRecords(object):
|
||||
assert isinstance(hostname, DNSName) and hostname.is_absolute()
|
||||
r_name = DNSName('ipa-ca') + self.domain_abs
|
||||
rrsets = []
|
||||
end_time = time() + 120 # timeout in seconds
|
||||
end_time = time() + CA_RECORDS_DNS_TIMEOUT
|
||||
while time() < end_time:
|
||||
try:
|
||||
rrsets = resolve_rrsets(hostname, (rdatatype.A, rdatatype.AAAA))
|
||||
|
||||
Reference in New Issue
Block a user