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

Add ceph_ll_setlk and ceph_ll_getlk #9566

Merged
merged 3 commits into from Aug 7, 2016
Merged

Add ceph_ll_setlk and ceph_ll_getlk #9566

merged 3 commits into from Aug 7, 2016

Conversation

ffilz
Copy link
Contributor

@ffilz ffilz commented Jun 7, 2016

No description provided.

@gregsfortytwo
Copy link
Member

@ffilz, this looks fine. Can you add test cases to src/test/libcephfs/flock.cc as well? :)

@jcsp
Copy link
Contributor

jcsp commented Jun 9, 2016

Waiting for tests before including this in a fs suite run

@jcsp
Copy link
Contributor

jcsp commented Jun 24, 2016

@ffilz please could you update this with tests so that we can merge it?

@jcsp
Copy link
Contributor

jcsp commented Jun 27, 2016

Oh, also, please update the libcephfs change's commit message to start "libcephfs: " (see other ceph commits for style)

@ffilz
Copy link
Contributor Author

ffilz commented Jun 27, 2016

How much of a test should we add for setlk and getlk? Is there truly no tests of the underlying C++ methods?

@gregsfortytwo
Copy link
Member

There's lots of tests of the underlying Client logic in that test file I referenced, @ffilz. We just want enough to demonstrate that these new glue functions (instead of the fd-based ceph_flock) function as well.

@jcsp
Copy link
Contributor

jcsp commented Jul 12, 2016

@ffilz ping -- can we get this finished off so that it can be merged?

@ffilz
Copy link
Contributor Author

ffilz commented Jul 12, 2016

Sorry, I've been deep in trying to figure out why FSAL_CEPH isn't working on Ganesha...

Will try and find time this week to add some tests.

@ffilz ffilz force-pushed the master branch 2 times, most recently from 1a0e997 to ea0c76e Compare July 19, 2016 20:43
@ffilz
Copy link
Contributor Author

ffilz commented Jul 19, 2016

I think that covers it. I added unit tests in a new file since setlk/getlk are different from flock.

@jcsp
Copy link
Contributor

jcsp commented Jul 25, 2016

Looks good, @ffilz please can you remove the "#if 0" blocks and this will be good to merge.

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
@ffilz
Copy link
Contributor Author

ffilz commented Jul 26, 2016

Hmm, I pushed too soon... So I finished up the stuff that had been ifdefed out, but it fails. So then I tried running flock.cc, and it fails in the same place...

Basically the multi-threaded test synchronization is failing.

I'm not sure how much effort should be put into the test now, the basic functionality is working (and I did another test outside Ganesha of ceph_ll_setlk and it's working fine, multi-threaded and multi-process).

@jcsp
Copy link
Contributor

jcsp commented Jul 27, 2016

@ffilz ah, you're hitting http://tracker.ceph.com/issues/16556, can you try uncommenting out your tests in conjunction with #10452?

@ffilz
Copy link
Contributor Author

ffilz commented Jul 27, 2016

Yes, pull request #10452 solves the problem. I've pushed updated patches with the #if 0 taken out (and some code I didn't finish completed).

@jcsp
Copy link
Contributor

jcsp commented Jul 28, 2016

@ffilz
Copy link
Contributor Author

ffilz commented Jul 28, 2016

It looks like there were some failures, but I don't fully understand all the output...

@jcsp
Copy link
Contributor

jcsp commented Jul 29, 2016

Weird, it passes locally but is failing in the lab on the final unlink in all the recordlock tests.

@jcsp
Copy link
Contributor

jcsp commented Jul 29, 2016

@ffilz oh, the problem is that you're mixing ll and regular functions, and the initial ceph_ll_create is being passed uid/gid=0/0, while the final ceph_unlink call is subject to uid/gid checks for the current user. I'd suggest checking that ceph_unlink to be a ceph_ll_unlink

@ffilz
Copy link
Contributor Author

ffilz commented Jul 29, 2016

Ah, cool, will do.

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
@ffilz
Copy link
Contributor Author

ffilz commented Jul 29, 2016

Ok, let's try that now...

@jcsp jcsp assigned jcsp and unassigned ffilz Aug 2, 2016
@jcsp
Copy link
Contributor

jcsp commented Aug 5, 2016

Unfortunately LibCephFS.InterProcessRecordLocking is generating a lockdep failure: http://qa-proxy.ceph.com/teuthology/jspray-2016-08-02_12:58:37-fs-wip-jcsp-testing-20160802-distro-basic-mira/346922/teuthology.log

It's pretty weird that there are no symbols in the backtrace, not immediately obvious to me what's going on here.

@ffilz
Copy link
Contributor Author

ffilz commented Aug 5, 2016

Remember we need pull request #10452...

Should I merge on top of that? Or just wait for that to merge first, then we can merge this one?

@jcsp
Copy link
Contributor

jcsp commented Aug 5, 2016

Pushed wip-jcsp-testing-20160805 + will re-run fs/verify against that. I can live with the uncertainty of what the root cause is if #10452 fixes it

@jcsp jcsp merged commit df32a8b into ceph:master Aug 7, 2016
@jcsp
Copy link
Contributor

jcsp commented Aug 7, 2016

Passed here: http://pulpito.ceph.com/jspray-2016-08-07_03:15:31-fs:verify-wip-jcsp-testing-20160805-distro-basic-mira/

(Yeah, believe it or not that's a pass, the failures are OSD InvalidReads and an ansible puke)

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