Skip to content

Commit

Permalink
Deprecate schedmd-slurm-gcp-v6-partition.network_storage
Browse files Browse the repository at this point in the history
  • Loading branch information
mr0re1 committed Mar 19, 2024
1 parent 0cbdbba commit 2667200
Show file tree
Hide file tree
Showing 18 changed files with 34 additions and 62 deletions.
2 changes: 1 addition & 1 deletion community/examples/hpc-slurm-gromacs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ deployment_groups:

- id: compute_partition
source: community/modules/compute/schedmd-slurm-gcp-v6-partition
use: [compute_nodeset, homefs, appsfs]
use: [compute_nodeset]
settings:
partition_name: compute
is_default: true
Expand Down
4 changes: 2 additions & 2 deletions community/examples/hpc-slurm-sharedvpc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ deployment_groups:

- id: debug_partition
source: community/modules/compute/schedmd-slurm-gcp-v6-partition
use: [debug_nodeset, homefs]
use: [debug_nodeset]
settings:
partition_name: debug
exclusive: false # allows nodes to stay up after jobs are done
Expand All @@ -80,7 +80,7 @@ deployment_groups:

- id: compute_partition
source: community/modules/compute/schedmd-slurm-gcp-v6-partition
use: [compute_nodeset, homefs]
use: [compute_nodeset]
settings:
partition_name: compute

Expand Down
12 changes: 4 additions & 8 deletions community/examples/hpc-slurm-ubuntu2004-v6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ deployment_groups:
settings:
local_mount: /home

- id: debug_node_group
- id: debug_nodeset
source: community/modules/compute/schedmd-slurm-gcp-v6-nodeset
use: [network1]
settings:
Expand All @@ -54,15 +54,13 @@ deployment_groups:

- id: debug_partition
source: community/modules/compute/schedmd-slurm-gcp-v6-partition
use:
- homefs
- debug_node_group
use: [debug_nodeset]
settings:
partition_name: debug
exclusive: false # allows nodes to stay up after jobs are done
is_default: true

- id: compute_node_group
- id: compute_nodeset
source: community/modules/compute/schedmd-slurm-gcp-v6-nodeset
use: [network1]
settings:
Expand All @@ -72,9 +70,7 @@ deployment_groups:

- id: compute_partition
source: community/modules/compute/schedmd-slurm-gcp-v6-partition
use:
- homefs
- compute_node_group
use: [compute_nodeset]
settings:
partition_name: compute

Expand Down
6 changes: 0 additions & 6 deletions community/examples/htc-slurm-v6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,6 @@ deployment_groups:
- id: compute_partition
source: community/modules/compute/schedmd-slurm-gcp-v6-partition
use:
- homefs
- scratchfs
- projectsfs
- compute_nodeset_c2s60
- compute_nodeset_c2s30
settings:
Expand Down Expand Up @@ -126,9 +123,6 @@ deployment_groups:
- id: low_cost_partition
source: community/modules/compute/schedmd-slurm-gcp-v6-partition
use:
- homefs
- scratchfs
- projectsfs
- low_cost_nodeset_n2s2
- low_cost_nodeset_n2s4
settings:
Expand Down
4 changes: 2 additions & 2 deletions community/examples/intel/hpc-slurm-daos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ deployment_groups:

- id: debug_partition
source: community/modules/compute/schedmd-slurm-gcp-v6-partition
use: [debug_nodeset, homefs]
use: [debug_nodeset]
settings:
partition_name: debug
exclusive: false # allows nodes to stay up after jobs are done
Expand All @@ -154,7 +154,7 @@ deployment_groups:

- id: compute_partition
source: community/modules/compute/schedmd-slurm-gcp-v6-partition
use: [compute_nodeset, homefs]
use: [compute_nodeset]
settings:
partition_name: compute

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ No resources.
|------|-------------|------|---------|:--------:|
| <a name="input_exclusive"></a> [exclusive](#input\_exclusive) | Exclusive job access to nodes. | `bool` | `true` | no |
| <a name="input_is_default"></a> [is\_default](#input\_is\_default) | Sets this partition as the default partition by updating the partition\_conf.<br>If "Default" is already set in partition\_conf, this variable will have no effect. | `bool` | `false` | no |
| <a name="input_network_storage"></a> [network\_storage](#input\_network\_storage) | An array of network attached storage mounts to be configured on the partition compute nodes. | <pre>list(object({<br> server_ip = string,<br> remote_mount = string,<br> local_mount = string,<br> fs_type = string,<br> mount_options = string,<br> client_install_runner = map(string)<br> mount_runner = map(string)<br> }))</pre> | `[]` | no |
| <a name="input_network_storage"></a> [network\_storage](#input\_network\_storage) | DEPRECATED | `any` | `null` | no |
| <a name="input_nodeset"></a> [nodeset](#input\_nodeset) | Define nodesets, as a list. | <pre>list(object({<br> node_count_static = optional(number, 0)<br> node_count_dynamic_max = optional(number, 1)<br> node_conf = optional(map(string), {})<br> nodeset_name = string<br> additional_disks = optional(list(object({<br> disk_name = optional(string)<br> device_name = optional(string)<br> disk_size_gb = optional(number)<br> disk_type = optional(string)<br> disk_labels = optional(map(string), {})<br> auto_delete = optional(bool, true)<br> boot = optional(bool, false)<br> })), [])<br> bandwidth_tier = optional(string, "platform_default")<br> can_ip_forward = optional(bool, false)<br> disable_smt = optional(bool, false)<br> disk_auto_delete = optional(bool, true)<br> disk_labels = optional(map(string), {})<br> disk_size_gb = optional(number)<br> disk_type = optional(string)<br> enable_confidential_vm = optional(bool, false)<br> enable_placement = optional(bool, false)<br> enable_oslogin = optional(bool, true)<br> enable_shielded_vm = optional(bool, false)<br> gpu = optional(object({<br> count = number<br> type = string<br> }))<br> instance_template = optional(string)<br> labels = optional(map(string), {})<br> machine_type = optional(string)<br> maintenance_interval = optional(string)<br> metadata = optional(map(string), {})<br> min_cpu_platform = optional(string)<br> network_tier = optional(string, "STANDARD")<br> on_host_maintenance = optional(string)<br> preemptible = optional(bool, false)<br> region = optional(string)<br> service_account = optional(object({<br> email = optional(string)<br> scopes = optional(list(string), ["https://www.googleapis.com/auth/cloud-platform"])<br> }))<br> shielded_instance_config = optional(object({<br> enable_integrity_monitoring = optional(bool, true)<br> enable_secure_boot = optional(bool, true)<br> enable_vtpm = optional(bool, true)<br> }))<br> source_image_family = optional(string)<br> source_image_project = optional(string)<br> source_image = optional(string)<br> additional_networks = optional(list(object({<br> network = string<br> subnetwork = string<br> subnetwork_project = string<br> network_ip = string<br> access_config = list(object({<br> nat_ip = string<br> network_tier = string<br> }))<br> ipv6_access_config = list(object({<br> network_tier = string<br> }))<br> })))<br> access_config = optional(list(object({<br> nat_ip = string<br> network_tier = string<br> })))<br> subnetwork_self_link = string<br> spot = optional(bool, false)<br> tags = optional(list(string), [])<br> termination_action = optional(string)<br> zones = optional(list(string), [])<br> zone_target_shape = optional(string, "ANY_SINGLE_ZONE")<br> reservation_name = optional(string)<br> startup_script = optional(list(object({<br> filename = string<br> content = string })), [])<br> }))</pre> | `[]` | no |
| <a name="input_nodeset_dyn"></a> [nodeset\_dyn](#input\_nodeset\_dyn) | Defines dynamic nodesets, as a list. | <pre>list(object({<br> nodeset_name = string<br> nodeset_feature = string<br> }))</pre> | `[]` | no |
| <a name="input_nodeset_tpu"></a> [nodeset\_tpu](#input\_nodeset\_tpu) | Define TPU nodesets, as a list. | <pre>list(object({<br> node_count_static = optional(number, 0)<br> node_count_dynamic_max = optional(number, 5)<br> nodeset_name = string<br> enable_public_ip = optional(bool, false)<br> node_type = string<br> accelerator_config = optional(object({<br> topology = string<br> version = string<br> }), {<br> topology = ""<br> version = ""<br> })<br> tf_version = string<br> preemptible = optional(bool, false)<br> preserve_tpu = optional(bool, false)<br> zone = string<br> data_disks = optional(list(string), [])<br> docker_image = optional(string, "")<br> subnetwork = string<br> service_account = optional(object({<br> email = optional(string)<br> scopes = optional(list(string), ["https://www.googleapis.com/auth/cloud-platform"])<br> }))<br> project_id = string<br> reserved = optional(string, false)<br> }))</pre> | `[]` | no |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ locals {
partition = {
default = var.is_default
enable_job_exclusive = var.exclusive
network_storage = var.network_storage
partition_conf = var.partition_conf
partition_name = var.partition_name
partition_nodeset = [for ns in var.nodeset : ns.nodeset_name]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,6 @@ variable "exclusive" {
default = true
}

variable "network_storage" {
description = "An array of network attached storage mounts to be configured on the partition compute nodes."
type = list(object({
server_ip = string,
remote_mount = string,
local_mount = string,
fs_type = string,
mount_options = string,
client_install_runner = map(string)
mount_runner = map(string)
}))
default = []
}

variable "nodeset" {
description = "Define nodesets, as a list."
type = list(object({
Expand Down Expand Up @@ -199,3 +185,14 @@ variable "nodeset_dyn" {
error_message = "All dynamic nodesets must have a unique name."
}
}

# tflint-ignore: terraform_unused_declarations
variable "network_storage" {
description = "DEPRECATED"
type = any
default = null
validation {
condition = var.network_storage == null
error_message = "network_storage in partition module is deprecated and should be removed."
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ limitations under the License.
| <a name="input_nodeset_dyn"></a> [nodeset\_dyn](#input\_nodeset\_dyn) | Defines dynamic nodesets, as a list. | <pre>list(object({<br> nodeset_name = string<br> nodeset_feature = string<br> }))</pre> | `[]` | no |
| <a name="input_nodeset_tpu"></a> [nodeset\_tpu](#input\_nodeset\_tpu) | Define TPU nodesets, as a list. | <pre>list(object({<br> node_count_static = optional(number, 0)<br> node_count_dynamic_max = optional(number, 5)<br> nodeset_name = string<br> enable_public_ip = optional(bool, false)<br> node_type = string<br> accelerator_config = optional(object({<br> topology = string<br> version = string<br> }), {<br> topology = ""<br> version = ""<br> })<br> tf_version = string<br> preemptible = optional(bool, false)<br> preserve_tpu = optional(bool, false)<br> zone = string<br> data_disks = optional(list(string), [])<br> docker_image = optional(string, "")<br> subnetwork = string<br> service_account = optional(object({<br> email = optional(string)<br> scopes = optional(list(string), ["https://www.googleapis.com/auth/cloud-platform"])<br> }))<br> project_id = string<br> reserved = optional(string, false)<br> }))</pre> | `[]` | no |
| <a name="input_on_host_maintenance"></a> [on\_host\_maintenance](#input\_on\_host\_maintenance) | Instance availability Policy. | `string` | `"MIGRATE"` | no |
| <a name="input_partitions"></a> [partitions](#input\_partitions) | Cluster partitions as a list. See module slurm\_partition. | <pre>list(object({<br> default = optional(bool, false)<br> enable_job_exclusive = optional(bool, false)<br> network_storage = optional(list(object({<br> server_ip = string<br> remote_mount = string<br> local_mount = string<br> fs_type = string<br> mount_options = string<br> })), [])<br> partition_conf = optional(map(string), {})<br> partition_name = string<br> partition_nodeset = optional(list(string), [])<br> partition_nodeset_dyn = optional(list(string), [])<br> partition_nodeset_tpu = optional(list(string), [])<br> resume_timeout = optional(number)<br> suspend_time = optional(number, 300)<br> suspend_timeout = optional(number)<br> }))</pre> | n/a | yes |
| <a name="input_partitions"></a> [partitions](#input\_partitions) | Cluster partitions as a list. See module slurm\_partition. | <pre>list(object({<br> default = optional(bool, false)<br> enable_job_exclusive = optional(bool, false)<br> partition_conf = optional(map(string), {})<br> partition_name = string<br> partition_nodeset = optional(list(string), [])<br> partition_nodeset_dyn = optional(list(string), [])<br> partition_nodeset_tpu = optional(list(string), [])<br> resume_timeout = optional(number)<br> suspend_time = optional(number, 300)<br> suspend_timeout = optional(number)<br> }))</pre> | n/a | yes |
| <a name="input_preemptible"></a> [preemptible](#input\_preemptible) | Allow the instance to be preempted. | `bool` | `false` | no |
| <a name="input_project_id"></a> [project\_id](#input\_project\_id) | Project ID to create resources in. | `string` | n/a | yes |
| <a name="input_prolog_scripts"></a> [prolog\_scripts](#input\_prolog\_scripts) | List of scripts to be used for Prolog. Programs for the slurmd to execute<br>whenever it is asked to run a job step from a new job allocation.<br>See https://slurm.schedmd.com/slurm.conf.html#OPT_Prolog. | <pre>list(object({<br> filename = string<br> content = string<br> }))</pre> | `[]` | no |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ module "slurm_partition" {

default = each.value.default
enable_job_exclusive = each.value.enable_job_exclusive
network_storage = each.value.network_storage
partition_name = each.value.partition_name
partition_conf = each.value.partition_conf
resume_timeout = each.value.resume_timeout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,15 +308,8 @@ variable "partitions" {
Cluster partitions as a list. See module slurm_partition.
EOD
type = list(object({
default = optional(bool, false)
enable_job_exclusive = optional(bool, false)
network_storage = optional(list(object({
server_ip = string
remote_mount = string
local_mount = string
fs_type = string
mount_options = string
})), [])
default = optional(bool, false)
enable_job_exclusive = optional(bool, false)
partition_conf = optional(map(string), {})
partition_name = string
partition_nodeset = optional(list(string), [])
Expand Down
1 change: 0 additions & 1 deletion docs/tutorials/sc23-tutorial/hcls-blueprint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ deployment_groups:
source: community/modules/compute/schedmd-slurm-gcp-v6-partition
use:
- compute_nodeset
- nfs
settings:
partition_name: compute
exclusive: false
Expand Down
3 changes: 0 additions & 3 deletions examples/hpc-slurm-v6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ deployment_groups:
- id: debug_partition
source: community/modules/compute/schedmd-slurm-gcp-v6-partition
use:
- homefs
- debug_nodeset
settings:
partition_name: debug
Expand All @@ -68,7 +67,6 @@ deployment_groups:
- id: compute_partition
source: community/modules/compute/schedmd-slurm-gcp-v6-partition
use:
- homefs
- compute_nodeset
settings:
partition_name: compute
Expand All @@ -87,7 +85,6 @@ deployment_groups:
- id: h3_partition
source: community/modules/compute/schedmd-slurm-gcp-v6-partition
use:
- homefs
- h3_nodeset
settings:
partition_name: h3
Expand Down
11 changes: 10 additions & 1 deletion pkg/inspect/modules_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,15 @@ func hasInput(name string) predicate {
}
}

func hasInputNotDeprecated(name string) predicate {
return func(mod modInfo) bool {
if vi, ok := mod.Input(name); ok {
return !strings.HasPrefix(vi.Description, "DEPRECATED")
}
return false
}
}

// Fails test if slice is empty, returns not empty slice as is.
func notEmpty[E any](l []E, t *testing.T) []E {
if len(l) == 0 {
Expand Down Expand Up @@ -148,7 +157,7 @@ func TestNetworkStorage(t *testing.T) {
})`)
lst := modulereader.NormalizeType(fmt.Sprintf("list(%s)", obj))

for _, mod := range notEmpty(query(hasInput("network_storage")), t) {
for _, mod := range notEmpty(query(hasInputNotDeprecated("network_storage")), t) {
i, _ := mod.Input("network_storage")
got := typeexpr.TypeString(i.Type)
if got != obj && got != lst {
Expand Down
2 changes: 0 additions & 2 deletions tools/validate_configs/test_configs/config-ssh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ deployment_groups:
- id: debug_partition
source: community/modules/compute/schedmd-slurm-gcp-v6-partition
use:
- homefs
- debug_node_group
settings:
partition_name: debug
Expand All @@ -69,7 +68,6 @@ deployment_groups:
- id: compute_partition
source: community/modules/compute/schedmd-slurm-gcp-v6-partition
use:
- homefs
- compute_node_group
settings:
partition_name: compute
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ deployment_groups:
- id: compute-partition
source: community/modules/compute/schedmd-slurm-gcp-v6-partition
use:
- homefs
- compute-nodeset
settings:
partition_name: compute
Expand Down
4 changes: 0 additions & 4 deletions tools/validate_configs/test_configs/node-groups-v6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ deployment_groups:
- id: single_nodeset_partition
source: community/modules/compute/schedmd-slurm-gcp-v6-partition
use:
- homefs
- default_nodeset
settings:
partition_name: simple
Expand Down Expand Up @@ -101,7 +100,6 @@ deployment_groups:
- id: multiple_nodesets
source: community/modules/compute/schedmd-slurm-gcp-v6-partition
use:
- homefs
- nodeset_1
- nodeset_2
- nodeset_3
Expand All @@ -112,8 +110,6 @@ deployment_groups:
## Explicitly set node partition with one nodeset
- id: single_nodeset_explicit_partition
source: community/modules/compute/schedmd-slurm-gcp-v6-partition
use:
- homefs
settings:
partition_name: explns
is_default: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ deployment_groups:
- id: debug_partition
source: community/modules/compute/schedmd-slurm-gcp-v6-partition
use:
- homefs
- bucket
- debug_nodeset
settings:
partition_name: debug
Expand All @@ -84,8 +82,6 @@ deployment_groups:
- id: compute_partition
source: community/modules/compute/schedmd-slurm-gcp-v6-partition
use:
- homefs
- bucket
- compute_nodeset
settings:
partition_name: compute
Expand Down

0 comments on commit 2667200

Please sign in to comment.