summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2017-12-02 06:10:26 +0000
committerGerrit Code Review <review@openstack.org>2017-12-02 06:10:26 +0000
commit3d1fe4ab41ab671ff647dfeffec396a80e095135 (patch)
tree9b600d303cd02f21cf646b494f14bdae0828b1ca
parentc06eea8edd78e5a6148907ce47cbd02ac5072e24 (diff)
parent6d494857705c1e49648fc9139a8a6ca9eb7edd12 (diff)
Merge "Add timestamp to cluster instance name"
-rw-r--r--trove/common/strategies/cluster/experimental/galera_common/api.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/trove/common/strategies/cluster/experimental/galera_common/api.py b/trove/common/strategies/cluster/experimental/galera_common/api.py
index c5bc0f8..ab030f9 100644
--- a/trove/common/strategies/cluster/experimental/galera_common/api.py
+++ b/trove/common/strategies/cluster/experimental/galera_common/api.py
@@ -15,6 +15,7 @@
15from novaclient import exceptions as nova_exceptions 15from novaclient import exceptions as nova_exceptions
16from oslo_log import log as logging 16from oslo_log import log as logging
17 17
18import time
18 19
19from trove.cluster import models as cluster_models 20from trove.cluster import models as cluster_models
20from trove.cluster.tasks import ClusterTasks 21from trove.cluster.tasks import ClusterTasks
@@ -101,7 +102,7 @@ class GaleraCommonCluster(cluster_models.Cluster):
101 configuration_id): 102 configuration_id):
102 member_config = {"id": db_info.id, 103 member_config = {"id": db_info.id,
103 "instance_type": "member"} 104 "instance_type": "member"}
104 name_index = 1 105 name_index = int(time.time())
105 for instance in instances: 106 for instance in instances:
106 if not instance.get("name"): 107 if not instance.get("name"):
107 instance['name'] = "%s-member-%s" % (db_info.name, 108 instance['name'] = "%s-member-%s" % (db_info.name,