Passing LUA script via python rados execute

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

 



Hi Noah,

I'm trying to follow your example where you can pass a LUA script as json
when calling the rados execute function in Python. However I'm getting a
rados permission denied error saying its failed to read the test object I
have placed on the pool.

I have also tried calling the cls_hello object class and this works, so I
believe its something to do with the LUA functionality that's causing it to
bomb out. This is running on Kraken.

Any ideas would be gratefully received.

Nick

Ie
print json.dumps(cmd)
ret, data = ioctx.execute('test', 'lua', 'eval_json', json.dumps(cmd))

Outputs
python radoslua.py --object-name=test --pool=rbd
{"handler": "upper", "script": "\n      function upper(input, output)\n
input_str = input:str()\n        upper_str = string.upper(input_str)\n
output:append(upper_str)\n      end\n      cls.register(upper)\n  "}
Traceback (most recent call last):
  File "radoslua.py", line 47, in <module>
    ret, data = ioctx.execute('test', 'lua', 'eval_json', json.dumps(cmd))
  File "rados.pyx", line 451, in rados.requires.wrapper.validate_func
(/tmp/buildd/ceph-11.2.0/obj-x86_64-linux-gnu/src/pybind/rados/pyrex/rados.c
:4439)
  File "rados.pyx", line 2657, in rados.Ioctx.execute
(/tmp/buildd/ceph-11.2.0/obj-x86_64-linux-gnu/src/pybind/rados/pyrex/rados.c
:34056)
rados.PermissionError: Ioctx.read(rbd): failed to read test

_______________________________________________
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