Add hint message about --force-join option when enrollment fails

When client enrollment fails due to the fact that host entry
already exists on the server, display an message informing the
user about the possibility of using --force-join option.

https://fedorahosted.org/freeipa/ticket/3572
This commit is contained in:
Tomas Babej 2013-04-22 12:02:45 +02:00 committed by Rob Crittenden
parent cc3c543265
commit 6e8d311dac

View File

@ -2125,6 +2125,10 @@ def install(options, env, fstore, statestore):
if returncode != 0: if returncode != 0:
root_logger.error("Joining realm failed: %s", stderr) root_logger.error("Joining realm failed: %s", stderr)
if not options.force: if not options.force:
if returncode == 13:
root_logger.info("Use --force-join option to override "
"the host entry on the server "
"and force client enrollment.")
return CLIENT_INSTALL_ERROR return CLIENT_INSTALL_ERROR
root_logger.info("Use ipa-getkeytab to obtain a host " + root_logger.info("Use ipa-getkeytab to obtain a host " +
"principal for this server.") "principal for this server.")