reva
reva copied to clipboard
OCM tutorial seems incomplete
The step that is supposed to demonstrate Accessing the share seems to be incomplete. It ends with Accessing the list of shares and the tutorial does not show how Marie can get access to the "Example file" text that Einstein uploaded.
The sending side does have ocdav enabled and there is a dataprovider service which I guess must be the "Data server" to which the file gets uploaded.
Hm
root@e4722163a802:/etc/revad# /reva/cmd/reva/reva -host localhost:19000 -insecure
reva-cli 9567525 (rev-9567525)
Please use `exit` or `Ctrl-D` to exit this program.
>> login basic
username: einstein
password: OK
>> mkdir testdir
error: code=CODE_INTERNAL msg="gateway could not find space for ref=<nil>:gateway: grpc failed with code CODE_INTERNAL" support_trace="adc842f406dca456cafa00098c251e60"
>>
Maybe the tutorial is not even working with the latest revad versions, or maybe this error is due to something that's specific to the ocm-test-suite image and config. I'll try running it with the exact config from examples/ocmd
docker run -d --network=testnet --name=ocmd-server-1.docker -e HOST=ocmd-server-1 -v /root/michiel-dev/reva:/reva revad sleep 300000
docker exec -it ocmd-server-1.docker /bin/bash
$ cd /reva
$ export PATH=$PATH:/usr/local/go/bin
$ go mod vendor
$ make deps
$ make build-revad
$ make build-reva
$ cd /etc/revad
$ /reva/cmd/revad/revad -c ocmd-server-1.toml
docker exec -it ocmd-server-1.docker /reva/cmd/reva/reva -insecure -host=localhost:19000
And
docker run -d --network=testnet --name=ocmd-server-2.docker -e HOST=ocmd-server-2 -v /root/michiel-dev/reva:/reva revad
docker exec -it ocmd-server-2.docker /reva/cmd/reva/reva -insecure -host=localhost:17000
Working on this in https://github.com/cs3org/ocm-test-suite/tree/revad-edge-testing since I want to use the exact filenames as the tutorial and users/providers.demo.json have been edited in the main branch of the ocm-test-suite.
-> https://github.com/cs3org/reva/issues/3365
-> https://github.com/cs3org/ocm-test-suite/issues/63
Note: The upload should be done to some path under /home/ and you need to
mkdir -p /var/tmp/reva/data/einstein/home
on the revad server first.
In the tutorial it says to mkdir /home/my-folder first, will try if that also works.
No, that step fails if /var/tmp/reva/data/einstein/home doesn't exist:
>> mkdir /home/my-folder
error: code=CODE_NOT_FOUND msg="path not found when creating container" support_trace="ffd1f60b92a7582c0e490252ad34c367"
Testing this how with Nextcloud->Reva->Reva->Nextcloud configuration.
>> ocm-share-create -grantee marie -idp https://revanc2.docker /home/my-folder
error: code=CODE_INTERNAL msg="error fetching remote user details" support_trace="34ea066ee6384723a7b5937a58518fdd"
>> ocm-find-accepted-users
+----------+-------------------------+------+-------------+
| OPAQUEID | IDP | MAIL | DISPLAYNAME |
+----------+-------------------------+------+-------------+
| marie | https://revanc2.docker/ | | marie |
+----------+-------------------------+------+-------------+
>> ocm-share-create -grantee marie -idp https://revanc2.docker/ /home/my-folder
error: code=CODE_INTERNAL msg="error creating share" support_trace="45fa6ae85774650b3987605eaf538ae4"
>>
2022-11-04 14:40:46.32 INF ../../reva/pkg/ocm/share/manager/nextcloud/nextcloud.go:214 > am.do response 201 {"id":{"opaque_id":null},"resource_id":{"opaque_id":"fileid-\/einstein\/files\/my-folder"},"permissions":{"permissions":{"add_grant":false,"create_container":false,"delete":false,"get_path":false,"get_quota":false,"initiate_file_download":false,"initiate_file_upload":false}},"grantee":{"type":1,"id":{"opaque_id":"marie","idp":"https:\/\/revanc2.docker\/"}},"owner":{"id":{"opaque_id":"einstein","idp":"https:\/\/revanc2.docker\/"}},"creator":{"id":{"opaque_id":"einstein","idp":"https:\/\/revanc2.docker\/"}},"ctime":{"seconds":0},"mtime":{"seconds":0}} pid=7 pkg=rgrpc traceid=74c9fa86e7270732e92daf34e0d16c26
2022-11-04 14:40:46.622 ERR ../../reva/internal/grpc/services/ocmshareprovider/ocmshareprovider.go:181 > error creating share error="error sending OCM POST: sender: error sending create ocm core share post request: 500 Internal Server Error: {\n \"code\": \"SERVER_ERROR\",\n \"message\": \"grpc create ocm core share request failed\"\n}" pid=7 pkg=rgrpc traceid=74c9fa86e7270732e92daf34e0d16c26
Improved error message:
>> ocm-share-create -grantee marie -idp https://revanc2.docker/ /home/my-folder
error: code=CODE_INTERNAL msg="error creating share: error sending OCM POST: sender: error from https://revanc2.docker/ocm/: 500 Internal Server Error: {\n \"code\": \"SERVER_ERROR\",\n \"message\": \"grpc create ocm core share request failed\"\n}" support_trace="72ee4eb0f21d2c75cf9a407f2a099622"
Debugging this more in https://github.com/pondersource/sciencemesh-php/issues/102 Once that is working we can also show it in the ocmd tutorial.