You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by la...@apache.org on 2015/05/13 15:39:47 UTC
stratos git commit: Fix GCE instance id issue
Repository: stratos
Updated Branches:
refs/heads/master bbda1578b -> 088b09f54
Fix GCE instance id issue
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/088b09f5
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/088b09f5
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/088b09f5
Branch: refs/heads/master
Commit: 088b09f54128ec77153310933f82d3bc7316697c
Parents: bbda157
Author: Lahiru Sandaruwan <la...@apache.org>
Authored: Wed May 13 19:09:34 2015 +0530
Committer: Lahiru Sandaruwan <la...@apache.org>
Committed: Wed May 13 19:09:34 2015 +0530
----------------------------------------------------------------------
.../services/impl/CloudControllerServiceImpl.java | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/088b09f5/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceImpl.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceImpl.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceImpl.java
index a524704..9613af4 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceImpl.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceImpl.java
@@ -584,8 +584,10 @@ public class CloudControllerServiceImpl implements CloudControllerService {
}
private String generateMemberId(String clusterId) {
- UUID memberId = UUID.randomUUID();
- return clusterId + memberId.toString();
+ UUID uuid = UUID.randomUUID();
+ //We add character 'a' here since GCE does not accept names starting with integer
+ String memberId = "a" + clusterId + uuid.toString();
+ return memberId;
}
public boolean terminateInstanceForcefully(String memberId) {
@@ -1149,8 +1151,8 @@ public class CloudControllerServiceImpl implements CloudControllerService {
}
public boolean createClusterInstance(String serviceType, String clusterId,
- String alias, String instanceId, String partitionId,
- String networkPartitionId) throws ClusterInstanceCreationException {
+ String alias, String instanceId, String partitionId,
+ String networkPartitionId) throws ClusterInstanceCreationException {
Lock lock = null;
try {
lock = CloudControllerContext.getInstance().acquireClusterContextWriteLock();