Skip to content

Commit

Permalink
Specify /run partition size
Browse files Browse the repository at this point in the history
add resize_run_partition option, which enables specifying /run partition size
where is default partition of pyxis `runtime_path`, used to store squashfs file temporarily

In the case a docker image is bigger than the partition then slurm job fails.

Signed-off-by: Seyong Um <seyong.um@hyundai.com>
  • Loading branch information
seyong-um committed Jul 1, 2022
1 parent efbf24f commit 436be63
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
6 changes: 6 additions & 0 deletions config.example/group_vars/slurm-cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,12 @@ slurm_install_enroot: true
slurm_install_pyxis: true
slurm_pyxis_version: 0.11.1

# /run is default partition of pyxis runtime_path
resize_run_partition: false

# /run tmpfs size. ubuntu default is 10%
pyxis_run_tmpfs_size: 50%

################################################################################
# Node Health Check #
################################################################################
Expand Down
6 changes: 6 additions & 0 deletions roles/pyxis/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,9 @@ pyxis_ubuntu_deps:

pyxis_el_deps:
- "util-linux"

# /run is default partition of pyxis runtime_path
resize_run_partition: false

# /run tmpfs size. ubuntu default is 10% of physical memory
pyxis_run_tmpfs_size: 50%
12 changes: 12 additions & 0 deletions roles/pyxis/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,15 @@
include_tasks: pyxis.yml
when: slurm_install_pyxis
tags: pyxis

# Resize /run temporary file system, which is used to import docker image.
# - Default pyxis runtime_path is: /run/pyxis
# If image is bigger than the file system, the importing will be failed
- name: resize /run partition
mount:
name: /run
src: tmpfs
opts: size={{ pyxis_run_tmpfs_size }}
fstype: tmpfs
state: mounted
when: resize_run_partition

0 comments on commit 436be63

Please sign in to comment.