You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2016/12/19 13:07:55 UTC

[2/2] ambari git commit: AMBARI-19233. ATS reports as down in Ambari UI after upgrade (aonishuk)

AMBARI-19233. ATS reports as down in Ambari UI after upgrade  (aonishuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0c4bd69e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0c4bd69e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0c4bd69e

Branch: refs/heads/branch-2.5
Commit: 0c4bd69e6171b4d58a465fd1fe8e837dd039c2bc
Parents: 3cea98f
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Mon Dec 19 15:07:01 2016 +0200
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Mon Dec 19 15:07:01 2016 +0200

----------------------------------------------------------------------
 ambari-agent/src/main/python/ambari_agent/main.py | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/0c4bd69e/ambari-agent/src/main/python/ambari_agent/main.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/python/ambari_agent/main.py b/ambari-agent/src/main/python/ambari_agent/main.py
index cfcd129..50e5d62 100644
--- a/ambari-agent/src/main/python/ambari_agent/main.py
+++ b/ambari-agent/src/main/python/ambari_agent/main.py
@@ -18,6 +18,13 @@ See the License for the specific language governing permissions and
 limitations under the License.
 '''
 
+def fix_encoding_reimport_bug():
+  """
+  Fix https://bugs.python.org/issue14847
+  """
+  b'x'.decode('utf-8')
+  b'x'.decode('ascii')
+
 def fix_subprocess_racecondition():
   """
   Subprocess in Python has race condition with enabling/disabling gc. Which may lead to turning off python garbage collector.
@@ -36,6 +43,7 @@ def fix_subprocess_racecondition():
   import gc
 
 fix_subprocess_racecondition()
+fix_encoding_reimport_bug()
 
 import logging.handlers
 import logging.config