Fix register instance with customized cluster name failed bug.

This commit is contained in:
nkorange 2018-10-25 15:56:02 +08:00
parent 855037cac6
commit abdc48fc84
14 changed files with 14 additions and 14 deletions

View File

@ -16,7 +16,7 @@
<parent> <parent>
<groupId>com.alibaba.nacos</groupId> <groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId> <artifactId>nacos-all</artifactId>
<version>0.2.0-SM-SNAPSHOT</version> <version>0.3.0-RC1</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -33,7 +33,7 @@ public class Cluster {
/** /**
* Name of cluster * Name of cluster
*/ */
private String name = Constants.NAMING_DEFAULT_CLUSTER_NAME; private String name;
/** /**
* Health check config of this cluster * Health check config of this cluster

View File

@ -16,7 +16,7 @@
<parent> <parent>
<groupId>com.alibaba.nacos</groupId> <groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId> <artifactId>nacos-all</artifactId>
<version>0.2.0-SM-SNAPSHOT</version> <version>0.3.0-RC1</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

View File

@ -18,7 +18,7 @@
<parent> <parent>
<groupId>com.alibaba.nacos</groupId> <groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId> <artifactId>nacos-all</artifactId>
<version>0.2.0-SM-SNAPSHOT</version> <version>0.3.0-RC1</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -17,7 +17,7 @@
<parent> <parent>
<groupId>com.alibaba.nacos</groupId> <groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId> <artifactId>nacos-all</artifactId>
<version>0.2.0-SM-SNAPSHOT</version> <version>0.3.0-RC1</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -18,7 +18,7 @@
<parent> <parent>
<groupId>com.alibaba.nacos</groupId> <groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId> <artifactId>nacos-all</artifactId>
<version>0.2.0-SM-SNAPSHOT</version> <version>0.3.0-RC1</version>
</parent> </parent>
<artifactId>nacos-console</artifactId> <artifactId>nacos-console</artifactId>
<!--<packaging>war</packaging>--> <!--<packaging>war</packaging>-->

View File

@ -18,7 +18,7 @@
<parent> <parent>
<groupId>com.alibaba.nacos</groupId> <groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId> <artifactId>nacos-all</artifactId>
<version>0.2.0-SM-SNAPSHOT</version> <version>0.3.0-RC1</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

View File

@ -18,7 +18,7 @@
<parent> <parent>
<groupId>com.alibaba.nacos</groupId> <groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId> <artifactId>nacos-all</artifactId>
<version>0.2.0-SM-SNAPSHOT</version> <version>0.3.0-RC1</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

View File

@ -18,7 +18,7 @@
<parent> <parent>
<groupId>com.alibaba.nacos</groupId> <groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId> <artifactId>nacos-all</artifactId>
<version>0.2.0-SM-SNAPSHOT</version> <version>0.3.0-RC1</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

View File

@ -18,7 +18,7 @@
<parent> <parent>
<groupId>com.alibaba.nacos</groupId> <groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId> <artifactId>nacos-all</artifactId>
<version>0.2.0-SM-SNAPSHOT</version> <version>0.3.0-RC1</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

View File

@ -305,7 +305,7 @@ public class IpAddress extends Instance implements Comparable {
} }
public String generateInstanceId() { public String generateInstanceId() {
return getIp() + "#" + getPort() + "#" + getCluster().getName() + "#" + getService().getName(); return getIp() + "#" + getPort() + "#" + getClusterName() + "#" + getService().getName();
} }
@Override @Override

View File

@ -1203,7 +1203,6 @@ public class ApiCommands {
ipObj.put("metadata", ip.getMetadata()); ipObj.put("metadata", ip.getMetadata());
ipObj.put("enabled", ip.isEnabled()); ipObj.put("enabled", ip.isEnabled());
ipObj.put("weight", ip.getWeight()); ipObj.put("weight", ip.getWeight());
hosts.add(ipObj); hosts.add(ipObj);
} }
@ -1216,6 +1215,7 @@ public class ApiCommands {
result.put("lastRefTime", System.currentTimeMillis()); result.put("lastRefTime", System.currentTimeMillis());
result.put("checksum", domObj.getChecksum() + System.currentTimeMillis()); result.put("checksum", domObj.getChecksum() + System.currentTimeMillis());
result.put("useSpecifiedURL", false); result.put("useSpecifiedURL", false);
result.put("clusters", clusters);
result.put("env", env); result.put("env", env);
result.put("metadata",domObj.getMetadata()); result.put("metadata",domObj.getMetadata());
return result; return result;

View File

@ -21,7 +21,7 @@
<inceptionYear>2018</inceptionYear> <inceptionYear>2018</inceptionYear>
<groupId>com.alibaba.nacos</groupId> <groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId> <artifactId>nacos-all</artifactId>
<version>0.2.0-SM-SNAPSHOT</version> <version>0.3.0-RC1</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>Alibaba NACOS ${project.version}</name> <name>Alibaba NACOS ${project.version}</name>

View File

@ -17,7 +17,7 @@
<parent> <parent>
<groupId>com.alibaba.nacos</groupId> <groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId> <artifactId>nacos-all</artifactId>
<version>0.2.0-SM-SNAPSHOT</version> <version>0.3.0-RC1</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>