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

Lua object class support #7338

Merged
merged 2 commits into from Sep 22, 2016

Conversation

Projects
None yet
@noahdesu
Member

noahdesu commented Jan 24, 2016

No description provided.

@yuyuyu101

This comment has been minimized.

Show comment
Hide comment
@yuyuyu101

yuyuyu101 Jan 24, 2016

Member

COOL!

Not sure we need to contains lua source in ceph repo. Specify a external directory may better?

Member

yuyuyu101 commented Jan 24, 2016

COOL!

Not sure we need to contains lua source in ceph repo. Specify a external directory may better?

@cxwshawn

This comment has been minimized.

Show comment
Hide comment
@cxwshawn

cxwshawn Jan 24, 2016

Contributor

cool! looking forward to being merged !

Contributor

cxwshawn commented Jan 24, 2016

cool! looking forward to being merged !

@liewegas

This comment has been minimized.

Show comment
Hide comment
@liewegas

liewegas Jan 25, 2016

Member

Does it makes sense to use a submodule instead of an extracted tarball for lua?

Member

liewegas commented Jan 25, 2016

Does it makes sense to use a submodule instead of an extracted tarball for lua?

@noahdesu

This comment has been minimized.

Show comment
Hide comment
@noahdesu

noahdesu Jan 26, 2016

Member

@yuyuyu101 @liewegas I have no issue with Lua being in a submodule (what's the motivation?) The only important thing is that we control that submodule because we may want to customize the VM in the future, but I'm assuming I target a ceph/lua repo?

Member

noahdesu commented Jan 26, 2016

@yuyuyu101 @liewegas I have no issue with Lua being in a submodule (what's the motivation?) The only important thing is that we control that submodule because we may want to customize the VM in the future, but I'm assuming I target a ceph/lua repo?

@liewegas

This comment has been minimized.

Show comment
Hide comment
@liewegas

liewegas Jan 26, 2016

Member
Member

liewegas commented Jan 26, 2016

@noahdesu

This comment has been minimized.

Show comment
Hide comment
@noahdesu

noahdesu Jan 26, 2016

Member

sounds good. i'll need to have someone create ceph/lua repo.. looks like I don't have permission.

Member

noahdesu commented Jan 26, 2016

sounds good. i'll need to have someone create ceph/lua repo.. looks like I don't have permission.

@liewegas

This comment has been minimized.

Show comment
Hide comment
@liewegas
Member

liewegas commented Jan 26, 2016

@noahdesu

This comment has been minimized.

Show comment
Hide comment
@noahdesu

noahdesu Jan 27, 2016

Member

Thanks. I need push access to that repo. It isn't a vanilla Lua distribution, and its build configuration has been modified to assume cmake, so we'll need to hack it a bit to play nice with automake too.

Member

noahdesu commented Jan 27, 2016

Thanks. I need push access to that repo. It isn't a vanilla Lua distribution, and its build configuration has been modified to assume cmake, so we'll need to hack it a bit to play nice with automake too.

@batrick

This comment has been minimized.

Show comment
Hide comment
@batrick

batrick Jan 28, 2016

Member

Hi @noahdesu, this is an exciting feature! I'm still looking through the code and have yet to try this out but I was wondering why you include Roberto's Lua struct module when Lua 5.3 now has a pack function (which is loosely based on struct).

Member

batrick commented Jan 28, 2016

Hi @noahdesu, this is an exciting feature! I'm still looking through the code and have yet to try this out but I was wondering why you include Roberto's Lua struct module when Lua 5.3 now has a pack function (which is loosely based on struct).

@noahdesu

This comment has been minimized.

Show comment
Hide comment
@noahdesu

noahdesu Jan 28, 2016

Member

Hey @batrick thanks for pointing that out! I didn't realize that Lua 5.3 had this function. I wanted to include some useful serialization modules out-of-the-box so people could immediately start using this. It sounds like it might be OK to nuke the struct module for now. Let me know if you have any other questions or issues using cls_lua.

Member

noahdesu commented Jan 28, 2016

Hey @batrick thanks for pointing that out! I didn't realize that Lua 5.3 had this function. I wanted to include some useful serialization modules out-of-the-box so people could immediately start using this. It sounds like it might be OK to nuke the struct module for now. Let me know if you have any other questions or issues using cls_lua.

Show outdated Hide outdated src/CMakeLists.txt
@noahdesu

This comment has been minimized.

Show comment
Hide comment
@noahdesu

noahdesu Jan 30, 2016

Member

@liewegas mind adding me to ceph/lua so I can push there?

Member

noahdesu commented Jan 30, 2016

@liewegas mind adding me to ceph/lua so I can push there?

@yehudasa

This comment has been minimized.

Show comment
Hide comment
@yehudasa

yehudasa Jan 30, 2016

Member

@noahdesu I updated the permissions there

Member

yehudasa commented Jan 30, 2016

@noahdesu I updated the permissions there

@noahdesu

This comment has been minimized.

Show comment
Hide comment
@noahdesu

noahdesu Feb 1, 2016

Member

Thanks @yehudasa that worked. @liewegas ok got it all submodule-ified. @cbodley could you take a look at the new cmake files?

Member

noahdesu commented Feb 1, 2016

Thanks @yehudasa that worked. @liewegas ok got it all submodule-ified. @cbodley could you take a look at the new cmake files?

@cbodley

This comment has been minimized.

Show comment
Hide comment
@cbodley

cbodley Feb 1, 2016

Contributor

@noahdesu the cmake looks good, thanks. i'll check it out and make sure it builds for me too

Contributor

cbodley commented Feb 1, 2016

@noahdesu the cmake looks good, thanks. i'll check it out and make sure it builds for me too

@noahdesu

This comment has been minimized.

Show comment
Hide comment
@noahdesu

noahdesu Feb 7, 2016

Member

Rebased to remove merge recent merge conflicts.

Member

noahdesu commented Feb 7, 2016

Rebased to remove merge recent merge conflicts.

cls_method_context_t hctx = clslua_get_hctx(L);
const char *key = luaL_checkstring(L, 1);
bufferlist *bl = clslua_pushbufferlist(L, NULL);
int ret = cls_cxx_map_get_val(hctx, key, bl);

This comment has been minimized.

@batrick

batrick Feb 14, 2016

Member

I believe ret needs to be negated on error right? In my tests, it returns a negative value which gives us:

Unknown error -2

in the logs.

@batrick

batrick Feb 14, 2016

Member

I believe ret needs to be negated on error right? In my tests, it returns a negative value which gives us:

Unknown error -2

in the logs.

This comment has been minimized.

@noahdesu

noahdesu Feb 14, 2016

Member

Do you mean negated to resolve to the correct errno string via strerror, or negated to change the logic?

@noahdesu

noahdesu Feb 14, 2016

Member

Do you mean negated to resolve to the correct errno string via strerror, or negated to change the logic?

This comment has been minimized.

@batrick

batrick Feb 14, 2016

Member

To get the correct errno string I believe.

@batrick

batrick Feb 14, 2016

Member

To get the correct errno string I believe.

This comment has been minimized.

@noahdesu

noahdesu Feb 15, 2016

Member

Thanks for catching this Patrick. I pushed a fix for it that seems to work (note that I also rebased to fix a merge conflict in master) 50739d7

@noahdesu

noahdesu Feb 15, 2016

Member

Thanks for catching this Patrick. I pushed a fix for it that seems to work (note that I also rebased to fix a merge conflict in master) 50739d7

@athanatos

This comment has been minimized.

Show comment
Hide comment
@athanatos

athanatos May 4, 2016

Contributor

There was some discussion of this at one of the recent CDM's. I think one of the main concerns was that we need a mechanism to whitelist classes for users?

Contributor

athanatos commented May 4, 2016

There was some discussion of this at one of the recent CDM's. I think one of the main concerns was that we need a mechanism to whitelist classes for users?

@noahdesu

This comment has been minimized.

Show comment
Hide comment
@noahdesu

noahdesu Jun 27, 2016

Member

@athanatos yes. i just created PR #9972 for review, that adds the loading and caps whitelist changes for object classes.

Member

noahdesu commented Jun 27, 2016

@athanatos yes. i just created PR #9972 for review, that adds the loading and caps whitelist changes for object classes.

@noahdesu

This comment has been minimized.

Show comment
Hide comment
@noahdesu

noahdesu Jul 15, 2016

Member

@athanatos not sure what the next steps are for this. the whitelisting feature is merged now which was the latest blocker.

Member

noahdesu commented Jul 15, 2016

@athanatos not sure what the next steps are for this. the whitelisting feature is merged now which was the latest blocker.

@athanatos

This comment has been minimized.

Show comment
Hide comment
@athanatos

athanatos Jul 18, 2016

Contributor

This looks right to me. I think it should go through the rados suite.

Contributor

athanatos commented Jul 18, 2016

This looks right to me. I think it should go through the rados suite.

@athanatos

This comment has been minimized.

Show comment
Hide comment
@athanatos

athanatos Jul 26, 2016

Contributor

retest this please

Contributor

athanatos commented Jul 26, 2016

retest this please

@yuriw

This comment has been minimized.

Show comment
Hide comment
@noahdesu

This comment has been minimized.

Show comment
Hide comment
@noahdesu

noahdesu Jul 27, 2016

Member

@yuriw packages are building on centos-7 now and can be re-tested. thanks.

Member

noahdesu commented Jul 27, 2016

@yuriw packages are building on centos-7 now and can be re-tested. thanks.

set_target_properties(cls_lua PROPERTIES VERSION "1.0.0" SOVERSION "1")
install(TARGETS cls_lua DESTINATION ${cls_dir})
target_link_libraries(cls_lua
liblua

This comment has been minimized.

@dmick

dmick Jul 29, 2016

Member

I suspect this should just be "lua"; the built package is trying to find a dependency "libliblua"

@dmick

dmick Jul 29, 2016

Member

I suspect this should just be "lua"; the built package is trying to find a dependency "libliblua"

This comment has been minimized.

@cbodley

cbodley Jul 29, 2016

Contributor

from https://github.com/ceph/lua/blob/lua-5.1/CMakeLists.txt, the project actually defines a 'liblua' target that we refer to here:

add_library ( liblua SHARED ${SRC_LIB} ${LUA_DLL_RC} ${LUA_DEF} )
target_link_libraries ( liblua ${LIBS} )
set_target_properties ( liblua PROPERTIES OUTPUT_NAME lua CLEAN_DIRECT_OUTPUT 1 )

(the OUTPUT_NAME lua property is what prevents it from naming the output file libliblua.so)

@cbodley

cbodley Jul 29, 2016

Contributor

from https://github.com/ceph/lua/blob/lua-5.1/CMakeLists.txt, the project actually defines a 'liblua' target that we refer to here:

add_library ( liblua SHARED ${SRC_LIB} ${LUA_DLL_RC} ${LUA_DEF} )
target_link_libraries ( liblua ${LIBS} )
set_target_properties ( liblua PROPERTIES OUTPUT_NAME lua CLEAN_DIRECT_OUTPUT 1 )

(the OUTPUT_NAME lua property is what prevents it from naming the output file libliblua.so)

This comment has been minimized.

@cbodley

cbodley Jul 29, 2016

Contributor

oops, i see that the lua-5.3-ceph branch https://github.com/ceph/lua/blob/lua-5.3-ceph/CMakeLists.txt comments out the OUTPUT_NAME part. wonder if that's related

@cbodley

cbodley Jul 29, 2016

Contributor

oops, i see that the lua-5.3-ceph branch https://github.com/ceph/lua/blob/lua-5.3-ceph/CMakeLists.txt comments out the OUTPUT_NAME part. wonder if that's related

This comment has been minimized.

@noahdesu

noahdesu Aug 2, 2016

Member

Hmm, I'll try this naming change, but I don't see anything in rpmbuild docs that suggest the naming causes the auto dependency. What I'm wondering is if since liblua is being built as a shared library, but not being installed, that the dependency between the object class and liblua is being recorded. with a vstart setup this doesn't show up. linking statically into the object class may work.

@noahdesu

noahdesu Aug 2, 2016

Member

Hmm, I'll try this naming change, but I don't see anything in rpmbuild docs that suggest the naming causes the auto dependency. What I'm wondering is if since liblua is being built as a shared library, but not being installed, that the dependency between the object class and liblua is being recorded. with a vstart setup this doesn't show up. linking statically into the object class may work.

@yuriw

This comment has been minimized.

Show comment
Hide comment
@yuriw

yuriw Jul 29, 2016

Contributor

@noahdesu from IRC

(12:56:22 PM) yuriw: rados jobs failing ! http://tracker.ceph.com/issues/16860
(12:57:26 PM) dmick: it seems to be that the key error is
(12:57:38 PM) dmick: Error: Package: 1:ceph-base-11.0.0-1084.gf2349d2.x86_64 (Ceph)
(12:57:38 PM) dmick: Requires: libliblua.so()(64bit)
(12:58:53 PM) yuriw: libliblua is a submodule I needed for one of PR
(01:00:08 PM) dmick: submodule? not in master
(01:00:37 PM) dmick: but this is claiming that ceph-base was built with a package dependency on it
(01:03:28 PM) dmick: I don't see anything in that PR that changes ceph.spec though ?
(01:03:46 PM) dmick: #7338
(01:07:48 PM) dmick: I don't know how that package dependency got in there, but I'm guessing rpmbuild inferred it, and libliblua isn't being packaged. Since it says "libliblua", I suspect it's an error in the CMake stuff, where the library name shouldn't have 'lib' on it, maybe?.... in any event you should drop that PR and get Noah to investigate
(01:10:29 PM) dmick: yuriw: https://github.com/ceph/ceph/pull/7338/files#r72853201
(01:12:30 PM) zackc: wusui: ok, cool

Pls investigate and re-tag as needed.

Contributor

yuriw commented Jul 29, 2016

@noahdesu from IRC

(12:56:22 PM) yuriw: rados jobs failing ! http://tracker.ceph.com/issues/16860
(12:57:26 PM) dmick: it seems to be that the key error is
(12:57:38 PM) dmick: Error: Package: 1:ceph-base-11.0.0-1084.gf2349d2.x86_64 (Ceph)
(12:57:38 PM) dmick: Requires: libliblua.so()(64bit)
(12:58:53 PM) yuriw: libliblua is a submodule I needed for one of PR
(01:00:08 PM) dmick: submodule? not in master
(01:00:37 PM) dmick: but this is claiming that ceph-base was built with a package dependency on it
(01:03:28 PM) dmick: I don't see anything in that PR that changes ceph.spec though ?
(01:03:46 PM) dmick: #7338
(01:07:48 PM) dmick: I don't know how that package dependency got in there, but I'm guessing rpmbuild inferred it, and libliblua isn't being packaged. Since it says "libliblua", I suspect it's an error in the CMake stuff, where the library name shouldn't have 'lib' on it, maybe?.... in any event you should drop that PR and get Noah to investigate
(01:10:29 PM) dmick: yuriw: https://github.com/ceph/ceph/pull/7338/files#r72853201
(01:12:30 PM) zackc: wusui: ok, cool

Pls investigate and re-tag as needed.

@noahdesu

This comment has been minimized.

Show comment
Hide comment
@noahdesu

noahdesu Jul 29, 2016

Member

@yuriw gosh, ok thanks. sorry about these bugs I never expected this sort of thing since liblua isn't actually being installed :/

Member

noahdesu commented Jul 29, 2016

@yuriw gosh, ok thanks. sorry about these bugs I never expected this sort of thing since liblua isn't actually being installed :/

@yuriw

This comment has been minimized.

Show comment
Hide comment
@yuriw

yuriw Jul 29, 2016

Contributor

@noahdesu np :) if you have a quick fix I can take it back for re-test (if it's today)

Contributor

yuriw commented Jul 29, 2016

@noahdesu np :) if you have a quick fix I can take it back for re-test (if it's today)

@noahdesu

This comment has been minimized.

Show comment
Hide comment
@noahdesu

noahdesu Jul 29, 2016

Member

Ah, shoot, I won't be able to get to this until later this weekend.

Member

noahdesu commented Jul 29, 2016

Ah, shoot, I won't be able to get to this until later this weekend.

@yuriw

This comment has been minimized.

Show comment
Hide comment
@yuriw

yuriw Jul 29, 2016

Contributor

@noahdesu np we will take it in next batch then

Contributor

yuriw commented Jul 29, 2016

@noahdesu np we will take it in next batch then

@noahdesu

This comment has been minimized.

Show comment
Hide comment
@noahdesu

noahdesu Aug 3, 2016

Member

@yuriw @cbodley @dmick so i think i've resolved this by building a static lua library (i don't see the auto dependencies being created), but I am having an issue that is preventing me from running tests: on the trust debian builder all of the ceph_test_xxx have this warning:

warning: dpkg-shlibdeps: couldn't find library libgmock_main.so needed by debian/ceph-test/usr/bin/ceph_test_cls_rbd (ELF format: 'elf64-x86-64'; RPATH: '/usr/bin/../lib')

the full list of these warnings is at the bottom of http://gitbuilder.sepia.ceph.com/gitbuilder-ceph-deb-trusty-amd64-basic/log.cgi?log=abc439fc14fe963f1f239804ca1dca85cb7e48d1

so when I install the ceph-test package I cannot run the tests. I rebased on master to see if I needed to pick up any changes, but it isn't clear how / if I am introducing this. any thoughts?

Member

noahdesu commented Aug 3, 2016

@yuriw @cbodley @dmick so i think i've resolved this by building a static lua library (i don't see the auto dependencies being created), but I am having an issue that is preventing me from running tests: on the trust debian builder all of the ceph_test_xxx have this warning:

warning: dpkg-shlibdeps: couldn't find library libgmock_main.so needed by debian/ceph-test/usr/bin/ceph_test_cls_rbd (ELF format: 'elf64-x86-64'; RPATH: '/usr/bin/../lib')

the full list of these warnings is at the bottom of http://gitbuilder.sepia.ceph.com/gitbuilder-ceph-deb-trusty-amd64-basic/log.cgi?log=abc439fc14fe963f1f239804ca1dca85cb7e48d1

so when I install the ceph-test package I cannot run the tests. I rebased on master to see if I needed to pick up any changes, but it isn't clear how / if I am introducing this. any thoughts?

@ktdreyer

This comment has been minimized.

Show comment
Hide comment
@ktdreyer

ktdreyer Aug 4, 2016

Member

Noah, could you build against the system lua instead of bundling it into Ceph? (for example RHEL/CentOS 7 have lua-devel-5.1.4-14.el7)

When we bundle lua's source code into Ceph, the Ceph build time becomes longer, and the Ceph project becomes responsible for fixing CVEs in the bundled version, etc.

Member

ktdreyer commented Aug 4, 2016

Noah, could you build against the system lua instead of bundling it into Ceph? (for example RHEL/CentOS 7 have lua-devel-5.1.4-14.el7)

When we bundle lua's source code into Ceph, the Ceph build time becomes longer, and the Ceph project becomes responsible for fixing CVEs in the bundled version, etc.

@batrick

This comment has been minimized.

Show comment
Hide comment
@batrick

batrick Aug 4, 2016

Member

Does RHEL7 have Lua 5.3? Optionally building against the system Lua 5.3 sounds reasonable to me.

Also, Lua's source is pretty small. On my humble laptop a parallel make builds in 2.5 seconds.

Member

batrick commented Aug 4, 2016

Does RHEL7 have Lua 5.3? Optionally building against the system Lua 5.3 sounds reasonable to me.

Also, Lua's source is pretty small. On my humble laptop a parallel make builds in 2.5 seconds.

@noahdesu

This comment has been minimized.

Show comment
Hide comment
@noahdesu

noahdesu Aug 4, 2016

Member

I'm not opposed to linking against a system library, but it seems the precedent is to avoid this when embedding the VM mostly due to compatibility and customization issues. For instance Redis disables byte-code execution with a patch to the VM source, and other things are possible like switching out the native numeric data type.

From the Lua documentation: "Different versions are really different. The API is likely to be a little different (but with compatibility switches), and there is no ABI compatibility: applications that embed Lua and C libraries for Lua must be recompiled. The virtual machine is also very likely to be different in a new version: Lua programs that have been precompiled for one version will not load in a different version."

That might be manageable when creating releases, but strikes me as a headache waiting to happen especially for people mixing Lua versions. Thoughts?

Member

noahdesu commented Aug 4, 2016

I'm not opposed to linking against a system library, but it seems the precedent is to avoid this when embedding the VM mostly due to compatibility and customization issues. For instance Redis disables byte-code execution with a patch to the VM source, and other things are possible like switching out the native numeric data type.

From the Lua documentation: "Different versions are really different. The API is likely to be a little different (but with compatibility switches), and there is no ABI compatibility: applications that embed Lua and C libraries for Lua must be recompiled. The virtual machine is also very likely to be different in a new version: Lua programs that have been precompiled for one version will not load in a different version."

That might be manageable when creating releases, but strikes me as a headache waiting to happen especially for people mixing Lua versions. Thoughts?

@ktdreyer

This comment has been minimized.

Show comment
Hide comment
@ktdreyer

ktdreyer Aug 4, 2016

Member

There are pros and cons to bundling, and I wanted to at least have the discussion so I understand why we're doing it in each case. As long as the team is ok maintaining it when security fixes come up, I'm ok with it.

Member

ktdreyer commented Aug 4, 2016

There are pros and cons to bundling, and I wanted to at least have the discussion so I understand why we're doing it in each case. As long as the team is ok maintaining it when security fixes come up, I'm ok with it.

@noahdesu

This comment has been minimized.

Show comment
Hide comment
@noahdesu

noahdesu Aug 4, 2016

Member

Sounds good. I'm happy to do any tests or research on the issue for everyone to agree on an approach.

Member

noahdesu commented Aug 4, 2016

Sounds good. I'm happy to do any tests or research on the issue for everyone to agree on an approach.

@noahdesu

This comment has been minimized.

Show comment
Hide comment
@noahdesu

noahdesu Aug 9, 2016

Member

the libgmock_main.so problem was caused by some cmake stuff that the lua submodule was doing that was causing various other libraries to be built as shared libraries rather than the expected static variety.

@yuriw anyway, let's give this a shot again. i was able to install from packages on deb/rhel and things are working now.

Member

noahdesu commented Aug 9, 2016

the libgmock_main.so problem was caused by some cmake stuff that the lua submodule was doing that was causing various other libraries to be built as shared libraries rather than the expected static variety.

@yuriw anyway, let's give this a shot again. i was able to install from packages on deb/rhel and things are working now.

@noahdesu noahdesu added the needs-qa label Aug 9, 2016

@tchaikov

This comment has been minimized.

Show comment
Hide comment
@tchaikov

tchaikov Aug 9, 2016

Contributor

the libgmock_main.so problem was caused by some cmake stuff that the lua submodule was doing that was causing various other libraries to be built as shared libraries rather than the expected static variety.

@noahdesu in case you didn't find it, see https://github.com/ceph/lua/blob/lua-5.1/cmake/dist.cmake#L77 . i suffered from this when working with gmock also. we need to reset this variable after including the lua subdirectory, or save and restore it before and after including the lua subdirectory.

Contributor

tchaikov commented Aug 9, 2016

the libgmock_main.so problem was caused by some cmake stuff that the lua submodule was doing that was causing various other libraries to be built as shared libraries rather than the expected static variety.

@noahdesu in case you didn't find it, see https://github.com/ceph/lua/blob/lua-5.1/cmake/dist.cmake#L77 . i suffered from this when working with gmock also. we need to reset this variable after including the lua subdirectory, or save and restore it before and after including the lua subdirectory.

@noahdesu

This comment has been minimized.

Show comment
Hide comment
@noahdesu

noahdesu Aug 9, 2016

Member

@tchaikov nice thanks for the reference, that was a tough one to track down. is there any reason to patch the lua variable? when i was reading through dist.cmake i didn't see anything in there we care about. it was packaging and installation stuff.

Member

noahdesu commented Aug 9, 2016

@tchaikov nice thanks for the reference, that was a tough one to track down. is there any reason to patch the lua variable? when i was reading through dist.cmake i didn't see anything in there we care about. it was packaging and installation stuff.

@tchaikov

This comment has been minimized.

Show comment
Hide comment
@tchaikov

tchaikov Aug 9, 2016

Contributor

Noah, see https://cmake.org/cmake/help/v3.0/variable/BUILD_SHARED_LIBS.html . this variable changes the default behavior of add_library(). and as we are including lua, not building it as a separated module, this variable actually impacts the whole project, including the gmock, which is also included by us.

Contributor

tchaikov commented Aug 9, 2016

Noah, see https://cmake.org/cmake/help/v3.0/variable/BUILD_SHARED_LIBS.html . this variable changes the default behavior of add_library(). and as we are including lua, not building it as a separated module, this variable actually impacts the whole project, including the gmock, which is also included by us.

@noahdesu noahdesu removed the needs-qa label Aug 9, 2016

@noahdesu

This comment has been minimized.

Show comment
Hide comment
@noahdesu

noahdesu Aug 9, 2016

Member

@tchaikov cool thanks. i'll get that fixed up tomorrow.

Member

noahdesu commented Aug 9, 2016

@tchaikov cool thanks. i'll get that fixed up tomorrow.

@noahdesu

This comment has been minimized.

Show comment
Hide comment
@noahdesu

noahdesu Aug 9, 2016

Member

@tchaikov I think I misread your comment. I understand the global impact of the BUILD_SHARED_LIBS variable. I was asking about patching it indirectly: that variable is set in lua/cmake/dist.cmake which contains stuff related to installation and packaging---cmake boilerplate that we do not depend on, including shared library building which doesn't matter since we build lua as a static library. So I disabled the entire inclusion of lua/cmake/dist.cmake, including the BUILD_SHARED_LIBS global variable. This file also sets numerous cmake variables, so we don't need to worry about them clobbering other settings either.

Member

noahdesu commented Aug 9, 2016

@tchaikov I think I misread your comment. I understand the global impact of the BUILD_SHARED_LIBS variable. I was asking about patching it indirectly: that variable is set in lua/cmake/dist.cmake which contains stuff related to installation and packaging---cmake boilerplate that we do not depend on, including shared library building which doesn't matter since we build lua as a static library. So I disabled the entire inclusion of lua/cmake/dist.cmake, including the BUILD_SHARED_LIBS global variable. This file also sets numerous cmake variables, so we don't need to worry about them clobbering other settings either.

@noahdesu noahdesu added the needs-qa label Aug 9, 2016

@batrick

This comment has been minimized.

Show comment
Hide comment
@batrick

batrick Aug 9, 2016

Member

@noahdesu, have you seen the thread on ceph-devel concerning Lua packaging? I'd link to it but gmane appears down (maybe permanently).

In particular, I'm concerned about including Ceph libraries in the lua submodule. Can those be moved src/cls/lua?

Member

batrick commented Aug 9, 2016

@noahdesu, have you seen the thread on ceph-devel concerning Lua packaging? I'd link to it but gmane appears down (maybe permanently).

In particular, I'm concerned about including Ceph libraries in the lua submodule. Can those be moved src/cls/lua?

@noahdesu noahdesu removed the needs-qa label Aug 9, 2016

@noahdesu

This comment has been minimized.

Show comment
Hide comment
@noahdesu

noahdesu Aug 9, 2016

Member

@batrick thanks for the pointer, i'll chime in on the list. about your question here: you are referring to cmsgpack and the bufferlist bindings? absolutely, they can be moved to src/cls/lua. lua was originally moved to a submodule and the reason people wanted that was that it 1) screwed up LOC stats and 2) ostensibly was easier to manage. Since I didn't author cmsgpack it seemed more appropriate there, but its easy to move. The reasoning behind leaving bufferlist bindings there was because it was general purpose.

Member

noahdesu commented Aug 9, 2016

@batrick thanks for the pointer, i'll chime in on the list. about your question here: you are referring to cmsgpack and the bufferlist bindings? absolutely, they can be moved to src/cls/lua. lua was originally moved to a submodule and the reason people wanted that was that it 1) screwed up LOC stats and 2) ostensibly was easier to manage. Since I didn't author cmsgpack it seemed more appropriate there, but its easy to move. The reasoning behind leaving bufferlist bindings there was because it was general purpose.

@tchaikov

This comment has been minimized.

Show comment
Hide comment
@tchaikov

tchaikov Aug 10, 2016

Contributor

I was asking about patching it indirectly: that variable is set in lua/cmake/dist.cmake which contains stuff related to installation and packaging---cmake boilerplate that we do not depend on, including shared library building which doesn't matter since we build lua as a static library. So I disabled the entire inclusion of lua/cmake/dist.cmake, including the BUILD_SHARED_LIBS global variable.

@noahdesu sorry, i failed to understand your question. ic. i thought a less intrusive way would be easier for maintenance. but when i am looking at https://github.com/ceph/lua/commits/lua-5.3-ceph: well, we have already added a handful of patches on top of lua-5.3 branch, yet another one won't hurt. =)

Contributor

tchaikov commented Aug 10, 2016

I was asking about patching it indirectly: that variable is set in lua/cmake/dist.cmake which contains stuff related to installation and packaging---cmake boilerplate that we do not depend on, including shared library building which doesn't matter since we build lua as a static library. So I disabled the entire inclusion of lua/cmake/dist.cmake, including the BUILD_SHARED_LIBS global variable.

@noahdesu sorry, i failed to understand your question. ic. i thought a less intrusive way would be easier for maintenance. but when i am looking at https://github.com/ceph/lua/commits/lua-5.3-ceph: well, we have already added a handful of patches on top of lua-5.3 branch, yet another one won't hurt. =)

@michaelsevilla

This comment has been minimized.

Show comment
Hide comment
@michaelsevilla

michaelsevilla Sep 2, 2016

Contributor

What is the status on this?

Contributor

michaelsevilla commented Sep 2, 2016

What is the status on this?

@noahdesu

This comment has been minimized.

Show comment
Hide comment
@noahdesu

noahdesu Sep 2, 2016

Member

I need to take another look at the thread on ceph-devel to make sure nothing is missing, but I think we just need to slap needs-qa back on this.

Member

noahdesu commented Sep 2, 2016

I need to take another look at the thread on ceph-devel to make sure nothing is missing, but I think we just need to slap needs-qa back on this.

noahdesu added some commits Jan 19, 2016

cls-lua: write object classes in Lua
Introduces cls_lua that allows object classes to be created dynamically
using the Lua language. Each request is processed in an empty Lua VM
instance, and scripts can be submitted using bufferlist or JSON
encoding.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
liblua: build Lua convenience library
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>

@noahdesu noahdesu added the needs-qa label Sep 14, 2016

@yuriw yuriw merged commit ab42f60 into master Sep 22, 2016

2 checks passed

Signed-off-by all commits in this PR are signed
Details
default Build finished.
Details

@batrick batrick deleted the cls-lua branch Sep 23, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment