From c35abcd831c5b1c96e8ffa9b3cc64ef2f51fb7e1 Mon Sep 17 00:00:00 2001 From: Siddharth Wagle Date: Fri, 26 Apr 2019 12:38:24 +0200 Subject: [PATCH] HDDS-999. Make the DNS resolution in OzoneManager more resilient Closes #758 --- .../dist/src/main/compose/ozone-hdfs/docker-compose.yaml | 1 - .../dist/src/main/compose/ozone-om-ha/docker-compose.yaml | 3 --- .../dist/src/main/compose/ozone-recon/docker-compose.yaml | 1 - .../dist/src/main/compose/ozone/docker-compose.yaml | 1 - .../dist/src/main/compose/ozonefs/docker-compose.yaml | 1 - .../dist/src/main/compose/ozoneperf/docker-compose.yaml | 1 - .../dist/src/main/compose/ozones3/docker-compose.yaml | 1 - .../src/main/compose/ozonesecure-mr/docker-compose.yaml | 1 - .../dist/src/main/compose/ozonesecure/docker-compose.yaml | 1 - .../dist/src/main/compose/ozonetrace/docker-compose.yaml | 1 - hadoop-ozone/dist/src/main/k8s/ozone/om-statefulset.yaml | 6 ------ .../main/java/org/apache/hadoop/ozone/om/OzoneManager.java | 2 +- 12 files changed, 1 insertion(+), 19 deletions(-) diff --git a/hadoop-ozone/dist/src/main/compose/ozone-hdfs/docker-compose.yaml b/hadoop-ozone/dist/src/main/compose/ozone-hdfs/docker-compose.yaml index e44a7bd43d..ad096c349d 100644 --- a/hadoop-ozone/dist/src/main/compose/ozone-hdfs/docker-compose.yaml +++ b/hadoop-ozone/dist/src/main/compose/ozone-hdfs/docker-compose.yaml @@ -44,7 +44,6 @@ services: - 9874:9874 environment: ENSURE_OM_INITIALIZED: /data/metadata/om/current/VERSION - WAITFOR: scm:9876 env_file: - ./docker-config command: ["ozone","om"] diff --git a/hadoop-ozone/dist/src/main/compose/ozone-om-ha/docker-compose.yaml b/hadoop-ozone/dist/src/main/compose/ozone-om-ha/docker-compose.yaml index d0e4b6552a..9628990d0e 100644 --- a/hadoop-ozone/dist/src/main/compose/ozone-om-ha/docker-compose.yaml +++ b/hadoop-ozone/dist/src/main/compose/ozone-om-ha/docker-compose.yaml @@ -36,7 +36,6 @@ services: - 9890:9872 environment: ENSURE_OM_INITIALIZED: /data/metadata/om/current/VERSION - WAITFOR: scm:9876 env_file: - ./docker-config command: ["/opt/hadoop/bin/ozone","om"] @@ -50,7 +49,6 @@ services: - 9892:9872 environment: ENSURE_OM_INITIALIZED: /data/metadata/om/current/VERSION - WAITFOR: scm:9876 env_file: - ./docker-config command: ["/opt/hadoop/bin/ozone","om"] @@ -64,7 +62,6 @@ services: - 9894:9872 environment: ENSURE_OM_INITIALIZED: /data/metadata/om/current/VERSION - WAITFOR: scm:9876 env_file: - ./docker-config command: ["/opt/hadoop/bin/ozone","om"] diff --git a/hadoop-ozone/dist/src/main/compose/ozone-recon/docker-compose.yaml b/hadoop-ozone/dist/src/main/compose/ozone-recon/docker-compose.yaml index dd0abef939..7aad15b2ed 100644 --- a/hadoop-ozone/dist/src/main/compose/ozone-recon/docker-compose.yaml +++ b/hadoop-ozone/dist/src/main/compose/ozone-recon/docker-compose.yaml @@ -36,7 +36,6 @@ services: - 9874:9874 environment: ENSURE_OM_INITIALIZED: /data/metadata/om/current/VERSION - WAITFOR: scm:9876 env_file: - ./docker-config command: ["/opt/hadoop/bin/ozone","om"] diff --git a/hadoop-ozone/dist/src/main/compose/ozone/docker-compose.yaml b/hadoop-ozone/dist/src/main/compose/ozone/docker-compose.yaml index ebbcd5cbb6..8ceda47d76 100644 --- a/hadoop-ozone/dist/src/main/compose/ozone/docker-compose.yaml +++ b/hadoop-ozone/dist/src/main/compose/ozone/docker-compose.yaml @@ -36,7 +36,6 @@ services: - 9874:9874 environment: ENSURE_OM_INITIALIZED: /data/metadata/om/current/VERSION - WAITFOR: scm:9876 env_file: - ./docker-config command: ["/opt/hadoop/bin/ozone","om"] diff --git a/hadoop-ozone/dist/src/main/compose/ozonefs/docker-compose.yaml b/hadoop-ozone/dist/src/main/compose/ozonefs/docker-compose.yaml index ce5de8cf73..86d7aed8e9 100644 --- a/hadoop-ozone/dist/src/main/compose/ozonefs/docker-compose.yaml +++ b/hadoop-ozone/dist/src/main/compose/ozonefs/docker-compose.yaml @@ -34,7 +34,6 @@ services: - 9874 environment: ENSURE_OM_INITIALIZED: /data/metadata/om/current/VERSION - WAITFOR: scm:9876 env_file: - ./docker-config command: ["/opt/hadoop/bin/ozone","om"] diff --git a/hadoop-ozone/dist/src/main/compose/ozoneperf/docker-compose.yaml b/hadoop-ozone/dist/src/main/compose/ozoneperf/docker-compose.yaml index 4f5230b66d..768ec4ba1b 100644 --- a/hadoop-ozone/dist/src/main/compose/ozoneperf/docker-compose.yaml +++ b/hadoop-ozone/dist/src/main/compose/ozoneperf/docker-compose.yaml @@ -33,7 +33,6 @@ services: - 9874:9874 environment: ENSURE_OM_INITIALIZED: /data/metadata/om/current/VERSION - WAITFOR: scm:9876 env_file: - ./docker-config command: ["ozone","om"] diff --git a/hadoop-ozone/dist/src/main/compose/ozones3/docker-compose.yaml b/hadoop-ozone/dist/src/main/compose/ozones3/docker-compose.yaml index 343b5d7c8d..c18aba346b 100644 --- a/hadoop-ozone/dist/src/main/compose/ozones3/docker-compose.yaml +++ b/hadoop-ozone/dist/src/main/compose/ozones3/docker-compose.yaml @@ -33,7 +33,6 @@ services: - 9874:9874 environment: ENSURE_OM_INITIALIZED: /data/metadata/om/current/VERSION - WAITFOR: scm:9876 env_file: - ./docker-config command: ["ozone","om"] diff --git a/hadoop-ozone/dist/src/main/compose/ozonesecure-mr/docker-compose.yaml b/hadoop-ozone/dist/src/main/compose/ozonesecure-mr/docker-compose.yaml index 299b881859..5f8d1bff32 100644 --- a/hadoop-ozone/dist/src/main/compose/ozonesecure-mr/docker-compose.yaml +++ b/hadoop-ozone/dist/src/main/compose/ozonesecure-mr/docker-compose.yaml @@ -49,7 +49,6 @@ services: ports: - 9874:9874 environment: - WAITFOR: scm:9876 ENSURE_OM_INITIALIZED: /data/metadata/om/current/VERSION env_file: - docker-config diff --git a/hadoop-ozone/dist/src/main/compose/ozonesecure/docker-compose.yaml b/hadoop-ozone/dist/src/main/compose/ozonesecure/docker-compose.yaml index e866c01155..65cf15b4aa 100644 --- a/hadoop-ozone/dist/src/main/compose/ozonesecure/docker-compose.yaml +++ b/hadoop-ozone/dist/src/main/compose/ozonesecure/docker-compose.yaml @@ -51,7 +51,6 @@ services: ports: - 9874:9874 environment: - WAITFOR: scm:9876 ENSURE_OM_INITIALIZED: /data/metadata/om/current/VERSION env_file: - docker-config diff --git a/hadoop-ozone/dist/src/main/compose/ozonetrace/docker-compose.yaml b/hadoop-ozone/dist/src/main/compose/ozonetrace/docker-compose.yaml index 3eb656ed52..c676e57ec3 100644 --- a/hadoop-ozone/dist/src/main/compose/ozonetrace/docker-compose.yaml +++ b/hadoop-ozone/dist/src/main/compose/ozonetrace/docker-compose.yaml @@ -39,7 +39,6 @@ services: - 9874:9874 environment: ENSURE_OM_INITIALIZED: /data/metadata/om/current/VERSION - WAITFOR: scm:9876 env_file: - ./docker-config command: ["ozone","om"] diff --git a/hadoop-ozone/dist/src/main/k8s/ozone/om-statefulset.yaml b/hadoop-ozone/dist/src/main/k8s/ozone/om-statefulset.yaml index 08d6089dd2..e9eeea8bcb 100644 --- a/hadoop-ozone/dist/src/main/k8s/ozone/om-statefulset.yaml +++ b/hadoop-ozone/dist/src/main/k8s/ozone/om-statefulset.yaml @@ -43,9 +43,6 @@ spec: - ozone - om - --init - env: - - name: "WAITFOR" - value: "scm-0.scm:9876" volumeMounts: - name: "data" mountPath: "/data" @@ -58,9 +55,6 @@ spec: args: - ozone - om - env: - - name: "WAITFOR" - value: "scm-0.scm:9876" volumeMounts: - name: "data" mountPath: "/data" diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java index 0d7dc80302..c147346030 100644 --- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java +++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java @@ -302,7 +302,7 @@ private OzoneManager(OzoneConfiguration conf) throws IOException, // For testing purpose only, not hit scm from om as Hadoop UGI can't login // two principals in the same JVM. if (!testSecureOmFlag) { - ScmInfo scmInfo = scmBlockClient.getScmInfo(); + ScmInfo scmInfo = getScmInfo(configuration); if (!(scmInfo.getClusterId().equals(omStorage.getClusterID()) && scmInfo .getScmId().equals(omStorage.getScmId()))) { throw new OMException("SCM version info mismatch.",