You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: community/modules/scheduler/schedmd-slurm-gcp-v6-controller/README.md
+29Lines changed: 29 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -148,6 +148,30 @@ Example configuration overrides:
148
148
create_firewall_rule: true
149
149
```
150
150
151
+
### Internal Load Balancer (ILB) and Virtual IP (VIP)
152
+
153
+
To provide stable network failover and avoid hardcoding individual controller IPs, an Internal Load Balancer (ILB) can be provisioned in front of the primary and backup controllers.
154
+
155
+
To enable the Internal Load Balancer:
156
+
1. Ensure `enable_backup_controller` is set to `true`.
157
+
2. Set `enable_controller_load_balancer` to `true`.
158
+
3. (Optional) Provide a static IP address using `controller_load_balancer_ip` to assign to the ILB's forwarding rule (VIP). If omitted, a dynamic IP is allocated from the subnetwork.
159
+
160
+
#### Active-Passive HTTP Health Check Agent
161
+
162
+
An Active-Passive HTTP health check agent automatically runs on port `6821` on each controller instance. The health check agent executes `scontrol ping` locally and reports status to the ILB:
163
+
* **Primary Controller (`-0`)**: Returns HTTP `200 OK` if the primary controller is up and active, and `503 Service Unavailable` if offline.
164
+
* **Backup Controller (`-1`)**: Returns HTTP `200 OK` only when the primary controller is down/offline and the backup controller is up and active. If the primary controller is up, the backup returns `503 Service Unavailable` (Standby) to prevent traffic routing to the standby instance.
165
+
166
+
This setup ensures that all Slurm traffic is directed exclusively to the active controller node, enabling seamless and stable failover.
167
+
168
+
#### Health Check and Network Integration Details
169
+
170
+
* **Bypassing Loopback Routing Loops**: When `enable_controller_load_balancer` is active, the primary and backup controllers are configured with their real internal IPs mapped in `/etc/hosts`. This ensures that they can communicate directly with each other and bypasses potential loopback routing loops through the load balancer VIP. Non-controller nodes (such as login and compute nodes) map the controller hostname directly to the Load Balancer VIP.
171
+
* **Multi-Threaded Probing**: The health check service uses a multi-threaded HTTPServer (`ThreadingHTTPServer`) to support simultaneous, concurrent probes from multiple Google Cloud load-balancer IP ranges without blocking or timing out.
172
+
* **Optimized Local Timeout**: The health check agent executes `scontrol ping` with a reduced timeout of `3` seconds (down from `5` seconds). This ensures that if the local Slurm daemon hangs, the health check agent times out *before* the load balancer's typical 5-second probe timeout, returning a clean `503 Service Unavailable` response and preventing abrupt TCP teardowns.
173
+
* **Security & Least Privilege**: The `slurm_health_check.service` systemd unit runs under the dedicated `slurm` user and group rather than `root`, adhering to security best practices.
174
+
151
175
### Backward Compatibility
152
176
153
177
The HA feature is **opt-in**. If `enable_backup_controller` is set to `false`
@@ -394,9 +418,12 @@ limitations under the License.
@@ -427,6 +454,7 @@ limitations under the License.
427
454
| <a name="input_compute_startup_script"></a> [compute\_startup\_script](#input\_compute\_startup\_script) | DEPRECATED: `compute_startup_script` has been deprecated.<br/>Use `startup_script` of nodeset module instead. | `any` | `null` | no |
428
455
| <a name="input_compute_startup_scripts_timeout"></a> [compute\_startup\_scripts\_timeout](#input\_compute\_startup\_scripts\_timeout) | The timeout (seconds) applied to each startup script in compute nodes. If<br/>any script exceeds this timeout, then the instance setup process is considered<br/>failed and handled accordingly.<br/><br/>NOTE: When set to 0, the timeout is considered infinite and thus disabled. | `number` | `300` | no |
429
456
| <a name="input_controller_ha_type"></a> [controller\_ha\_type](#input\_controller\_ha\_type) | Type of Managed Instance Group for controllers: 'zonal' or 'regional'. | `string` | `"zonal"` | no |
457
+
| <a name="input_controller_load_balancer_ip"></a> [controller\_load\_balancer\_ip](#input\_controller\_load\_balancer\_ip) | Optional static IP address to assign to the controller Internal Load Balancer (VIP). If null, one will be dynamically assigned from the subnetwork. | `string` | `null` | no |
430
458
| <a name="input_controller_network_attachment"></a> [controller\_network\_attachment](#input\_controller\_network\_attachment) | SelfLink for NetworkAttachment to be attached to the controller, if any. | `string` | `null` | no |
431
459
| <a name="input_controller_project_id"></a> [controller\_project\_id](#input\_controller\_project\_id) | Optionally. Provision controller and config bucket in the different project | `string` | `null` | no |
432
460
| <a name="input_controller_startup_script"></a> [controller\_startup\_script](#input\_controller\_startup\_script) | Startup script used by the controller VM. | `string` | `"# no-op"` | no |
@@ -450,6 +478,7 @@ limitations under the License.
450
478
| <a name="input_enable_chs_gpu_health_check_prolog"></a> [enable\_chs\_gpu\_health\_check\_prolog](#input\_enable\_chs\_gpu\_health\_check\_prolog) | Enable a Cluster Health Sacnner(CHS) GPU health check that slurmd executes as a prolog script whenever it is asked to run a job step from a new job allocation. Compute nodes that fail GPU health check during prolog will be marked as drained. Find more details at:<br/>https://github.com/GoogleCloudPlatform/cluster-toolkit/tree/main/docs/CHS-Slurm.md | `bool` | `false` | no |
451
479
| <a name="input_enable_cleanup_compute"></a> [enable\_cleanup\_compute](#input\_enable\_cleanup\_compute) | Enables automatic cleanup of compute nodes and resource policies (e.g.<br/>placement groups) managed by this module, when cluster is destroyed.<br/><br/>*WARNING*: Toggling this off will impact the running workload.<br/>Deployed compute nodes will be destroyed. | `bool` | `true` | no |
452
480
| <a name="input_enable_confidential_vm"></a> [enable\_confidential\_vm](#input\_enable\_confidential\_vm) | Enable the Confidential VM configuration. Note: the instance image must support option. | `bool` | `false` | no |
481
+
| <a name="input_enable_controller_load_balancer"></a> [enable\_controller\_load\_balancer](#input\_enable\_controller\_load\_balancer) | Enables an Internal Load Balancer (ILB) in front of the controllers for stable Virtual IP and network-level failover. | `bool` | `false` | no |
453
482
| <a name="input_enable_controller_public_ips"></a> [enable\_controller\_public\_ips](#input\_enable\_controller\_public\_ips) | If set to true. The controller will have a random public IP assigned to it. Ignored if access\_config is set. | `bool` | `false` | no |
Copy file name to clipboardExpand all lines: community/modules/scheduler/schedmd-slurm-gcp-v6-controller/modules/slurm_files/README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,6 +81,7 @@ No modules.
81
81
| <aname="input_enable_bigquery_load"></a> [enable\_bigquery\_load](#input\_enable\_bigquery\_load)| Enables loading of cluster job usage into big query.<br/><br/>NOTE: Requires Google Bigquery API. |`bool`|`false`| no |
82
82
| <aname="input_enable_chs_gpu_health_check_epilog"></a> [enable\_chs\_gpu\_health\_check\_epilog](#input\_enable\_chs\_gpu\_health\_check\_epilog)| Enable a Cluster Health Sacnner(CHS) GPU health check that slurmd executes as an epilog script after completing a job step from a new job allocation.<br/>Compute nodes that fail GPU health check during epilog will be marked as drained. Find more details at:<br/>https://github.com/GoogleCloudPlatform/cluster-toolkit/tree/main/docs/CHS-Slurm.md|`bool`|`false`| no |
83
83
| <aname="input_enable_chs_gpu_health_check_prolog"></a> [enable\_chs\_gpu\_health\_check\_prolog](#input\_enable\_chs\_gpu\_health\_check\_prolog)| Enable a Cluster Health Sacnner(CHS) GPU health check that slurmd executes as a prolog script whenever it is asked to run a job step from a new job allocation. Compute nodes that fail GPU health check during prolog will be marked as drained. Find more details at:<br/>https://github.com/GoogleCloudPlatform/cluster-toolkit/tree/main/docs/CHS-Slurm.md|`bool`|`false`| no |
84
+
| <aname="input_enable_controller_load_balancer"></a> [enable\_controller\_load\_balancer](#input\_enable\_controller\_load\_balancer)| Whether an Internal Load Balancer is configured in front of the controllers. |`bool`|`false`| no |
84
85
| <aname="input_enable_debug_logging"></a> [enable\_debug\_logging](#input\_enable\_debug\_logging)| Enables debug logging mode. Not for production use. |`bool`|`false`| no |
85
86
| <aname="input_enable_expedited_requeue"></a> [enable\_expedited\_requeue](#input\_enable\_expedited\_requeue)| Enables Expedited Requeue, which automatically requeues eligible jobs and grants them the highest priority upon node failure. (Usage: sbatch --requeue=expedite) |`bool`|`true`| no |
86
87
| <aname="input_enable_external_prolog_epilog"></a> [enable\_external\_prolog\_epilog](#input\_enable\_external\_prolog\_epilog)| Automatically enable a script that will execute prolog and epilog scripts<br/>shared by NFS from the controller to compute nodes. Find more details at:<br/>https://github.com/GoogleCloudPlatform/slurm-gcp/blob/v5/tools/prologs-epilogs/README.md|`bool`|`false`| no |
0 commit comments