summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Basti <mbasti@redhat.com>2016-04-29 17:13:55 +0200
committerMartin Basti <mbasti@redhat.com>2016-05-12 11:16:01 +0200
commitab2ebf489fa5afb57e5f49a8c025d555f583eb1a (patch)
treea8aba5e41d57c84b56193ffc7a1a8e652eb81859
parent2df25cb359723dd72077c60a12bc037d5c77f931 (diff)
downloadfreeipa-ab2ebf489fa5afb57e5f49a8c025d555f583eb1a.tar.gz
freeipa-ab2ebf489fa5afb57e5f49a8c025d555f583eb1a.tar.xz
freeipa-ab2ebf489fa5afb57e5f49a8c025d555f583eb1a.zip
ipactl: advertise --ignore-service-failure option
For non-critical services which are failing may be beneficial for users to ignore them and let IPA critical services start. For this a hint to use --ignore-service-failue option should be shown. https://fedorahosted.org/freeipa/ticket/5820 Reviewed-By: Stanislav Laznicka <slaznick@redhat.com> Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
-rwxr-xr-xinstall/tools/ipactl10
1 files changed, 10 insertions, 0 deletions
diff --git a/install/tools/ipactl b/install/tools/ipactl
index b41b10c8a..ccd3e437e 100755
--- a/install/tools/ipactl
+++ b/install/tools/ipactl
@@ -38,6 +38,13 @@ from ipapython.dn import DN
from ipaplatform import services
from ipaplatform.paths import paths
+
+MSG_HINT_IGNORE_SERVICE_FAILURE = (
+ "Hint: You can use --ignore-service-failure option for forced start in "
+ "case that a non-critical service failed"
+)
+
+
class IpactlError(ScriptError):
pass
@@ -314,6 +321,7 @@ def ipa_start(options):
stop_services(svc_list)
stop_dirsrv(dirsrv)
+ emit_err(MSG_HINT_IGNORE_SERVICE_FAILURE)
raise IpactlError("Aborting ipactl")
def ipa_stop(options):
@@ -456,6 +464,7 @@ def ipa_restart(options):
stop_services(svc_list)
stop_dirsrv(dirsrv)
+ emit_err(MSG_HINT_IGNORE_SERVICE_FAILURE)
raise IpactlError("Aborting ipactl")
if len(new_svc_list) != 0:
@@ -478,6 +487,7 @@ def ipa_restart(options):
stop_services(svc_list)
stop_dirsrv(dirsrv)
+ emit_err(MSG_HINT_IGNORE_SERVICE_FAILURE)
raise IpactlError("Aborting ipactl")
def ipa_status(options):