Skip to content

Commit 46d94c6

Browse files
committed
fix(slurm): fail over after GCE capacity errors
1 parent 6debf2d commit 46d94c6

13 files changed

Lines changed: 1854 additions & 16 deletions

File tree

community/modules/scheduler/schedmd-slurm-gcp-v6-controller/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@ limitations under the License.
395395
| <a name="input_bucket_dir"></a> [bucket\_dir](#input\_bucket\_dir) | Bucket directory for cluster files to be put into. If not specified, then one will be chosen based on slurm\_cluster\_name. | `string` | `null` | no |
396396
| <a name="input_bucket_name"></a> [bucket\_name](#input\_bucket\_name) | Name of GCS bucket.<br/>Ignored when 'create\_bucket' is true. | `string` | `null` | no |
397397
| <a name="input_can_ip_forward"></a> [can\_ip\_forward](#input\_can\_ip\_forward) | Enable IP forwarding, for NAT instances for example. | `bool` | `false` | no |
398+
| <a name="input_capacity_circuit_breaker"></a> [capacity\_circuit\_breaker](#input\_capacity\_circuit\_breaker) | Controls automatic failover away from a GCE nodeset after a capacity error.<br/>When enabled, powered-down nodes in the affected nodeset are drained while<br/>a small probe set is retried after an exponential cooldown. A successful<br/>probe makes the nodeset schedulable again. If no workload can use the probe<br/>set, the nodeset is automatically reset after a bounded grace period that<br/>accounts for Slurm's ResumeTimeout. | <pre>object({<br/> enabled = optional(bool, false)<br/> initial_cooldown_seconds = optional(number, 300)<br/> max_cooldown_seconds = optional(number, 1800)<br/> probe_count = optional(number, 1)<br/> })</pre> | `{}` | no |
398399
| <a name="input_cgroup_conf_tpl"></a> [cgroup\_conf\_tpl](#input\_cgroup\_conf\_tpl) | Slurm cgroup.conf template file path. | `string` | `null` | no |
399400
| <a name="input_cloud_parameters"></a> [cloud\_parameters](#input\_cloud\_parameters) | cloud.conf options. Defaults inherited from [Slurm GCP repo](https://github.com/GoogleCloudPlatform/slurm-gcp/blob/master/terraform/slurm_cluster/modules/slurm_files/README_TF.md#input_cloud_parameters) | <pre>object({<br/> no_comma_params = optional(bool, false)<br/> private_data = optional(list(string))<br/> scheduler_parameters = optional(list(string))<br/> resume_rate = optional(number)<br/> resume_timeout = optional(number)<br/> suspend_rate = optional(number)<br/> suspend_timeout = optional(number)<br/> slurmd_timeout = optional(number)<br/> unkillable_step_timeout = optional(number)<br/> topology_plugin = optional(string)<br/> topology_param = optional(string)<br/> tree_width = optional(number)<br/> prolog_flags = optional(string)<br/> switch_type = optional(string)<br/> })</pre> | `{}` | no |
400401
| <a name="input_cloudsql"></a> [cloudsql](#input\_cloudsql) | Use this database instead of the one on the controller.<br/> server\_ip : Address of the database server.<br/> user : The user to access the database as.<br/> password : The password, given the user, to access the given database. (sensitive)<br/> db\_name : The database to access.<br/> user\_managed\_replication : The list of location and (optional) kms\_key\_name for secret | <pre>object({<br/> server_ip = string<br/> user = string<br/> password = string # sensitive<br/> db_name = string<br/> user_managed_replication = optional(list(object({<br/> location = string<br/> kms_key_name = optional(string)<br/> })), [])<br/> })</pre> | `null` | no |

community/modules/scheduler/schedmd-slurm-gcp-v6-controller/modules/slurm_files/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ No modules.
6969
| <a name="input_backup_controller_key_timeout"></a> [backup\_controller\_key\_timeout](#input\_backup\_controller\_key\_timeout) | The time in seconds for the backup controller to wait for the shared key to become available. | `number` | `300` | no |
7070
| <a name="input_bucket_dir"></a> [bucket\_dir](#input\_bucket\_dir) | Bucket directory for cluster files to be put into. | `string` | `null` | no |
7171
| <a name="input_bucket_name"></a> [bucket\_name](#input\_bucket\_name) | Name of GCS bucket to use. | `string` | n/a | yes |
72+
| <a name="input_capacity_circuit_breaker"></a> [capacity\_circuit\_breaker](#input\_capacity\_circuit\_breaker) | Controls automatic nodeset failover after GCE capacity errors. | <pre>object({<br/> enabled = optional(bool, false)<br/> initial_cooldown_seconds = optional(number, 300)<br/> max_cooldown_seconds = optional(number, 1800)<br/> probe_count = optional(number, 1)<br/> })</pre> | `{}` | no |
7273
| <a name="input_cgroup_conf_tpl"></a> [cgroup\_conf\_tpl](#input\_cgroup\_conf\_tpl) | Slurm cgroup.conf template file path. | `string` | `null` | no |
7374
| <a name="input_cloud_parameters"></a> [cloud\_parameters](#input\_cloud\_parameters) | cloud.conf options. Default behavior defined in scripts/conf.py | <pre>object({<br/> no_comma_params = optional(bool, false)<br/> private_data = optional(list(string))<br/> scheduler_parameters = optional(list(string))<br/> resume_rate = optional(number)<br/> resume_timeout = optional(number)<br/> suspend_rate = optional(number)<br/> suspend_timeout = optional(number)<br/> slurmd_timeout = optional(number)<br/> unkillable_step_timeout = optional(number)<br/> topology_plugin = optional(string)<br/> topology_param = optional(string)<br/> tree_width = optional(number)<br/> prolog_flags = optional(string)<br/> switch_type = optional(string)<br/> })</pre> | `{}` | no |
7475
| <a name="input_cloudsql_secret"></a> [cloudsql\_secret](#input\_cloudsql\_secret) | Secret URI to cloudsql secret. | `string` | `null` | no |

community/modules/scheduler/schedmd-slurm-gcp-v6-controller/modules/slurm_files/main.tf

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,12 @@ locals {
6868
slurm_key_mount = var.slurm_key_mount
6969

7070
# slurm conf
71-
prolog_scripts = [for k, v in google_storage_bucket_object.prolog_scripts : k]
72-
epilog_scripts = [for k, v in google_storage_bucket_object.epilog_scripts : k]
73-
task_prolog_scripts = [for k, v in google_storage_bucket_object.task_prolog_scripts : k]
74-
task_epilog_scripts = [for k, v in google_storage_bucket_object.task_epilog_scripts : k]
75-
cloud_parameters = var.cloud_parameters
71+
prolog_scripts = [for k, v in google_storage_bucket_object.prolog_scripts : k]
72+
epilog_scripts = [for k, v in google_storage_bucket_object.epilog_scripts : k]
73+
task_prolog_scripts = [for k, v in google_storage_bucket_object.task_prolog_scripts : k]
74+
task_epilog_scripts = [for k, v in google_storage_bucket_object.task_epilog_scripts : k]
75+
cloud_parameters = var.cloud_parameters
76+
capacity_circuit_breaker = var.capacity_circuit_breaker
7677

7778
# hybrid
7879
hybrid = var.enable_hybrid
@@ -186,6 +187,7 @@ locals {
186187
"tools/gpu-test",
187188
"tools/task-epilog",
188189
"tools/task-prolog",
190+
"capacity_circuit.py",
189191
"conf.py",
190192
"conf_v2411.py",
191193
"file_cache.py",
@@ -212,6 +214,7 @@ locals {
212214
"tools/gpu-test",
213215
"tools/task-epilog",
214216
"tools/task-prolog",
217+
"capacity_circuit.py",
215218
"conf.py",
216219
"conf_v2411.py",
217220
"file_cache.py",

0 commit comments

Comments
 (0)