qa/cephfs: don't use sudo to write files in /tmp#40431
Merged
batrick merged 2 commits intoceph:masterfrom Apr 10, 2021
Merged
Conversation
Contributor
Author
|
Got this flake8 error (from make check) fixed locally - I'll update the PR after this job finishes running - http://pulpito.front.sepia.ceph.com/rishabh-2021-03-26_11:20:12-fs-wip-rishabh-vr-set-shell-to-True-distro-basic-smithi/ |
5367afd to
5a5cc5c
Compare
jtlayton
approved these changes
Mar 26, 2021
5a5cc5c to
f89f31e
Compare
batrick
approved these changes
Mar 31, 2021
Member
|
jenkins test api |
Member
|
jenkins test api |
batrick
requested changes
Apr 6, 2021
qa/tasks/cephfs/cephfs_test_case.py
Outdated
| # required when triggered using vstart_runner.py. | ||
| remote.run(args=['chmod', '644', keyring_path]) | ||
| # mode must be 644 for vstart_runner.py. | ||
| keyring_path = remote.mktemp(data=keyring, mode='644') |
Member
There was a problem hiding this comment.
2021-04-01T01:07:43.141 INFO:tasks.cephfs_test_runner:======================================================================
2021-04-01T01:07:43.147 INFO:tasks.cephfs_test_runner:ERROR: test_mount_all_caps_absent (tasks.cephfs.test_multifs_auth.TestClientsWithoutAuth)
2021-04-01T01:07:43.147 INFO:tasks.cephfs_test_runner:----------------------------------------------------------------------
2021-04-01T01:07:43.148 INFO:tasks.cephfs_test_runner:Traceback (most recent call last):
2021-04-01T01:07:43.149 INFO:tasks.cephfs_test_runner: File "/home/teuthworker/src/git.ceph.com_ceph-c_5c92bde19d0b1ad5e2a680f5925b00ec1f942c7d/qa/tasks/cephfs/test_multifs_auth.py", line 279, in test_mount_all_caps_absent
2021-04-01T01:07:43.149 INFO:tasks.cephfs_test_runner: keyring)
2021-04-01T01:07:43.150 INFO:tasks.cephfs_test_runner: File "/home/teuthworker/src/git.ceph.com_ceph-c_5c92bde19d0b1ad5e2a680f5925b00ec1f942c7d/qa/tasks/cephfs/cephfs_test_case.py", line 447, in create_keyring_file
2021-04-01T01:07:43.150 INFO:tasks.cephfs_test_runner: keyring_path = remote.mktemp(data=keyring, mode='644')
2021-04-01T01:07:43.151 INFO:tasks.cephfs_test_runner:TypeError: mktemp() got an unexpected keyword argument 'mode'
From: /ceph/teuthology-archive/pdonnell-2021-04-01_00:45:34-fs-wip-pdonnell-testing-20210331.222326-distro-basic-smithi/6013903/teuthology.log
Files in /tmp cannot be written by any user( including the root user) other than the file owner even if the permission mode on the file is 777. Fixes: https://tracker.ceph.com/issues/49466 Signed-off-by: Rishabh Dave <ridave@redhat.com>
Since teuthology.orchestra.remote.mktemp() can write a temporary file and not just create it, create_keyring_file() is now redundant. Signed-off-by: Rishabh Dave <ridave@redhat.com>
f89f31e to
511434a
Compare
batrick
approved these changes
Apr 8, 2021
Member
|
Test the tmp file mentioned above on CentOS 8.1 with the ceph-client's latest kernel, please see bellow: The root user can write to the tmp files not owned by it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Files in /tmp cannot be written by any user( including the root user)
other than the file owner even if the permission mode on the file is
777.
Fixes: https://tracker.ceph.com/issues/49466
Marked DNM because -
Depends on ceph/teuthology#1634.
To fix the same issue for vstart_runner.py this PR depends on #37655.
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume tox