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
Improve vstart_runner to (optionally) create its own cluster #12800
Conversation
Instead of hunting around the filesystem for ceph-qa-suite, get it from our own location. Signed-off-by: John Spray <john.spray@redhat.com>
Previously this could get hung up if we killed one PID and then the daemon reappears with a different one (perhaps because we caught it during daemonization?) Signed-off-by: John Spray <john.spray@redhat.com>
Useful for vstart_runner.py to create a cluster with no filesystem (CephFSTestCase does the filesystem creation) Signed-off-by: John Spray <john.spray@redhat.com>
Convenient when you want to create a fresh cluster each test run: just pass --create and you'll get a cluster with the right number of daemons for the tests you're running. Signed-off-by: John Spray <john.spray@redhat.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor comments. I want to give this a try but won't be able to until I get back to the USA. Too many troubles with the VPN.
@@ -3,16 +3,16 @@ | |||
ceph instance instead of a packaged/installed cluster. Use this to turn around test cases | |||
quickly during development. | |||
|
|||
Usage (assuming teuthology, ceph, ceph-qa-suite checked out in ~/git): | |||
Simple usage (assuming teuthology, ceph, ceph-qa-suite checked out in ~/git): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can remove "ceph-qa-suite" above.
# Invoke a test using this script, with PYTHONPATH set appropriately | ||
python ~/git/ceph-qa-suite/tasks/vstart_runner.py | ||
# Invoke a test using this script | ||
python ~/git/ceph-qa-suite/tasks/vstart_runner.py --create tasks.cephfs.test_data_scan |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This command needs updated to ~/git/ceph/qa/...
.
# Invoke a test using this script | ||
python ~/git/ceph-qa-suite/tasks/vstart_runner.py --create tasks.cephfs.test_data_scan | ||
|
||
Alternative usage: | ||
|
||
# Alternatively, if you use different paths, specify them as follows: | ||
LD_LIBRARY_PATH=`pwd`/lib PYTHONPATH=~/git/teuthology:~/git/ceph-qa-suite:`pwd`/../src/pybind:`pwd`/lib/cython_modules/lib.2 python ~/git/ceph-qa-suite/tasks/vstart_runner.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These paths should be updated too.
I tried running the example test:
I had to fix a few permission denied errors by adding some sudos. Here's a patch:
After fixing that, I ran across a strange error or newly uncovered bug. A
To debug, I added a stat after the creation of
Here's the
So it went to owner root and permissions 0500. Looks like a bug or is this something else? |
To be clear, the patch doesn't necessarily need to be part of this PR I think and the bug is obviously a separate problem. What do you think @jcsp? |
@batrick when cephfs-data-scan injects a file from just its data objects, it invents some new metadata -- the uid/gid gets set to root/root. Last I ran these tests they definitely didn't require root, I wonder if you've changed machines and need to update configuration to enable mounting ceph fuse as non-root? |
Isn't that damage supposed to be repaired before getfattr gets executed?
I'm using my laptop as the rex machines' disks are full. I am able to do fuse mounts as a normal user. I was trying to resolve problems I saw here after a failure (undoing my patch and retrying):
I had noticed the Looking back in the logs, I remember I also saw this:
which made me think ceph-fuse had failed to start but now I see it was just normal log output after the process exited. So I think I don't actually need root for ceph-fuse (except for the dcache consistency) but I still have this chmod problem. Have you seen this before? |
...to use paths pointing to ceph tree, not ceph-qa-suite tree. Signed-off-by: John Spray <john.spray@redhat.com>
Updated the docstring |
@batrick it looks like somehow LocalFuseMount (vstart_runners special version) isn't getting used somehow on your system -- avoiding the chmod is one of the reasons it exists. I'm pretty sure this was working on my desktop but I can check when I get home |
@batrick yeah, this definitely works for me as an unprivileged user -- I suspect the breakage is either nothing to do with this PR, or you've got something funny in your python paths? |
I will give it another try. Maybe is something misconfigured, ya. |
@jcsp, tried again and got the same error. I don't have anything in my PYTHONPATH. I'm just using a virtualenv with teuthology and then starting vstart_runner.py:
By the debug log, it appears it is using LocalFuseMount as expected. In any case I think you can merge this if you want. This is most likely not relating to this PR. Other tests like tasks.cephfs.test_readahead work just fine. |
This is possible now that the qa-suite code is in the main ceph repo