Configure Slurm CLI Filter Plugins on an AWS PCS cluster
Configure CLI Filter Plugins when you create a new AWS PCS cluster. You can enable or disable CLI Filter Plugins on existing clusters using the Update API or console without recreating the cluster.
Prerequisites
Before you configure CLI Filter Plugins, complete these tasks:
-
Write and test a Lua script that implements CLI Filter Plugin API
-
Name your Lua script exactly
cli_filter.lua -
Choose a method to deploy your script to all cluster instances (AMI, S3, or file system)
-
Verify you are using Slurm version 24.11 or later
Enable CLI Filter Plugins on a new cluster
Deploy CLI Filter Plugin scripts
To deploy CLI Filter Plugin scripts to your cluster
-
Ensure all AMIs used in compute node groups have Slurm installed via the AWS PCS Slurm installer.
Note
If you use the AWS PCS Sample AMI for all compute node groups, skip this step. Slurm is already installed.
-
Deploy your
cli_filter.luascript to/etc/aws/pcs/scheduler/slurm-<version>/cli_filter.luaon all instances in the cluster.For example, for Slurm version 24.11:
/etc/aws/pcs/scheduler/slurm-24.11/cli_filter.lua -
Launch all login and compute nodes using your prepared AMIs.
-
Test job submission to verify CLI Filter Plugin executes correctly.
Enable or disable CLI Filter Plugins on existing clusters
You can enable or disable CLI Filter Plugins on existing clusters without rebuilding your infrastructure. For more information, see Updating a cluster in AWS PCS.
Expected results
After you complete the configuration:
-
Your cluster is created with CLI Filter Plugin turned on
-
Job submissions trigger your custom validation logic before reaching the Slurm controller
-
Non-compliant jobs are rejected with your custom error messages
-
Compliant jobs proceed normally through the Slurm scheduler
Troubleshooting
- CLI Filter Plugin script missing on any node
-
Symptoms: Job submission fails immediately with plugin loading error.
Likely cause: Script not deployed to all instances or incorrect file path or name.
Resolution: Verify script exists at correct path on all login and compute nodes with exact filename
cli_filter.lua. - Invalid CLI Filter Plugin configuration
-
Symptoms: Cluster creation fails with validation error.
Likely cause:
CliFilterPluginsparameter not set tocli_filter/luaformat.Resolution: Use exact parameter value
cli_filter/luainslurmCustomSettings.