mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Improve ipa-replica-prepare DNS check
Currently, verify_fqdn() function raises RuntimeError for every problem with the hostname. This makes it difficult for tools like ipa-replica-prepare to behave differently for a subset of raised errors (for example to be able to create a DNS record for new replica when verify_fqdn() reports a lookup error). Implement own exceptions for verify_fqdn() that they can be safely used to distinguish the error type. https://fedorahosted.org/freeipa/ticket/1899
This commit is contained in:
@@ -30,7 +30,7 @@ from ipaserver.install import installutils, service
|
||||
from ipaserver.install import certs
|
||||
from ipaserver.install.installutils import HostnameLocalhost
|
||||
from ipaserver.install.installutils import ReplicaConfig, expand_replica_info, read_replica_info
|
||||
from ipaserver.install.installutils import get_host_name
|
||||
from ipaserver.install.installutils import get_host_name, BadHostError
|
||||
from ipaserver.install import dsinstance, cainstance
|
||||
from ipaserver.install.replication import replica_conn_check
|
||||
from ipapython import version
|
||||
@@ -119,7 +119,7 @@ def main():
|
||||
config.dirman_password = dirman_password
|
||||
try:
|
||||
host = get_host_name(options.no_host_dns)
|
||||
except RuntimeError, e:
|
||||
except BadHostError, e:
|
||||
logging.error(str(e))
|
||||
sys.exit(1)
|
||||
if config.host_name != host:
|
||||
|
||||
Reference in New Issue
Block a user