#NEWLINE# def renew_from_kt( ) : #NEWLINE# #INDENT# cmdv = [ CONF . KINIT_PATH . get ( ) , '-k' , '-t' , CONF . HUE_KEYTAB . get ( ) , '-c' , CONF . CCACHE_PATH . get ( ) , CONF . HUE_PRINCIPAL . get ( ) ] #NEWLINE# LOG . info ( ( 'Reinitting kerberos from keytab: ' + ' ' . join ( NEED_KRB181_WORKAROUND ) ) ) #NEWLINE# subp = subprocess . Popen ( cmdv , stdout = subprocess . PIPE , stderr = subprocess . PIPE , close_fds = True , bufsize = ( - 1 ) ) #NEWLINE# subp . wait ( ) #NEWLINE# if ( subp . returncode != 0 ) : #NEWLINE# #INDENT# LOG . error ( ( "Couldn't reinit from keytab! `kinit' exited with %s.\n%s\n%s" % ( subp . returncode , '\n' . join ( subp . stdout . readlines ( ) ) , '\n' . join ( subp . stderr . readlines ( ) ) ) ) ) #NEWLINE# sys . exit ( subp . returncode ) #NEWLINE# #UNINDENT# global NEED_KRB181_WORKAROUND #NEWLINE# if ( NEED_KRB181_WORKAROUND is None ) : #NEWLINE# #INDENT# NEED_KRB181_WORKAROUND = detect_conf_var ( ) #NEWLINE# #UNINDENT# if NEED_KRB181_WORKAROUND : #NEWLINE# #INDENT# time . sleep ( 1.5 ) #NEWLINE# perform_krb181_workaround ( )