Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions discovery/roles/slurm_config/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2025 Dell Inc. or its subsidiaries. All Rights Reserved.
# Copyright 2026 Dell Inc. or its subsidiaries. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -19,7 +19,7 @@ slurmctld_service_default_path: '/usr/lib/systemd/system/slurmctld.service'
slurmd_service_default_path: '/usr/lib/systemd/system/slurmd.service'
slurmdbd_service_default_path: '/usr/lib/systemd/system/slurmdbd.service'
sys_env_path: '/etc/environment'
default_real_memory: 4 # This is the minimum default memory in GiB
default_real_memory: 4096 # This is the minimum default memory in MiB
default_threadspercore: 1
default_corespersocket: 1
share_prefix: "/"
Expand Down
14 changes: 8 additions & 6 deletions discovery/roles/slurm_config/tasks/read_node_idrac.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2025 Dell Inc. or its subsidiaries. All Rights Reserved.
# Copyright 2026 Dell Inc. or its subsidiaries. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -44,7 +44,7 @@

- name: Read Memory NodeParams
ansible.builtin.uri:
url: "https://{{ bmc_ip_map[item] }}/redfish/v1/Systems/System.Embedded.1"
url: "https://{{ bmc_ip_map[item] }}/redfish/v1/Systems/System.Embedded.1/Memory?$expand=*($levels=1)"
user: "{{ bmc_username }}"
password: "{{ bmc_password }}"
method: GET
Expand All @@ -62,13 +62,15 @@
register: mem_info
failed_when: false

- name: Calculate total memory in MB (GiB → MB)
- name: Calculate total memory sum of slots
ansible.builtin.set_fact:
total_memory_mb: "{{ (mem_info.json.MemorySummary.TotalSystemMemoryGiB | default(default_real_memory)) * 1024 | int }}"
total_memory_mb: "{{ mem_info.json.Members | default([{'CapacityMiB': default_real_memory}])
| map(attribute='CapacityMiB', default=default_real_memory)
| map('int', default=default_real_memory) | sum | int }}"

- name: Calculate 90% of real memory
- name: Calculate percentage of real memory
ansible.builtin.set_fact:
real_memory: "{{ ((total_memory_mb | float) * 0.90) | int }}"
real_memory: "{{ ((total_memory_mb | int) * (memory_percentage / 100)) | int | round }}"

- name: Calculate proc facts
ansible.builtin.set_fact:
Expand Down
3 changes: 2 additions & 1 deletion discovery/roles/slurm_config/vars/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2025 Dell Inc. or its subsidiaries. All Rights Reserved.
# Copyright 2026 Dell Inc. or its subsidiaries. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -103,3 +103,4 @@ auth_tls_certs_path: "/opt/omnia/auth/tls_certs/ldapserver.crt"
slurm_installation_type: configless
pulp_webserver_cert_path: "/opt/omnia/pulp/settings/certs/pulp_webserver.crt"
controller_empty_msg: "Slurm controller functional group is missing from PXE mapping file. Please update the file and rerun discovery.yml."
memory_percentage: 90