Skip to content

Commit

Permalink
Remove unused MAX_COUNT update policy
Browse files Browse the repository at this point in the history
Remove unused MAX_COUNT update policy, that was used only by MaxCount

Signed-off-by: Luca Carrogu <[email protected]>
  • Loading branch information
lukeseawalker committed Jan 8, 2024
1 parent 0ca0fa3 commit 2f9c501
Show file tree
Hide file tree
Showing 2 changed files with 313 additions and 354 deletions.
11 changes: 0 additions & 11 deletions cli/src/pcluster/config/update_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,17 +511,6 @@ def condition_checker_login_nodes_stop_policy(_, patch):
<= patch.target_config["Scheduling"]["AwsBatchQueues"][0]["ComputeResources"][0]["MaxvCpus"],
)

# Checks resize of max_count
UpdatePolicy.MAX_COUNT = UpdatePolicy(
name="MAX_COUNT",
level=1,
fail_reason=lambda change, patch: "Shrinking a queue requires the compute fleet to be stopped first",
action_needed=UpdatePolicy.ACTIONS_NEEDED["pcluster_stop"],
condition_checker=lambda change, patch: not patch.cluster.has_running_capacity()
or (int(change.new_value) if change.new_value is not None else DEFAULT_MAX_COUNT)
>= (int(change.old_value) if change.old_value is not None else DEFAULT_MAX_COUNT),
)

# Update supported only with all compute nodes down or with replacement policy set different from COMPUTE_FLEET_STOP
UpdatePolicy.QUEUE_UPDATE_STRATEGY = UpdatePolicy(
name="QUEUE_UPDATE_STRATEGY",
Expand Down
Loading

0 comments on commit 2f9c501

Please sign in to comment.