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/09/12 16:59:33 UTC

[07/10] ambari git commit: AMBARI-18260. Journal node restart failing on RU from dergM10 to erie on Wire Encrypted cluster (aonishuk)

AMBARI-18260. Journal node restart failing on RU from dergM10 to erie on Wire Encrypted cluster (aonishuk)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 2205f9cbb6bec08f95735310c743e17267c3abec
Parents: 1a27910
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Mon Sep 12 15:10:22 2016 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Mon Sep 12 15:10:22 2016 +0300

----------------------------------------------------------------------
 .../HDFS/2.1.0.2.0/package/scripts/utils.py            | 13 +++++++++++++
 1 file changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/2205f9cb/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/utils.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/utils.py b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/utils.py
index f6987b3..966efa2 100644
--- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/utils.py
+++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/utils.py
@@ -37,6 +37,19 @@ from resource_management.libraries.functions.show_logs import show_logs
 
 from zkfc_slave import ZkfcSlaveDefault
 
+import ssl
+from functools import wraps
+
+# patch ssl module to fix SSLv3 communication bug
+# for more info see http://stackoverflow.com/questions/9835506/urllib-urlopen-works-on-sslv3-urls-with-python-2-6-6-on-1-machine-but-not-wit
+def sslwrap(func):
+    @wraps(func)
+    def bar(*args, **kw):
+        kw['ssl_version'] = ssl.PROTOCOL_TLSv1
+        return func(*args, **kw)
+    return bar
+ssl.wrap_socket = sslwrap(ssl.wrap_socket)
+
 def safe_zkfc_op(action, env):
   """
   Idempotent operation on the zkfc process to either start or stop it.