Fix register instance with customized cluster name failed bug.
This commit is contained in:
parent
855037cac6
commit
abdc48fc84
@ -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>
|
||||||
|
@ -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
|
||||||
|
@ -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>
|
||||||
|
|
||||||
|
@ -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>
|
||||||
|
@ -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>
|
||||||
|
@ -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>-->
|
||||||
|
@ -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>
|
||||||
|
|
||||||
|
@ -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>
|
||||||
|
|
||||||
|
@ -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>
|
||||||
|
|
||||||
|
@ -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>
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
@ -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;
|
||||||
|
2
pom.xml
2
pom.xml
@ -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>
|
||||||
|
@ -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>
|
||||||
|
Loading…
Reference in New Issue
Block a user