Skip to content

Commit

Permalink
Set the enableMultipleHostTypes cluster field to False in the Teletra…
Browse files Browse the repository at this point in the history
…an UI when sending to Rodimus (ensuring the backend remains stable) (#1700)

Co-authored-by: Yaqin Li <[email protected]>
  • Loading branch information
liyaqin1 and Yaqin Li authored Aug 21, 2024
1 parent 570f268 commit 4186163
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions deploy-board/deploy_board/webapp/cluster_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ def post(self, request, name, stage):
request, name, stage, capacity_type="GROUP", data=cluster_name)

cluster_info['statefulStatus'] = clusters_helper.StatefulStatuses.get_status(cluster_info['statefulStatus'])
cluster_info['enableMultipleHostTypes'] = False
clusters_helper.create_cluster_with_env(request, cluster_name, name, stage, cluster_info)
except NotAuthorizedException as e:
log.error("Have an NotAuthorizedException error {}".format(e))
Expand Down Expand Up @@ -214,6 +215,7 @@ def post(self, request, name, stage):
request, name, stage, capacity_type="GROUP", data=cluster_name)

cluster_info['statefulStatus'] = clusters_helper.StatefulStatuses.get_status(cluster_info['statefulStatus'])
cluster_info['enableMultipleHostTypes'] = False
log.info("Create Capacity in the provider")
clusters_helper.create_cluster(request, cluster_name, cluster_info)
except NotAuthorizedException as e:
Expand Down Expand Up @@ -328,6 +330,7 @@ def post(self, request, name, stage):
log.error("Teletraan does not support user to remove %s %s" % (field, cluster_info[field]))
raise TeletraanException("Teletraan does not support user to remove %s" % field)
cluster_info['statefulStatus'] = clusters_helper.StatefulStatuses.get_status(cluster_info['statefulStatus'])
cluster_info['enableMultipleHostTypes'] = False
clusters_helper.update_cluster(request, cluster_name, cluster_info)
except NotAuthorizedException as e:
log.error("Have an NotAuthorizedException error {}".format(e))
Expand Down Expand Up @@ -1032,6 +1035,7 @@ def clone_cluster(request, src_name, src_stage):
# 7. rodimus service post create cluster
src_cluster_info['clusterName'] = dest_cluster_name
src_cluster_info['capacity'] = 0
src_cluster_info['enableMultipleHostTypes'] = False
log.info('clone_cluster, request clone cluster info %s' % src_cluster_info)
dest_cluster_info = clusters_helper.create_cluster_with_env(
request, dest_cluster_name, dest_name, dest_stage, src_cluster_info)
Expand Down Expand Up @@ -1314,6 +1318,7 @@ def submit_auto_refresh_config(request, name, stage):
clusters_helper.submit_cluster_auto_refresh_config(request, data=auto_refresh_config)
cluster = clusters_helper.get_cluster(request, cluster_name)
cluster["autoRefresh"] = autoRefresh
cluster['enableMultipleHostTypes'] = False
clusters_helper.update_cluster(request, cluster_name, cluster)
group_info = autoscaling_groups_helper.get_group_info(request, cluster_name)
if group_info:
Expand Down

0 comments on commit 4186163

Please sign in to comment.