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

python-rados: implement new aio_execute #12140

Closed
wants to merge 3 commits into from
Closed

python-rados: implement new aio_execute #12140

wants to merge 3 commits into from

Conversation

iain-buclaw-sociomantic
Copy link
Contributor

This exposes to the python API for the following C methods:

  • rados_aio_exec

The function was added to the C library in #11709.

@liewegas
Copy link
Member

@jdurgin safe for kraken?

@jdurgin jdurgin added this to the kraken milestone Nov 23, 2016
@jdurgin
Copy link
Member

jdurgin commented Nov 23, 2016

Yeah, happy to have pybind updates for kraken since they're low risk and much easier to depend on when they're in the same release as the new c function.

src/pybind/rados/rados.pyx Show resolved Hide resolved
src/pybind/rados/rados.pyx Show resolved Hide resolved
src/pybind/rados/rados.pyx Show resolved Hide resolved
src/pybind/rados/rados.pyx Show resolved Hide resolved
src/test/pybind/test_rados.py Show resolved Hide resolved
@liewegas
Copy link
Member

2016-11-29T04:21:25.622 INFO:tasks.workunit.client.0.smithi019.stderr:======================================================================
2016-11-29T04:21:25.622 INFO:tasks.workunit.client.0.smithi019.stderr:ERROR: test_rados.TestIoctx.test_aio_execute
2016-11-29T04:21:25.623 INFO:tasks.workunit.client.0.smithi019.stderr:----------------------------------------------------------------------
2016-11-29T04:21:25.623 INFO:tasks.workunit.client.0.smithi019.stderr:Traceback (most recent call last):
2016-11-29T04:21:25.623 INFO:tasks.workunit.client.0.smithi019.stderr:  File "/usr/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
2016-11-29T04:21:25.623 INFO:tasks.workunit.client.0.smithi019.stderr:    self.test(*self.arg)
2016-11-29T04:21:25.623 INFO:tasks.workunit.client.0.smithi019.stderr:  File "/home/ubuntu/cephtest/mnt.0/client.0/tmp/test_rados.py", line 837, in test_aio_execute
2016-11-29T04:21:25.623 INFO:tasks.workunit.client.0.smithi019.stderr:    comp = self.ioctx.aio_exec("foo", "hello", "say_hello", b"", oncomplete=cb)
2016-11-29T04:21:25.623 INFO:tasks.workunit.client.0.smithi019.stderr:AttributeError: 'rados.Ioctx' object has no attribute 'aio_exec'

http://pulpito.ceph.com/sage-2016-11-29_03:30:55-rados-wip-sage-testing---basic-smithi/584354

@iain-buclaw-sociomantic
Copy link
Contributor Author

@liewegas - Oops, looks like a typo. I just about managed to work out how to run the tests a couple hours ago but haven't looked since. I should add the safe callback tests first though.

@jdurgin
Copy link
Member

jdurgin commented Nov 29, 2016

could you add your signed-off-by to the commits as well (git commit -s adds it for you, and works with --amend)

yuriw added a commit that referenced this pull request Nov 30, 2016
Merge branch 'pybind-aioexec' of https://github.com/iain-buclaw-sociomantic/ceph into wip-yuri-testing2_2016_11_30

Signed-off-by: Yuri Weinstein <yweinste@redhat.com>
This exposes to the python API for the following C methods:
* rados_aio_exec

Signed-off-by: Iain Buclaw <iain.buclaw@sociomantic.com>
Signed-off-by: Iain Buclaw <iain.buclaw@sociomantic.com>
Signed-off-by: Iain Buclaw <iain.buclaw@sociomantic.com>
@iain-buclaw-sociomantic
Copy link
Contributor Author

@jdurgin - Signed and tested.

I updated the safe callback to removed the _PyBytes_Resize something in the internals of cython really didn't enjoy the double resize of the string.

Exception SystemError: '../Objects/stringobject.c:3903: bad argument to internal function' in 'rados.__aio_safe_cb' ignored

@jdurgin
Copy link
Member

jdurgin commented Nov 30, 2016

thanks! looks good

@jdurgin
Copy link
Member

jdurgin commented Dec 2, 2016

merged manually - had to remove tabs from test_rados.py for python3

@jdurgin jdurgin closed this Dec 2, 2016
jdurgin added a commit that referenced this pull request Dec 2, 2016
python-rados: implement new aio_execute

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
@iain-buclaw-sociomantic iain-buclaw-sociomantic deleted the pybind-aioexec branch December 2, 2016 10:56
@iain-buclaw-sociomantic
Copy link
Contributor Author

merged manually - had to remove tabs from test_rados.py for python3

Oops, sorry about that. And thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants