Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cluster_setup_ceph: disable PrivateTmp for ssh during Ceph configuration #679

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Revalioli
Copy link
Contributor

Commit 1 in meta-seapath enabled the PrivateTmp systemd option for every ssh sessions with SEAPATH Yocto.
This means that every ssh sessions, including ansible ones, will use a separate mount namespace. Any new files in /tmp or new tmpfs during ansible tasks are deleted once the ssh session closes.

This is a problem regarding Ceph and ceph-ansible. Directories in /var/lib/ceph/osd/, which contains multiple OSD files, are in fact tmpfs created by ceph-ansible. With the PrivateTmp option, these directories are then lost once the Ansible ssh session closes.

As a workaround, temporarily disable the PrivateTmp option for the Ceph configuration.
Note that this only affects SEAPATH Yocto.

eroussy
eroussy previously approved these changes Jan 8, 2025
tasks:
- name: Temporarily disable private tmpfs for ssh sessions
lineinfile:
path: /usr/lib/systemd/system/sshd@.service.d/sshd-private-tmp.conf
Copy link
Member

Choose a reason for hiding this comment

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

This file id in ro on Yocto.

Use an systemd override file instead.

Copy link
Member

@dupremathieu dupremathieu left a comment

Choose a reason for hiding this comment

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

See the comment.

@Revalioli Revalioli marked this pull request as draft January 8, 2025 17:04
@Revalioli Revalioli force-pushed the fix-private-tmpfs-for-ceph branch from 82cb85d to 551e5e1 Compare January 9, 2025 11:05
Commit [1] in meta-seapath enabled the PrivateTmp systemd option for
every ssh sessions with SEAPATH Yocto.
This means that every ssh sessions, including ansible ones,
will use a separate mount namespace. Any new files in /tmp or new tmpfs
during ansible tasks are deleted once the ssh session closes.

This is a problem regarding Ceph and ceph-ansible. Directories in
/var/lib/ceph/osd/, which contains multiple OSD files, are in fact tmpfs
created by ceph-ansible. With the PrivateTmp option, these directories
are then lost once the Ansible ssh session closes.

As a workaround, temporarily disable the PrivateTmp option for the Ceph
configuration via a service override file.
Note that this only affects SEAPATH Yocto.

[1]: seapath/meta-seapath@22cddd3

Signed-off-by: Elinor Montmasson <elinor.montmasson@savoirfairelinux.com>
"After" setting should be in the Unit section of a systemd service file.

Signed-off-by: Elinor Montmasson <elinor.montmasson@savoirfairelinux.com>
@Revalioli Revalioli force-pushed the fix-private-tmpfs-for-ceph branch from 551e5e1 to ffab891 Compare January 9, 2025 11:24
@Revalioli Revalioli marked this pull request as ready for review January 9, 2025 11:25
@Revalioli Revalioli marked this pull request as draft January 13, 2025 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants