Clarify error message about missing DNS component in ipa-replica-prepare.

https://fedorahosted.org/freeipa/ticket/4188

Reviewed-By: Petr Viktorin <pviktori@redhat.com>
This commit is contained in:
Petr Spacek
2014-02-21 14:48:05 +01:00
committed by Petr Viktorin
parent 70e2217d73
commit dd55e13aa9

View File

@@ -202,8 +202,11 @@ class ReplicaPrepare(admintool.AdminTool):
if not dns_container_exists(api.env.host, api.env.basedn, if not dns_container_exists(api.env.host, api.env.basedn,
dm_password=self.dirman_password, dm_password=self.dirman_password,
ldapi=True, realm=api.env.realm): ldapi=True, realm=api.env.realm):
raise admintool.ScriptError("You can't add a DNS record " self.log.error(
"because DNS is not set up.") "It is not possible to add a DNS record automatically "
"because DNS is not managed by IPA. Please create DNS "
"record manually and then omit --ip-address option.")
raise admintool.ScriptError("Cannot add DNS record")
if options.reverse_zone and not bindinstance.verify_reverse_zone( if options.reverse_zone and not bindinstance.verify_reverse_zone(
options.reverse_zone, options.ip_address): options.reverse_zone, options.ip_address):
raise admintool.ScriptError("Invalid reverse zone") raise admintool.ScriptError("Invalid reverse zone")