You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by nc...@apache.org on 2016/12/20 14:35:07 UTC
[05/15] 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/32896cb6
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/32896cb6
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/32896cb6
Branch: refs/heads/branch-dev-patch-upgrade
Commit: 32896cb686599999b49ee30f56cc5efd9d642454
Parents: 195f3ce
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Mon Dec 19 15:06:57 2016 +0200
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Mon Dec 19 15:06:57 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/32896cb6/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 04e0c2c..f812226 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