Give more user feedback around keytab issues
authorSimo Sorce <simo@redhat.com>
Wed, 7 May 2014 13:45:32 +0000 (09:45 -0400)
committerSimo Sorce <simo@redhat.com>
Wed, 7 May 2014 14:00:25 +0000 (10:00 -0400)
Signed-off-by: Simo Sorce <simo@redhat.com>
README
ipsilon/helpers/ipa.py

diff --git a/README b/README
index 78f8ee2..ae0c46f 100644 (file)
--- a/README
+++ b/README
@@ -62,6 +62,8 @@ Instances are configured to be available at https://hostname/instance
 So for a server called ipsilon.example.com, using the default installation
 options the IdP will be available at https://ipsilon.example.com/idp/
 
+The install script expects to find the keytab in /etc/httpd/conf/http.keytab
+
 NOTE: If you are installing Ipsilon in a FreeIPA[4] environment you can use the
 --ipa switch to simplify the deployment. Using the --ipa switch will allow the
 use of your IPA Kerberos administrative credentials to automatically provision
index df6717f..4948624 100755 (executable)
@@ -93,12 +93,22 @@ class Installer(object):
 
         # Check if we already have a keytab for HTTP
         if 'krb_httpd_keytab' in opts:
+            msg = "Searching for keytab in: %s" % opts['krb_httpd_keytab']
+            print >> sys.stdout, msg,
             if os.path.exists(opts['krb_httpd_keytab']):
+                print >> sys.stdout, "... Found!"
                 return
+            else:
+                print >> sys.stdout, "... Not found!"
 
+        msg = "Searching for keytab in: %s" % HTTPD_IPA_KEYTAB
+        print >> sys.stdout, msg,
         if os.path.exists(HTTPD_IPA_KEYTAB):
             opts['krb_httpd_keytab'] = HTTPD_IPA_KEYTAB
+            print >> sys.stdout, "... Found!"
             return
+        else:
+            print >> sys.stdout, "... Not found!"
 
         us = socket.gethostname()
         princ = 'HTTP/%s@%s' % (us, self.realm)
@@ -108,11 +118,14 @@ class Installer(object):
         from ipalib import errors as ipaerrors
 
         for srv in self.server:
+            msg = "Testing access to server: %s" % srv
+            print >> sys.stdout, msg,
             try:
                 server = srv
                 c = ipaldap.IPAdmin(host=server)
                 c.do_sasl_gssapi_bind()
                 del c
+                print >> sys.stdout, "... Succeeded!"
                 break
             except ipaerrors.ACIError, e:
                 # usually this error is returned when we have no
@@ -134,6 +147,9 @@ class Installer(object):
             logger.info('Cmd> %s\n%s', e.cmd, e.output)
 
         try:
+            msg = "Trying to fetch keytab[%s] for %s" % (
+                  opts['krb_httpd_keytab'], princ)
+            print >> sys.stdout, msg,
             subprocess.check_output([IPA_GETKEYTAB,
                                      '-s', server, '-p', princ,
                                      '-k', opts['krb_httpd_keytab']],