Skip to content

Commit

Permalink
provisioner election not required during import
Browse files Browse the repository at this point in the history
tendrl-bug-id: #866
  • Loading branch information
r0h4n authored Mar 15, 2018
1 parent f19a15b commit 43d544d
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions tendrl/commons/flows/import_cluster/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,26 +60,6 @@ def run(self):
'Cluster.volume_profiling_flag']
_cluster.save()

# Try to claim "provisioner/:integration_id" tag
try:
_tag = "provisioner/%s" % _cluster.integration_id
_index_key = "/indexes/tags/%s" % _tag
_node_id = json.dumps([NS.node_context.node_id])
NS._int.wclient.write(_index_key, _node_id,
prevExist=False)
# TODO(shtripat) ceph-installer is auto detected and
# provisioner/$integration_id
# tag is set , below is not required for ceph
current_tags = list(NS.node_context.tags)
new_tags = ['provisioner/%s' % integration_id]
new_tags += current_tags
new_tags = list(set(new_tags))
if new_tags != current_tags:
NS.node_context.tags = new_tags
NS.node_context.save()
except etcd.EtcdAlreadyExist:
pass

try:
super(ImportCluster, self).run()
_cluster = NS.tendrl.objects.Cluster(
Expand Down

0 comments on commit 43d544d

Please sign in to comment.