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/09/12 12:10:36 UTC

[2/2] 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/534aad3f
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/534aad3f
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/534aad3f

Branch: refs/heads/branch-2.5
Commit: 534aad3f042f887b5873439ea262375402ed3ff0
Parents: f0dd1b9
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Mon Sep 12 15:10:25 2016 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Mon Sep 12 15:10:25 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/534aad3f/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 107ad7c..3afec0f 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
@@ -38,6 +38,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.