Skip to content

Add mounts role with /tmp defaulted to tmpfs on login & compute nodes#888

Merged
sjpb merged 19 commits into
mainfrom
feat/mounts
Jan 15, 2026
Merged

Add mounts role with /tmp defaulted to tmpfs on login & compute nodes#888
sjpb merged 19 commits into
mainfrom
feat/mounts

Conversation

@sjpb
Copy link
Copy Markdown
Collaborator

@sjpb sjpb commented Jan 9, 2026

  • Adds a mounts role to support arbitrary mounts via fstab, with compute_init support.
  • mounts role enabled by default for compute and login nodes.
  • Role defaults to moving /tmp to a tmpfs of 10% of RAM. This prevents users from filling the root disk.

Note that the tmpfs functionality is actually provided by the systemd tmp.mount unit (masked by default in RockyLinux genericcloud images). However this is automatically triggered by appropriate changes to fstab, and using Ansible's posix.mount module to drive it is is much easier to integrate correctly than via overrrides using the current systemd unit. It also allows for a more general solution for additional mount-points which can evolve towards #814. Testing shows changes to the tmpfs size are correctly applied by re-running Ansible.

@sjpb
Copy link
Copy Markdown
Collaborator Author

sjpb commented Jan 14, 2026

@sjpb sjpb changed the title Default to /tmp on tmpfs Add mounts role with /tmp defaulted to tmpfs on user-accessible nodes Jan 14, 2026
@sjpb
Copy link
Copy Markdown
Collaborator Author

sjpb commented Jan 14, 2026

@sjpb sjpb changed the title Add mounts role with /tmp defaulted to tmpfs on user-accessible nodes Add mounts role with /tmp defaulted to tmpfs on login, compute nodes Jan 14, 2026
@sjpb sjpb changed the title Add mounts role with /tmp defaulted to tmpfs on login, compute nodes Add mounts role with /tmp defaulted to tmpfs on login & compute nodes Jan 14, 2026
@sjpb sjpb marked this pull request as ready for review January 14, 2026 20:01
@sjpb sjpb requested a review from a team as a code owner January 14, 2026 20:01
Copy link
Copy Markdown
Contributor

@elelaysh elelaysh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to have a more granular enable/disable?
By adding mount_tmp_enable: true and handling an enable field in a mounts dict value (can be | default(True))

@sjpb
Copy link
Copy Markdown
Collaborator Author

sjpb commented Jan 15, 2026

Would it make sense to have a more granular enable/disable? By adding mount_tmp_enable: true and handling an enable field in a mounts dict value (can be | default(True))

Yeah that's exactly the sort of discussion I was expecting/after, thanks. I was wondering about removing the entire tmp mount dict with a flag like that, but actually a generic enable field is maybe better. It lets you have different mounts on different hosts (using something like enable: "{{ 'name' in group_names }}". Without that you have to get into using non-all group_vars which is really nasty with multiple environments.

I'll try that, thanks.

@sjpb
Copy link
Copy Markdown
Collaborator Author

sjpb commented Jan 15, 2026

@sjpb sjpb requested a review from elelaysh January 15, 2026 10:26
@sjpb
Copy link
Copy Markdown
Collaborator Author

sjpb commented Jan 15, 2026

elelaysh
elelaysh previously approved these changes Jan 15, 2026
Copy link
Copy Markdown
Contributor

@elelaysh elelaysh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Contributor

@elelaysh elelaysh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sjpb sjpb merged commit 74e21ba into main Jan 15, 2026
41 of 42 checks passed
@sjpb sjpb deleted the feat/mounts branch January 15, 2026 15:36
MoteHue pushed a commit to ACRC/ansible-slurm-appliance that referenced this pull request Feb 4, 2026
…stackhpc#888)

* add DEX support for ondemand

* fix merge conflicts

* fix lint errors

* cleanup PAM install/configure

* install DEX and OIDC Apache module in stackhpc builds

* fix markdown lint errors

* bump CI image

* wip; add tmpfs /tmp

* add compute-init support for mounts

* update compute-init docs for mounts role

* fix linter errors

* bump CI image

* add docs

* add mounts[].enabled and mounts_tmp_enabled

* update builder config for consistency

* bump CI image
claudia-lola pushed a commit that referenced this pull request Feb 9, 2026
…#888)

* add DEX support for ondemand

* fix merge conflicts

* fix lint errors

* cleanup PAM install/configure

* install DEX and OIDC Apache module in stackhpc builds

* fix markdown lint errors

* bump CI image

* wip; add tmpfs /tmp

* add compute-init support for mounts

* update compute-init docs for mounts role

* fix linter errors

* bump CI image

* add docs

* add mounts[].enabled and mounts_tmp_enabled

* update builder config for consistency

* bump CI image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants