Tried to use vtag, vlock and the java client to lock a container/node in cavern but islocked was not set. Was able to lock/unlock using vtag at one time.The following shows the vtag commands when locking/unlock was working. Similar commands no longer works.
vtag --cert=/usr/cadc/dev/admin/test-certificates/x509_CADCRegtest1.pem vos:home/cadcregtest1/atest/locktest/2020-04-02T14-01-59 ivo://cadc.nrc.ca//vospace/core#islocked="true"
Check the node properties. The islocked property is there.
vtag --cert=/usr/cadc/dev/admin/test-certificates/x509_CADCRegtest1.pem vos:home/cadcregtest1/atest/locktest/2020-04-02T14-01-59
{'creator': 'cadcregtest1',
'date': '2020-04-02T21:02:07.235',
'ispublic': 'false',
'ivo://cadc.nrc.ca//vospace/core#islocked': 'true'}
vtag --cert=/usr/cadc/dev/admin/test-certificates/x509_CADCRegtest1.pem vos:home/cadcregtest1/atest/locktest/2020-04-02T14-01-59 ivo://cadc.nrc.ca//vospace/core#islocked
'true'
Delete the islocked property.
vtag --cert=/usr/cadc/dev/admin/test-certificates/x509_CADCRegtest1.pem vos:home/cadcregtest1/atest/locktest/2020-04-02T14-01-59 ivo://cadc.nrc.ca//vospace/core#islocked=
The islocked property is deleted.
vtag --cert=/usr/cadc/dev/admin/test-certificates/x509_CADCRegtest1.pem vos:home/cadcregtest1/atest/locktest/2020-04-02T14-01-59
{'creator': 'cadcregtest1',
'date': '2020-04-02T21:02:07.235',
'ispublic': 'false'}
The following is what the client received from cavern using the vlock command.
vlock -d --vos-debug --cert=/usr/cadc/dev/admin/test-certificates/x509_CADCRegtest1.pem vos:home/cadcregtest1/atest/locktest/2020-04-02T14-01-59 --lock
DEBUG 2020-04-02 14:23:02,391 140600699381568 vos-3.1.0 connectionpool._make_request.437 https://proto.canfar.net:443 "POST /cavern/nodes/home/cadcregtest1/atest/locktest/2020-04-02T14-01-59 HTTP/1.1" 200 760
DEBUG 2020-04-02 14:23:02,391 140600699381568 vos-3.1.0 ws.send.486 alinga-- return response <Response [200]>
DEBUG 2020-04-02 14:23:02,392 140600699381568 vos-3.1.0 vos.update.2562 update response: b'\r\n<vos:node xmlns:vos="http://www.ivoa.net/xml/VOSpace/v2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" uri="vos://canfar.net~cavern/home/cadcregtest1/atest/locktest/2020-04-02T14-01-59" xsi:type="vos:ContainerNode">\r\n vos:properties\r\n <vos:property uri="ivo://ivoa.net/vospace/core#creator" readOnly="false">cadcregtest1</vos:property>\r\n <vos:property uri="ivo://ivoa.net/vospace/core#date" readOnly="false">2020-04-02T21:02:07.235</vos:property>\r\n <vos:property uri="ivo://ivoa.net/vospace/core#ispublic" readOnly="false">false</vos:property>\r\n <vos:property uri="ivo://cadc.nrc.ca/vospace/core#islocked" readOnly="false">true</vos:property>\r\n </vos:properties>\r\n <vos:nodes />\r\n</vos:node>\r\n'
When the client set the islocked node property (using vlock), I saw the following in the cavern sever log. The last property was the islocked property being set to true. Yet when I used vtag to list the node properties, islocked wass not there, so it was not set.
253543045 cavern [request-proc-13] DEBUG NodeUtil - [nodeToPath] path: vos://canfar.netcavern/home/cadcregtest1/atest/locktest/2020-04-02T14-01-59 -> /cephfs/cavern/home/cadcregtest1/atest/locktest/2020-04-02T14-01-59
253543045 cavern [request-proc-13] DEBUG NodeUtil - setNodeProperties: ContainerNode [appData=NodeID[-1], uri=vos://canfar.netcavern/home/cadcregtest1/atest/locktest/2020-04-02T14-01-59, parent=vos://canfar.net~cavern/home/cadcregtest1/atest/locktest NodeID[-1], properties=[ivo://ivoa.net/vospace/core#creator: cadcregtest1, ivo://ivoa.net/vospace/core#date: 2020-04-02T21:02:07.235, ivo://ivoa.net/vospace/core#ispublic: false, ivo://cadc.nrc.ca/vospace/core#islocked: true]]
vtag --cert=/usr/cadc/dev/admin/test-certificates/x509_CADCRegtest1.pem vos:home/cadcregtest1/atest/locktest/2020-04-02T14-01-59
{'creator': 'cadcregtest1',
'date': '2020-04-02T21:02:07.235',
'ispublic': 'false'}
I tried using the java client to lock a file, it did not lock. Here is the command I executed:
./cadc-vos java -jar cadcVOSClient.jar --cert=/usr/cadc/dev/admin/test-certificates/x509_CADCRegtest1.pem --set --target=vos://canfar.net~cavern/home/cadcregtest1/atest/locktest/2020-04-04T20-59-53/something.png --lock
I saw the same debug log on cavern as when the python client was used.
190068570 cavern [request-proc-16] DEBUG NodeUtil - setNodeProperties: DataNode [appData=NodeID[-1], uri=vos://canfar.netcavern/home/cadcregtest1/atest/locktest/2020-04-04T20-59-53/something.png, parent=vos://canfar.netcavern/home/cadcregtest1/atest/locktest/2020-04-04T20-59-53 NodeID[-1], properties=[ivo://ivoa.net/vospace/core#creator: cadcregtest1, ivo://ivoa.net/vospace/core#date: 2020-04-05T04:00:06.011, ivo://ivoa.net/vospace/core#length: 497927, ivo://ivoa.net/vospace/core#MD5: 946e13bf8e50a4b6a8ab875d7dac614a, ivo://ivoa.net/vospace/core#type: image/png, ivo://ivoa.net/vospace/core#ispublic: false, ivo://cadc.nrc.ca/vospace/core#islocked: true]]
190068570 cavern [request-proc-16] DEBUG NodeUtil - setAttribute: ivo://ivoa.net/vospace/core#MD5 = 946e13bf8e50a4b6a8ab875d7dac614a
190068572 cavern [request-proc-16] DEBUG NodeUtil - setAttribute: ivo://ivoa.net/vospace/core#type = image/png
190068575 cavern [request-proc-16] DEBUG NodeAction - performNodeAction() elapsed time: 5ms
{"@timestamp":"2020-04-06 03:19:09.882","service":{"name":"cavern"},"thread":{"name":"request-proc-16"},"log":{"level":"info"},"phase":"end","ip":"10.233.114.0","method":"POST","path":"/cavern/nodes/home/cadcregtest1/atest/locktest/2020-04-04T20-59-53/something.png","success":true,"duration":90,"user":"cadcregtest1"}
However the node was not locked.
./cadc-vos java -jar cadcVOSClient.jar --cert=/usr/cadc/dev/admin/test-certificates/x509_CADCRegtest1.pem --view --target=vos://canfar.netcavern/home/cadcregtest1/atest/locktest/2020-04-04T20-59-53/something.png
data: vos://canfar.netcavern/home/cadcregtest1/atest/locktest/2020-04-04T20-59-53/something.png
creator: cadcregtest1
is locked:
last modified: 2020-04-05T04:00:06.011
readable by anyone: false
readable by:
readable and writable by:
size: 497927
type: image/png
encoding:
md5sum: 946e13bf8e50a4b6a8ab875d7dac614a
Here's a debug log on cavern. islocked was not present.
190430442 cavern [request-proc-11] DEBUG FileSystemNodePersistence - [get] DataNode [appData=NodeID[-1], uri=vos://canfar.netcavern/home/cadcregtest1/atest/locktest/2020-04-04T20-59-53/something.png, parent=vos://canfar.netcavern/home/cadcregtest1/atest/locktest/2020-04-04T20-59-53 NodeID[-1], properties=[ivo://ivoa.net/vospace/core#creator: cadcregtest1, ivo://ivoa.net/vospace/core#date: 2020-04-05T04:00:06.011, ivo://ivoa.net/vospace/core#length: 497927, ivo://ivoa.net/vospace/core#MD5: 946e13bf8e50a4b6a8ab875d7dac614a, ivo://ivoa.net/vospace/core#type: image/png, ivo://ivoa.net/vospace/core#ispublic: false]]