You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by xy...@apache.org on 2019/04/03 22:42:54 UTC
[hadoop] branch ozone-0.4 updated: HDDS-1377. OM failed to start
with incorrect hostname set as ip address in CSR. (#683)
This is an automated email from the ASF dual-hosted git repository.
xyao pushed a commit to branch ozone-0.4
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/ozone-0.4 by this push:
new 3e8669c HDDS-1377. OM failed to start with incorrect hostname set as ip address in CSR. (#683)
3e8669c is described below
commit 3e8669cbe23653e712ca176dbb043978d76a66b7
Author: Xiaoyu Yao <xy...@apache.org>
AuthorDate: Wed Apr 3 11:53:51 2019 -0700
HDDS-1377. OM failed to start with incorrect hostname set as ip address in CSR. (#683)
(cherry picked from commit d6c233fce67104c1c4da802eb695526e60058536)
---
.../src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
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 f85a203..7a023bb 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
@@ -1374,6 +1374,7 @@ public final class OzoneManager extends ServiceRuntimeInfoImpl
}
// Get host name.
String hostname = omRpcAdd.getAddress().getHostName();
+ String ip = omRpcAdd.getAddress().getHostAddress();
String subject = UserGroupInformation.getCurrentUser()
.getShortUserName() + "@" + hostname;
@@ -1384,16 +1385,16 @@ public final class OzoneManager extends ServiceRuntimeInfoImpl
.setScmID(omStore.getScmId())
.setClusterID(omStore.getClusterID())
.setSubject(subject)
- .addIpAddress(hostname);
+ .addIpAddress(ip);
LOG.info("Creating csr for OM->dns:{},ip:{},scmId:{},clusterId:{}," +
- "subject:{}", hostname, omRpcAdd.getAddress().getHostAddress(),
+ "subject:{}", hostname, ip,
omStore.getScmId(), omStore.getClusterID(), subject);
HddsProtos.OzoneManagerDetailsProto.Builder omDetailsProtoBuilder =
HddsProtos.OzoneManagerDetailsProto.newBuilder()
.setHostName(omRpcAdd.getHostName())
- .setIpAddress(hostname)
+ .setIpAddress(ip)
.setUuid(omStore.getOmId())
.addPorts(HddsProtos.Port.newBuilder()
.setName(RPC_PORT)
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org