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

qa: cephfs add fscrypt test suite support for kclient #48628

Merged
merged 10 commits into from Dec 6, 2022

Conversation

lxbsz
Copy link
Member

@lxbsz lxbsz commented Oct 26, 2022

Add the fscrypt test suite for kclient only. This will include IO path tests and common test for file encrypt feature by using the xfstests-dev tool.

All these tests currently are basic test cases. And in future I will add more tests in detail.

Fixes: https://tracker.ceph.com/issues/58133

Contribution Guidelines

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows

@github-actions github-actions bot added cephfs Ceph File System tests labels Oct 26, 2022
@lxbsz lxbsz marked this pull request as draft October 26, 2022 05:35
@lxbsz
Copy link
Member Author

lxbsz commented Oct 26, 2022

This will depend on xfstests patches in [1], which is still under reviewing, and backport them.

[1] https://patchwork.kernel.org/project/ceph-devel/list/?series=688926

@lxbsz
Copy link
Member Author

lxbsz commented Nov 23, 2022

This will depend on #49021, which will switch https protocol for the repos.

@lxbsz lxbsz force-pushed the kclient_fscrypt branch 5 times, most recently from 65888ee to e18a03b Compare November 23, 2022 14:27
@lxbsz
Copy link
Member Author

lxbsz commented Nov 23, 2022

Currently the xfs_io command version is not high enough to support the 'set_enckey'. So I need to install the xfs_io from source and need to upload the xfsprogs-dev repo to git.ceph.com server.

Still not sure how to do it yet.

@lxbsz lxbsz force-pushed the kclient_fscrypt branch 2 times, most recently from 96591dd to c8e75f4 Compare November 28, 2022 08:19
@vshankar
Copy link
Contributor

vshankar commented Dec 1, 2022

jenkins test make check

Since the git protocol is not reachable any more, just switch it
to https.

Fixes: https://tracker.ceph.com/issues/58133
Signed-off-by: Xiubo Li <xiubli@redhat.com>
ceph file encryption test cases need the SCRATCH_DEV.

Fixes: https://tracker.ceph.com/issues/58133
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Both the test_dev and scratch_dev could use the CEPHFS_MOUNT_OPTIONS.
Without this the xfstests tests will just be aborted without any error
logs when testing the encrypt and it's very hard to debug.

Fixes: https://tracker.ceph.com/issues/58133
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Currently the xfsprogs packages won't support the 'add_enckey' feature
in xfs_io command, we need to install it from source.

Fixes: https://tracker.ceph.com/issues/58133
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Which is irrelevant to this test.

Fixes: https://tracker.ceph.com/issues/58133
Signed-off-by: Xiubo Li <xiubli@redhat.com>
We need to install the xfsprogs-dev from source to make the xfs_io
command to support the 'add_enckey'.

Currently we couldn't install 'userspace-rcu-devel', 'libedit-devel'
and 'device-mapper-devel' from rhel distos. So the file encyrpt test
cases will skip the rhel distos for now. And it works well on centos
and ubuntu.

Fixes: https://tracker.ceph.com/issues/58133
Signed-off-by: Xiubo Li <xiubli@redhat.com>
This will allow us to create a encrypted test directory to do the
I/O test.

More coplex fscrypt tests we will use the xfstest-dev later.

Fixes: https://tracker.ceph.com/issues/58133
Signed-off-by: Xiubo Li <xiubli@redhat.com>
This will test the common fscrypt features such as the set_encpolicy,
get_encpolicy,etc only.

Will run the IO path test in another test suite.

Fixes: https://tracker.ceph.com/issues/58133
Signed-off-by: Xiubo Li <xiubli@redhat.com>
For both io path and common test cases in xfstests. Currently only
support the centos and ubuntu distros. But for rhel we couldn't
install the 'userspace-rcu-devel', 'device-mapper-devel' and
'libedit-devel' dependency packages.

Fixes: https://tracker.ceph.com/issues/58133
Signed-off-by: Xiubo Li <xiubli@redhat.com>
@lxbsz
Copy link
Member Author

lxbsz commented Dec 1, 2022

jenkins test make check

@lxbsz
Copy link
Member Author

lxbsz commented Dec 1, 2022

Fixed a flake8 failure:

./tasks/cephfs/xfstests_dev.py:55:9: F401 'teuthology.orchestra.run' imported but unused

@lxbsz
Copy link
Member Author

lxbsz commented Dec 1, 2022

@vshankar Any other test case should we run ? Since this only affect the test_acl existing test, IMO it should be enough.

@vshankar
Copy link
Contributor

vshankar commented Dec 5, 2022

jenkins test make check

Copy link
Contributor

@vshankar vshankar left a comment

Choose a reason for hiding this comment

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

LGTM

@vshankar
Copy link
Contributor

vshankar commented Dec 5, 2022

(Will merge post jenkins checks)

@vshankar
Copy link
Contributor

vshankar commented Dec 5, 2022

@vshankar Any other test case should we run ? Since this only affect the test_acl existing test, IMO it should be enough.

... and generic/099 and encrypt test too, isn't it?

@lxbsz
Copy link
Member Author

lxbsz commented Dec 6, 2022

@vshankar Any other test case should we run ? Since this only affect the test_acl existing test, IMO it should be enough.

... and generic/099 and encrypt test too, isn't it?

No, it's for ACL test. Please see test_acl.py

@lxbsz
Copy link
Member Author

lxbsz commented Dec 6, 2022

jenkins test windows

@lxbsz
Copy link
Member Author

lxbsz commented Dec 6, 2022

jenkins test make check arm64

@vshankar
Copy link
Contributor

vshankar commented Dec 6, 2022

No, it's for ACL test. Please see test_acl.py

I meant the same. This change is fine. BTW, test_fscrypt.py runs

./check -g encrypt

which runs 26 tests and I presume that covers the entire I/O path, yes?

@lxbsz
Copy link
Member Author

lxbsz commented Dec 6, 2022

No, it's for ACL test. Please see test_acl.py

I meant the same. This change is fine. BTW, test_fscrypt.py runs

./check -g encrypt

which runs 26 tests and I presume that covers the entire I/O path, yes?

No, it won't cover the IO path in this 26 tests. They will only test the filename and other common encrypt features in kclient. The IO path will be tested in fscrypt.sh instead.

In fscrypt.sh it will test the IO path by disabling and enabling the encrypt for testdirs.

After this I will add more test cases when the contents patches are in testing branches, such as verifying the contents test cases. But currently this test makes no sense.

@vshankar
Copy link
Contributor

vshankar commented Dec 6, 2022

No, it won't cover the IO path in this 26 tests. They will only test the filename and other common encrypt features in kclient. The IO path will be tested in fscrypt.sh instead.

In fscrypt.sh it will test the IO path by disabling and enabling the encrypt for testdirs.

OK. So, your test run did cover that too. That's what I'm looking for.

After this I will add more test cases when the contents patches are in testing branches, such as verifying the contents test cases. But currently this test makes no sense.

Sure.

@lxbsz
Copy link
Member Author

lxbsz commented Mar 29, 2023

Once the ceph-fuse or distro kernels have supported the fscrypt feature in future, we need to enable it in #50728.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cephfs Ceph File System tests
Projects
None yet
4 participants