Bug report: unexpected behavior when executing Lua object class

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I found two bugs when testing out Lua object class. I am running with Ceph 11.2.0. Can anybody take a look at them?

Zheyuan


Bug 1: I can not get returned output in the first script. "data" is always empty.

import rados, json
cluster = rados.Rados(conffile='')
cluster.connect()
ioctx = cluster.open_ioctx('data')
cmd = {
    "script": """
        function test(input, output)
            data = "">            data:append("test")
            objclass.write_full(data, #data)
            output:append("Here is the return value")
        end
        objclass.register(test)
    """,
    "handler": "test",
    "input": "",
}
# I can not get returned data
ret, data = "" 'lua', 'eval_json', json.dumps(cmd))
print ret, data
 
cmd = {
    "script": """
        function test(input, output)
            output:append("Here is the return value")
        end
        objclass.register(test)
    """,
    "handler": "test",
    "input": "",
}
# I can get returned data
ret, data = "" 'lua', 'eval_json', json.dumps(cmd))
print ret, data

Bug 2:
The returned mtime is always 0.

cmd = {
    "script": """
        function test(input, output)
            size, mtime = objclass.stat()
            output:append(tostring(size))
            output:append(tostring(","))
            output:append(tostring(mtime))
        end
        objclass.register(test)
    """,
    "handler": "test",
    "input": "",
}
ret, data = "" 'lua', 'eval_json', json.dumps(cmd))
print ret, data 
_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux