Sfoglia il codice sorgente

AMBARI-14178. Can not to enable custom hostnames for agents (aonishuk)

Andrew Onishuk 9 anni fa
parent
commit
5d1f56df8f
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2 0
      ambari-agent/src/main/python/ambari_agent/hostname.py

+ 2 - 0
ambari-agent/src/main/python/ambari_agent/hostname.py

@@ -78,6 +78,8 @@ def public_hostname(config):
         cached_public_hostname = out.strip().lower()
         cached_public_hostname = out.strip().lower()
         logger.info("Read public hostname '" + cached_public_hostname + "' using agent:public_hostname_script")
         logger.info("Read public hostname '" + cached_public_hostname + "' using agent:public_hostname_script")
         return cached_public_hostname
         return cached_public_hostname
+      else:
+        logger.warn("Execution of '{0}' returned {1}. {2}\n{3}".format(scriptname, output.returncode, err.strip(), out.strip()))
   except:
   except:
     #ignore for now.
     #ignore for now.
     trace_info = traceback.format_exc()
     trace_info = traceback.format_exc()