Skip to content
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

OCM tutorial seems incomplete #3364

Closed
michielbdejong opened this issue Oct 17, 2022 · 13 comments
Closed

OCM tutorial seems incomplete #3364

michielbdejong opened this issue Oct 17, 2022 · 13 comments

Comments

@michielbdejong
Copy link
Contributor

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.

@michielbdejong
Copy link
Contributor Author

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.

@michielbdejong
Copy link
Contributor Author

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

michielbdejong pushed a commit to cs3org/ocm-test-suite that referenced this issue Oct 17, 2022
@michielbdejong
Copy link
Contributor Author

michielbdejong commented Oct 17, 2022

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

@michielbdejong
Copy link
Contributor Author

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.

@michielbdejong
Copy link
Contributor Author

-> #3365

@michielbdejong
Copy link
Contributor Author

-> cs3org/ocm-test-suite#63

@michielbdejong
Copy link
Contributor Author

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.

@michielbdejong
Copy link
Contributor Author

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"

@michielbdejong
Copy link
Contributor Author

Testing this how with Nextcloud->Reva->Reva->Nextcloud configuration.

@michielbdejong
Copy link
Contributor Author

>> 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"
>> 

@michielbdejong
Copy link
Contributor Author

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

@michielbdejong
Copy link
Contributor Author

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"

@michielbdejong
Copy link
Contributor Author

Debugging this more in pondersource/sciencemesh-php#102
Once that is working we can also show it in the ocmd tutorial.

@gmgigi96 gmgigi96 closed this as completed May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants