Project

General

Profile

Actions

Tasks #73461

closed

Tasks #63293: Implement fscrypt in libcephfs and cephfs-fuse

Test setup fails on mount with-fscrypt-dummy

Added by Christopher Hoffman 5 months ago. Updated 5 months ago.

Status:
Resolved
Priority:
Normal
Category:
-
Target version:
-
% Done:

0%

Reviewed:
Affected Versions:
Component(FS):
Labels (FS):
Pull request ID:
Tags (freeform):
Merge Commit:
Fixed In:
Released In:
Upkeep Timestamp:

Description

https://pulpito.ceph.com/choffman-2025-10-06_14:01:01-fs:workload-wip-choffman-fscrypt-distro-default-smithi/8536811

Traceback (most recent call last):
  File "/home/teuthworker/src/git.ceph.com_teuthology_378312a23513074d6ab5d6aab631102b72c77ea7/teuthology/contextutil.py", line 30, in nested
    vars.append(enter())
  File "/usr/lib/python3.10/contextlib.py", line 135, in __enter__
    return next(self.gen)
  File "/home/teuthworker/src/git.ceph.com_ceph-c_2df7f4f95807da3ca6c77d9e3ff29ac0b740b2eb/qa/tasks/cephadm.py", line 1276, in cephfs_setup
    fs = Filesystem(ctx, fs_config=temp, name=name, create=True)
  File "/home/teuthworker/src/git.ceph.com_ceph-c_2df7f4f95807da3ca6c77d9e3ff29ac0b740b2eb/qa/tasks/cephfs/filesystem.py", line 574, in __init__
    self.create(**kwargs)
  File "/home/teuthworker/src/git.ceph.com_ceph-c_2df7f4f95807da3ca6c77d9e3ff29ac0b740b2eb/qa/tasks/cephfs/filesystem.py", line 795, in create
    self.run_client_payload(f"setfattr -n ceph.dir.layout.pool -v {ec_data_pool_name} . && getfattr -n ceph.dir.layout .")
  File "/home/teuthworker/src/git.ceph.com_ceph-c_2df7f4f95807da3ca6c77d9e3ff29ac0b740b2eb/qa/tasks/cephfs/filesystem.py", line 882, in run_client_payload
    m.run_shell_payload(cmd)
  File "/home/teuthworker/src/git.ceph.com_ceph-c_2df7f4f95807da3ca6c77d9e3ff29ac0b740b2eb/qa/tasks/cephfs/mount.py", line 821, in run_shell_payload
    p.wait()
  File "/home/teuthworker/src/git.ceph.com_teuthology_378312a23513074d6ab5d6aab631102b72c77ea7/teuthology/orchestra/run.py", line 161, in wait
    self._raise_for_status()
  File "/home/teuthworker/src/git.ceph.com_teuthology_378312a23513074d6ab5d6aab631102b72c77ea7/teuthology/orchestra/run.py", line 181, in _raise_for_status
    raise CommandFailedError(
teuthology.exceptions.CommandFailedError: Command failed on smithi046 with status 1: "(cd /home/ubuntu/cephtest/mnt.admin && exec stdin-killer --timeout=900 -- bash -c 'setfattr -n ceph.dir.layout.pool -v cephfs_data_ec . && getfattr -n ceph.dir.layout .')" 
Actions #1

Updated by Christopher Hoffman 5 months ago

  • Subject changed from Test setup fails on mount to Test setup fails on mount with-fscrypt-dummy

This fails as you cannot change layout on an fscrypt inode.
https://github.com/ceph/ceph/pull/43588/commits/c9db274e91b7cbdb51776019f866ac8d214ea7d8

Actions #2

Updated by Christopher Hoffman 5 months ago

  • Status changed from New to In Progress
Actions #3

Updated by Christopher Hoffman 5 months ago

  • Status changed from In Progress to Resolved

The issue after mount it tries to set layout which is not allowed on the mds since fscrypt is used.

The mds

In handle_client_setlayout

    /* encrypted directories can't have their layout changed */
    if (!cur->get_inode()->fscrypt_auth.empty()) {
      respond_to_request(mdr, -EINVAL);
      return;
    }

Here's the fix:

Author: Christopher Hoffman <choffman@redhat.com>
Date:   Tue Oct 14 14:33:47 2025 +0000

    qa: Do not use ec_profile with fscrypt dummy

    Once a volume/filesystem is set to use fscrypt encryption, layout
    cannot be changed. The configurable ec_profile, sets layout and
    will fail.

    Fixes: https://tracker.ceph.com/issues/73461
    Signed-off-by: Christopher Hoffman <choffman@redhat.com>

diff --git a/qa/suites/fs/workload/tasks/0-fscrypt/with-fscrypt-dummy.yaml b/qa/suites/fs/workload/tasks/0-fscrypt/with-fscrypt-dummy.yaml
index 9f15c355420..7f24635b03d 100644
--- a/qa/suites/fs/workload/tasks/0-fscrypt/with-fscrypt-dummy.yaml
+++ b/qa/suites/fs/workload/tasks/0-fscrypt/with-fscrypt-dummy.yaml
@@ -1,5 +1,8 @@
 overrides:
   ceph:
+    cephfs:
+      ec_profile:
+        - disabled
     conf:
       client:
         client_fscrypt_dummy_encryption: true

Failed run:
https://pulpito.ceph.com/choffman-2025-10-06_14:01:01-fs:workload-wip-choffman-fscrypt-distro-default-smithi/

Same tests reran has more passes and failures aren't related
https://pulpito.ceph.com/choffman-2025-10-14_19:14:36-fs:workload-wip-choffman-fscrypt-distro-default-smithi/

Actions

Also available in: Atom PDF