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

[EOS] Sharing does not work #129

Closed
jnweiger opened this issue Jul 22, 2020 · 17 comments
Closed

[EOS] Sharing does not work #129

jnweiger opened this issue Jul 22, 2020 · 17 comments

Comments

@jnweiger
Copy link

Reproduce on ocis 1.0.0-beta8 with eos installed via https://github.com/owncloud-docker/compose-playground/blob/master/examples/hetzner-deploy/make_ocis_eos_compose_test.sh

firefox https://xxx.xxx.xxx.xxx:9200

  • log in as einstein,

  • create a few files and folders,

  • share them with user marie and or feynman
    image

  • log in as user marie (different browser or private browsing tab)

  • check files. Nothing arrived.

  • click open 'Shared with me' Nothing is listed there.
    image

Expected behaviour:

  • share receipient sees what share originator shares.
@micbar micbar transferred this issue from owncloud/ocis Jul 28, 2020
@micbar micbar added C1-oCIS bug Something isn't working p2-high labels Jul 28, 2020
@exalate-issue-sync
Copy link

Michael Barz commented: Sharing Files doesn not work on EOS, this is a known limitation.

Sharing a folder should work.

@exalate-issue-sync exalate-issue-sync bot changed the title Sharing does not work [EOS] Sharing does not work Aug 18, 2020
@exalate-issue-sync
Copy link

Vincent Petry commented: I tried with a folder share and this bug is still valid, with the same observations.

@exalate-issue-sync
Copy link

Vincent Petry commented: The share entry exists and looks correct in the shares file:

{
  "state": {},
  "shares": [
    {
      "id": {
        "opaque_id": "1021ddb3-e379-49ba-b65d-d99eb986f10d"
      },
      "resource_id": {
        "storage_id": "1284d238-aa92-42ce-bdc4-0b0000009154",
        "opaque_id": "20"
      },
      "permissions": {
        "permissions": {
          "get_path": true,
          "get_quota": true,
          "initiate_file_download": true,
          "list_grants": true,
          "list_container": true,
          "list_file_versions": true,
          "list_recycle": true,
          "stat": true
        }
      },
      "grantee": {
        "type": 1,
        "id": {
          "idp": "https://localhost:9200",
          "opaque_id": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c"
        }
      },
      "owner": {
        "idp": "https://localhost:9200",
        "opaque_id": "4c510ada-c86b-4815-8820-42cdf82c3d51"
      },
      "creator": {
        "idp": "https://localhost:9200",
        "opaque_id": "4c510ada-c86b-4815-8820-42cdf82c3d51"
      },
      "ctime": {
        "seconds": 1598257848,
        "nanos": 205543999
      },
      "mtime": {
        "seconds": 1598257848,
        "nanos": 205543999
      }
    }
  ]
}

The shadow folder for Marie on EOS "/eos/dockertest/reva/users/.shadow/f/f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c/Shares" doesn't contain any relevant entries.

As far as I understood, the EOS driver is supposed to create some symlinks there that point to the original folder, but nothing is there.

So far I have found nothing useful in the logs for the share creation.

@exalate-issue-sync
Copy link

Vincent Petry commented: AddGrant is called and as I understand this should write something to the storage:

ocis          | 2020-08-24T09:34:39Z DBG CreateShare BEGIN pkg=rgrpc service=reva traceid=1fa889f1b998172306732164a97029fb
ocis          | 2020-08-24T09:34:39Z DBG gateway: split: parts[1]:sha1 != shareFolder:Shares pkg=rgrpc service=reva traceid=1fa889f1b99
8172306732164a97029fb
ocis          | 2020-08-24T09:34:39Z DBG CreateShare calling GRPC CreateShare pkg=rgrpc service=reva traceid=1fa889f1b998172306732164a9
7029fb
ocis          | 2020-08-24T09:34:39Z INF unary code=OK end="24/Aug/2020:09:34:39 +0000" from=tcp://127.0.0.1:34136 pkg=rgrpc service=re
va start="24/Aug/2020:09:34:39 +0000" time_ns=559770 traceid=1fa889f1b998172306732164a97029fb uri=/cs3.sharing.collaboration.v1beta1.Co
llaborationAPI/CreateShare user-agent=grpc-go/1.26.0
ocis          | 2020-08-24T09:34:39Z DBG CreateShare commit config CommitShareToStorageGrant=true CommitShareToStorageRef=true pkg=rgrp
c service=reva traceid=1fa889f1b998172306732164a97029fb
ocis          | 2020-08-24T09:34:39Z DBG addGrant Grantee={"id":{"idp":"https://localhost:9200","opaque_id":"f7fbf8c8-139b-4376-b307-cf
0a8c2d0d9c"},"type":1} ResourceId="storage_id:\"1284d238-aa92-42ce-bdc4-0b0000009154\" opaque_id:\"20\" " ResourcePermissions={"get_pat
h":true,"get_quota":true,"initiate_file_download":true,"list_container":true,"list_file_versions":true,"list_grants":true,"list_recycle
":true,"stat":true} pkg=rgrpc service=reva traceid=1fa889f1b998172306732164a97029fb
ocis          | 2020-08-24T09:34:39Z INF unary code=OK end="24/Aug/2020:09:34:39 +0000" from=tcp://127.0.0.1:47544 pkg=rgrpc service=re
va start="24/Aug/2020:09:34:39 +0000" time_ns=255248 traceid=1fa889f1b998172306732164a97029fb uri=/cs3.storage.registry.v1beta1.Registr
yAPI/GetStorageProvider user-agent=grpc-go/1.26.0
ocis          | 2020-08-24T09:34:39Z DBG addGrant calling GRPC AddGrant pkg=rgrpc service=reva traceid=1fa889f1b998172306732164a97029fb

It seems AddGrant is adding some ACL:

ocis          | ### EOS: y executeEOS() running command /usr/bin/eos -r 0 0 acl --sys --recursive u:20001=rx!d /eos/dockertest/reva/use
rs/4/4c510ada-c86b-4815-8820-42cdf82c3d51/sha1 --comment 1fa889f1b998172306732164a97029fb2020-08-24T09:34:39Z
INF eos cmd args="[/usr/bin/eos -r 0 0 acl --sys --recursive u:20001=rx!d /eos/dockertest/reva/users/4/4c510ada-c86b-4815-8820-42cdf82c3d51/sha1 --comment 1fa889f1b998172306732164a97029fb]" env=[EOS_MGM_URL=root://mgm-master.testnet:1094] err= exit=0 pkg=rgrpc service=reva traceid=1fa889f1b998172306732164a97029fb

the result when querying from the EOS console:

EOS Console [root://localhost] |/eos/dockertest/reva/users/4/4c510ada-c86b-4815-8820-42cdf82c3d51/> acl -l sha1
u:20001:rx!d,u:2:rwxc

I guess "20001" is the Posix/EOS user for Marie. So the ACLs seem to be set correctly.
If I use the "edit" role instead of "view", then the "rx" becomes "rwx".

However, it seems the symlink is missing: I've found a call to GRPC CreateReference, but that one is only triggered when updating a share as recipient. If CreateReference is what is supposed to create that symlink, then it seems to be missing in almost all code paths.

@exalate-issue-sync
Copy link

exalate-issue-sync bot commented Aug 24, 2020

Vincent Petry commented: I had a closer look when createReference is used. It seems that maybe as long as the share was not accepted by the user, the symlink is not created: https://github.com/cs3org/reva/blob/master/internal/grpc/services/gateway/usershareprovider.go#L338

But to be able to accept the share, it needs to be listed in "shared with me".
So next up is finding out why the pending share is not listed there.

@exalate-issue-sync
Copy link

Vincent Petry commented: And here we go, there's a 500 error when listing the shares with a null pointer:

ocis          | 2020-08-24T09:49:53Z INF unary code=OK end="24/Aug/2020:09:49:53 +0000" from=tcp://127.0.0.1:47536 pkg=rgrpc service=reva start="24/Aug/2020:09:49:53 +0000" time_ns=2422527 traceid=9b71d74596ba2ac8107ad4bfe44a924a uri=/cs3.gateway.v1beta1.GatewayAPI/ListReceivedShares user-agent=grpc-go/1.26.0
ocis          | 2020-08-24T09:49:53Z DBG skipping auth method=/cs3.gateway.v1beta1.GatewayAPI/Stat pkg=rgrpc service=reva traceid=9b71d74596ba2ac8107ad4bfe44a924a
ocis          | 2020-08-24T09:49:53Z INF unary code=OK end="24/Aug/2020:09:49:53 +0000" from=tcp://127.0.0.1:47544 pkg=rgrpc service=reva start="24/Aug/2020:09:49:53 +0000" time_ns=214972 traceid=9b71d74596ba2ac8107ad4bfe44a924a uri=/cs3.storage.registry.v1beta1.RegistryAPI/GetStorageProvider user-agent=grpc-go/1.26.0
ocis          | 2020-08-24T09:49:53Z INF eos: get md for ref:id:<opaque_id:"20" >  pkg=rgrpc service=reva traceid=9b71d74596ba2ac8107ad4bfe44a924a
mgm-master    | 200824 09:49:53 053 XrootdXeq: root.3185:225@ocis pvt IPv4 login as daemon
mgm-master    | 200824 09:49:53 053 XrootdXeq: root.3185:225@ocis disc 0:00:00
ocis          | ### EOS: y executeEOS() running command /usr/bin/eos -r 20001 30000 file info inode:20 -m --comment 9b71d74596ba2ac8107ad4bfe44a924a2020-08-24T09:49:53Z INF eos cmd args="[/usr/bin/eos -r 20001 30000 file info inode:20 -m --comment 9b71d74596ba2ac8107ad4bfe44a924a]" env=[EOS_MGM_URL=root://mgm-master.testnet:1094] err= exit=0 pkg=rgrpc service=reva traceid=9b71d74596ba2ac8107ad4bfe44a924a
ocis          | goroutine 1372 [running]:
ocis          | runtime/debug.Stack(0xc000157380, 0xc000810d80, 0xbfc901304591ce9e)
ocis          |         /usr/local/go/src/runtime/debug/stack.go:24 +0x9d
ocis          | runtime/debug.PrintStack()
ocis          |         /usr/local/go/src/runtime/debug/stack.go:16 +0x22
ocis          | github.com/cs3org/reva/internal/grpc/interceptors/recovery.recoveryFunc(0x34f6980, 0xc000fdbe90, 0x2b1fd20, 0xc000e2ab80, 0x0, 0xc00265caf8)
ocis          |         /reva/internal/grpc/interceptors/recovery/recovery.go:48 +0x26
ocis          | github.com/grpc-ecosystem/go-grpc-middleware/recovery.recoverFrom(0x34f6980, 0xc000fdbe90, 0x2b1fd20, 0xc000e2ab80, 0x307ecf0, 0xc00265cae8, 0x1060e66)
ocis          |         /root/go/pkg/mod/github.com/grpc-ecosystem/[email protected]/recovery/interceptors.go:61 +0x5a
ocis          | github.com/grpc-ecosystem/go-grpc-middleware/recovery.UnaryServerInterceptor.func1.1(0xc00265d44e, 0x34f6980, 0xc000fdbe90, 0xc000548470, 0xc00265d4d0)
ocis          |         /root/go/pkg/mod/github.com/grpc-ecosystem/[email protected]/recovery/interceptors.go:29 +0x6d
ocis          | panic(0x2b1fd20, 0xc000e2ab80)
ocis          |         /usr/local/go/src/runtime/panic.go:969 +0x166
ocis          | github.com/cs3org/reva/pkg/storage/utils/eosfs.(*eosfs).unwrapInternal(0xc001392d50, 0x34f6980, 0xc000f76510, 0xc0013989e0, 0x1a, 0xc000cdf097, 0x46, 0xc001900f90, 0x26, 0x2, ...)
ocis          |         /reva/pkg/storage/utils/eosfs/eosfs.go:296 +0x4e5
ocis          | github.com/cs3org/reva/pkg/storage/utils/eosfs.(*eosfs).unwrap(0xc001392d50, 0x34f6980, 0xc000f76510, 0xc000cdf097, 0x46, 0xc00047ed30, 0x5)
ocis          |         /reva/pkg/storage/utils/eosfs/eosfs.go:259 +0x1c9
ocis          | github.com/cs3org/reva/pkg/storage/utils/eosfs.(*eosfs).getPath(0xc001392d50, 0x34f6980, 0xc000f76510, 0xc000157400, 0xc000c67bc0, 0xc000fc2870, 0xc00265cfa8, 0x2, 0x0)
ocis          |         /reva/pkg/storage/utils/eosfs/eosfs.go:345 +0x1b5
ocis          | github.com/cs3org/reva/pkg/storage/utils/eosfs.(*eosfs).resolve(0xc001392d50, 0x34f6980, 0xc000f76510, 0xc000157400, 0xc000f765a0, 0xc001900de0, 0x29, 0x0, 0x0)
ocis          |         /reva/pkg/storage/utils/eosfs/eosfs.go:317 +0x132
ocis          | github.com/cs3org/reva/pkg/storage/utils/eosfs.(*eosfs).GetMD(0xc001392d50, 0x34f6980, 0xc000f76510, 0xc000f765a0, 0x0, 0x0, 0x0, 0x0, 0xc000f76510, 0xc000157c80)
ocis          |         /reva/pkg/storage/utils/eosfs/eosfs.go:568 +0x1ce
ocis          | github.com/cs3org/reva/internal/grpc/services/storageprovider.(*service).Stat(0xc0001a8690, 0x34f6980, 0xc000f763c0, 0xc000595720, 0x0, 0x0, 0x0)
ocis          |         /reva/internal/grpc/services/storageprovider/storageprovider.go:464 +0x338
ocis          | github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1._ProviderAPI_Stat_Handler.func1(0x34f6980, 0xc000f763c0, 0x2e9b660, 0xc000595720, 0x2b1fd20, 0xc000e2a3a0, 0x34f6980, 0xc000f763c0)
ocis          |         /root/go/pkg/mod/github.com/cs3org/[email protected]/cs3/storage/provider/v1beta1/provider_api.pb.go:3960 +0x89
ocis          | github.com/cs3org/reva/internal/grpc/interceptors/auth.NewUnary.func1(0x34f6980, 0xc000fdbe90, 0x2e9b660, 0xc000595720, 0xc00240e3a0, 0xc00240e3c0, 0x0, 0x0, 0x0, 0x0)
ocis          |         /reva/internal/grpc/interceptors/auth/auth.go:115 +0xa20
ocis          | github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1(0x34f6980, 0xc000fdbe90, 0x2e9b660, 0xc000595720, 0x10a7908, 0xc000fdba70, 0x8, 0x4dfaf00)
ocis          |         /root/go/pkg/mod/github.com/grpc-ecosystem/[email protected]/chain.go:25 +0x63
ocis          | github.com/grpc-ecosystem/go-grpc-middleware/recovery.UnaryServerInterceptor.func1(0x34f6980, 0xc000fdbe90, 0x2e9b660, 0xc000595720, 0xc00240e3a0, 0xc00240e3e0, 0x0, 0x0, 0x0, 0x0)
ocis          |         /root/go/pkg/mod/github.com/grpc-ecosystem/[email protected]/recovery/interceptors.go:33 +0xcb
ocis          | github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1(0x34f6980, 0xc000fdbe90, 0x2e9b660, 0xc000595720, 0xc001760380, 0x7f67c0746108, 0x0, 0xc00240e4c0)
ocis          |         /root/go/pkg/mod/github.com/grpc-ecosystem/[email protected]/chain.go:25 +0x63
ocis          | github.com/cs3org/reva/internal/grpc/interceptors/log.NewUnary.func1(0x34f6980, 0xc000fdbe90, 0x2e9b660, 0xc000595720, 0xc00240e3a0, 0xc00240e400, 0x0, 0xc00240e4a0, 0x1, 0x1)
ocis          |         /reva/internal/grpc/interceptors/log/log.go:39 +0x9b
ocis          | github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1(0x34f6980, 0xc000fdbe90, 0x2e9b660, 0xc000595720, 0x2, 0x34f6980, 0xc000fdbe90, 0xc000fdbe60)
ocis          |         /root/go/pkg/mod/github.com/grpc-ecosystem/[email protected]/chain.go:25 +0x63
ocis          | github.com/cs3org/reva/internal/grpc/interceptors/token.NewUnary.func1(0x34f6980, 0xc000fdbe30, 0x2e9b660, 0xc000595720, 0xc00240e3a0, 0xc00240e420, 0x2f41680, 0xc00240b380, 0x34f6980, 0xc000fdbe30)
ocis          |         /reva/internal/grpc/interceptors/token/token.go:44 +0xb4
ocis          | github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1(0x34f6980, 0xc000fdbe30, 0x2e9b660, 0xc000595720, 0xc000fdbe30, 0xc0026fda00, 0x4c, 0x1f4)
ocis          |         /root/go/pkg/mod/github.com/grpc-ecosystem/[email protected]/chain.go:25 +0x63
ocis          | github.com/cs3org/reva/internal/grpc/interceptors/appctx.NewUnary.func1(0x34f6980, 0xc000fdbdd0, 0x2e9b660, 0xc000595720, 0xc00240e3a0, 0xc00240e440, 0x220f12a, 0x2d9a540, 0xc00240e460, 0xc00240e3a0)
ocis          |         /reva/internal/grpc/interceptors/appctx/appctx.go:36 +0x4fc
ocis          | github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1(0x34f6980, 0xc000fdbdd0, 0x2e9b660, 0xc000595720, 0xc00017d300, 0xc00240e360, 0xc000f6db08, 0x10070b8)
ocis          |         /root/go/pkg/mod/github.com/grpc-ecosystem/[email protected]/chain.go:25 +0x63
ocis          | github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1(0x34f6980, 0xc000fdbdd0, 0x2e9b660, 0xc000595720, 0xc00240e3a0, 0xc00240e3c0, 0xc002350b78, 0x10a74a8, 0x2e21140, 0xc000fdbdd0)
ocis          |         /root/go/pkg/mod/github.com/grpc-ecosystem/[email protected]/chain.go:34 +0xd5
ocis          | github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1._ProviderAPI_Stat_Handler(0x2f7bce0, 0xc0001a8690, 0x34f6980, 0xc000fdbdd0, 0xc00240b2c0, 0xc001392e70, 0x34f6980, 0xc000fdbdd0, 0xc001900c60, 0x2e)
ocis          |         /root/go/pkg/mod/github.com/cs3org/[email protected]/cs3/storage/provider/v1beta1/provider_api.pb.go:3962 +0x14b
ocis          | google.golang.org/grpc.(*Server).processUnaryRPC(0xc0023ba480, 0x3515da0, 0xc00028bc80, 0xc00017d300, 0xc001393020, 0x48c3b00, 0x0, 0x0, 0x0)
ocis          |         /root/go/pkg/mod/google.golang.org/[email protected]/server.go:1024 +0x501
ocis          | google.golang.org/grpc.(*Server).handleStream(0xc0023ba480, 0x3515da0, 0xc00028bc80, 0xc00017d300, 0x0)
ocis          |         /root/go/pkg/mod/google.golang.org/[email protected]/server.go:1313 +0xd3f
ocis          | google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc0004ca1a0, 0xc0023ba480, 0x3515da0, 0xc00028bc80, 0xc00017d300)
ocis          |         /root/go/pkg/mod/google.golang.org/[email protected]/server.go:722 +0xa1
ocis          | created by google.golang.org/grpc.(*Server).serveStreams.func1
ocis          |         /root/go/pkg/mod/google.golang.org/[email protected]/server.go:720 +0xa1
ocis          | 2020-08-24T09:49:53Z ERR eos: resource is outside the directory of the logged-in user: internal=/eos/dockertest/reva/users/4/4c510ada-c86b-4815-8820-42cdf82c3d51/sha1 trim=/eos/dockertest/reva/users/f/f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c namespace=/eos/dockertest/reva/users pkg=rgrpc service=reva traceid=9b71d74596ba2ac8107ad4bfe44a924a
ocis          | 2020-08-24T09:49:53Z ERR unary code=Internal end="24/Aug/2020:09:49:53 +0000" from=tcp://127.0.0.1:60596 pkg=rgrpc service=reva start="24/Aug/2020:09:49:53 +0000" time_ns=33056794 traceid=9b71d74596ba2ac8107ad4bfe44a924a uri=/cs3.storage.provider.v1beta1.ProviderAPI/Stat user-agent=grpc-go/1.26.0
ocis          | goroutine 463 [running]:
ocis          | runtime/debug.Stack(0xc001d0d480, 0xc000cf0b40, 0xbfc9013045c22ba7)
ocis          |         /usr/local/go/src/runtime/debug/stack.go:24 +0x9d
ocis          | runtime/debug.PrintStack()
ocis          |         /usr/local/go/src/runtime/debug/stack.go:16 +0x22
ocis          | github.com/cs3org/reva/internal/grpc/interceptors/recovery.recoveryFunc(0x34f6980, 0xc000cf6780, 0x2c2d6c0, 0x48a5fc0, 0xc000d97e60, 0x2e)
ocis          |         /reva/internal/grpc/interceptors/recovery/recovery.go:48 +0x26
ocis          | github.com/grpc-ecosystem/go-grpc-middleware/recovery.recoverFrom(0x34f6980, 0xc000cf6780, 0x2c2d6c0, 0x48a5fc0, 0x307ecf0, 0xc00044adb0, 0x1060e66)
ocis          |         /root/go/pkg/mod/github.com/grpc-ecosystem/[email protected]/recovery/interceptors.go:61 +0x5a
ocis          | github.com/grpc-ecosystem/go-grpc-middleware/recovery.UnaryServerInterceptor.func1.1(0xc00044b44e, 0x34f6980, 0xc000cf6780, 0xc0011bc028, 0xc00044b4d0)
ocis          |         /root/go/pkg/mod/github.com/grpc-ecosystem/[email protected]/recovery/interceptors.go:29 +0x6d
ocis          | panic(0x2c2d6c0, 0x48a5fc0)
ocis          |         /usr/local/go/src/runtime/panic.go:969 +0x166
ocis          | github.com/cs3org/reva/internal/grpc/services/gateway.(*svc).getPath(0xc000c1ba40, 0x34f6980, 0xc000cf68d0, 0xc000cf66f0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
ocis          |         /reva/internal/grpc/services/gateway/storageprovider.go:1403 +0x208
ocis          | github.com/cs3org/reva/internal/grpc/services/gateway.(*svc).Stat(0xc000c1ba40, 0x34f6980, 0xc000cf68d0, 0xc001290dc0, 0xc000c1ba40, 0x0, 0x0)
ocis          |         /reva/internal/grpc/services/gateway/storageprovider.go:925 +0xe3
ocis          | github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1._GatewayAPI_Stat_Handler.func1(0x34f6980, 0xc000cf68d0, 0x2e9b660, 0xc001290dc0, 0x24, 0xc0012d45a0, 0x0, 0x34f6980)
ocis          |         /root/go/pkg/mod/github.com/cs3org/[email protected]/cs3/gateway/v1beta1/gateway_api.pb.go:2602 +0x89
ocis          | github.com/cs3org/reva/internal/grpc/interceptors/auth.NewUnary.func1(0x34f6980, 0xc000cf6780, 0x2e9b660, 0xc001290dc0, 0xc000bdf6a0, 0xc000bdf6c0, 0x0, 0x0, 0x0, 0x0)
ocis          |         /reva/internal/grpc/interceptors/auth/auth.go:86 +0x2c4
ocis          | github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1(0x34f6980, 0xc000cf6780, 0x2e9b660, 0xc001290dc0, 0x10a7908, 0xc000cf6390, 0x8, 0x4dfaf00)
ocis          |         /root/go/pkg/mod/github.com/grpc-ecosystem/[email protected]/chain.go:25 +0x63
ocis          | github.com/grpc-ecosystem/go-grpc-middleware/recovery.UnaryServerInterceptor.func1(0x34f6980, 0xc000cf6780, 0x2e9b660, 0xc001290dc0, 0xc000bdf6a0, 0xc000bdf6e0, 0x0, 0x0, 0x0, 0x0)
ocis          |         /root/go/pkg/mod/github.com/grpc-ecosystem/[email protected]/recovery/interceptors.go:33 +0xcb
ocis          | github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1(0x34f6980, 0xc000cf6780, 0x2e9b660, 0xc001290dc0, 0xc00006e700, 0x7f0e85267108, 0x0, 0xc000bdf7c0)
ocis          |         /root/go/pkg/mod/github.com/grpc-ecosystem/[email protected]/chain.go:25 +0x63
ocis          | github.com/cs3org/reva/internal/grpc/interceptors/log.NewUnary.func1(0x34f6980, 0xc000cf6780, 0x2e9b660, 0xc001290dc0, 0xc000bdf6a0, 0xc000bdf700, 0x0, 0xc000bdf7a0, 0x1, 0x1)
ocis          |         /reva/internal/grpc/interceptors/log/log.go:39 +0x9b
ocis          | github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1(0x34f6980, 0xc000cf6780, 0x2e9b660, 0xc001290dc0, 0x2, 0x34f6980, 0xc000cf6780, 0xc000cf6750)
ocis          |         /root/go/pkg/mod/github.com/grpc-ecosystem/[email protected]/chain.go:25 +0x63
ocis          | github.com/cs3org/reva/internal/grpc/interceptors/token.NewUnary.func1(0x34f6980, 0xc000cf6720, 0x2e9b660, 0xc001290dc0, 0xc000bdf6a0, 0xc000bdf720, 0x2f41680, 0xc0008631a0, 0x34f6980, 0xc000cf6720)
ocis          |         /reva/internal/grpc/interceptors/token/token.go:44 +0xb4
ocis          | github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1(0x34f6980, 0xc000cf6720, 0x2e9b660, 0xc001290dc0, 0xc000cf6720, 0xc000371400, 0x4c, 0x1f4)
ocis          |         /root/go/pkg/mod/github.com/grpc-ecosystem/[email protected]/chain.go:25 +0x63
ocis          | github.com/cs3org/reva/internal/grpc/interceptors/appctx.NewUnary.func1(0x34f6980, 0xc000cf66c0, 0x2e9b660, 0xc001290dc0, 0xc000bdf6a0, 0xc000bdf740, 0x220f12a, 0x2d9a540, 0xc000bdf760, 0xc000bdf6a0)
ocis          |         /reva/internal/grpc/interceptors/appctx/appctx.go:36 +0x4fc
ocis          | github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1(0x34f6980, 0xc000cf66c0, 0x2e9b660, 0xc001290dc0, 0xc000352800, 0xc000bdf660, 0xc001d4fb08, 0x10070b8)
ocis          |         /root/go/pkg/mod/github.com/grpc-ecosystem/[email protected]/chain.go:25 +0x63
ocis          | github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1(0x34f6980, 0xc000cf66c0, 0x2e9b660, 0xc001290dc0, 0xc000bdf6a0, 0xc000bdf6c0, 0xc001c84b78, 0x10a74a8, 0x2e21140, 0xc000cf66c0)
ocis          |         /root/go/pkg/mod/github.com/grpc-ecosystem/[email protected]/chain.go:34 +0xd5
ocis          | github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1._GatewayAPI_Stat_Handler(0x2fb3740, 0xc000c1ba40, 0x34f6980, 0xc000cf66c0, 0xc0008630e0, 0xc000c274a0, 0x34f6980, 0xc000cf66c0, 0xc000d97b00, 0x2e)
ocis          |         /root/go/pkg/mod/github.com/cs3org/[email protected]/cs3/gateway/v1beta1/gateway_api.pb.go:2604 +0x14b
ocis          | google.golang.org/grpc.(*Server).processUnaryRPC(0xc000d90d80, 0x3515da0, 0xc0001b8d80, 0xc000352800, 0xc000c27650, 0x48c61c8, 0x0, 0x0, 0x0)
ocis          |         /root/go/pkg/mod/google.golang.org/[email protected]/server.go:1024 +0x501
ocis          | google.golang.org/grpc.(*Server).handleStream(0xc000d90d80, 0x3515da0, 0xc0001b8d80, 0xc000352800, 0x0)
ocis          |         /root/go/pkg/mod/google.golang.org/[email protected]/server.go:1313 +0xd3f
ocis          | google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc001288210, 0xc000d90d80, 0x3515da0, 0xc0001b8d80, 0xc000352800)
ocis          |         /root/go/pkg/mod/google.golang.org/[email protected]/server.go:722 +0xa1
ocis          | created by google.golang.org/grpc.(*Server).serveStreams.func1
ocis          |         /root/go/pkg/mod/google.golang.org/[email protected]/server.go:720 +0xa1
ocis          | 2020-08-24T09:49:53Z ERR runtime error: invalid memory address or nil pointer dereference pkg=rgrpc service=reva traceid=9b71d74596ba2ac8107ad4bfe44a924a
ocis          | 2020-08-24T09:49:53Z ERR unary code=Internal end="24/Aug/2020:09:49:53 +0000" from=tcp://127.0.0.1:47536 pkg=rgrpc service=reva start="24/Aug/2020:09:49:53 +0000" time_ns=39039856 traceid=9b71d74596ba2ac8107ad4bfe44a924a uri=/cs3.gateway.v1beta1.GatewayAPI/Stat user-agent=grpc-go/1.26.0
ocis          | 2020-08-24T09:49:53Z ERR rpc error: code = Internal desc = runtime error: invalid memory address or nil pointer dereference error="rpc error: code = Internal desc = runtime error: invalid memory address or nil pointer dereference" pkg=rhttp service=reva traceid=9b71d74596ba2ac8107ad4bfe44a924a
ocis          | 2020-08-24T09:49:53Z ERR http end="24/Aug/2020:09:49:53 +0000" host=127.0.0.1 method=GET pkg=rhttp proto=HTTP/1.1 service=reva size=163 start="24/Aug/2020:09:49:53 +0000" status=500 time_ns=44518286 traceid=9b71d74596ba2ac8107ad4bfe44a924a uri=/ocs/v2.php/apps/files_sharing//api/v1/shares?format=json&shared_with_me=true&state=all&include_tags=false&format=json url=/ocs/v2.php/apps/files_sharing//api/v1/shares?format=json&shared_with_me=true&state=all&include_tags=false&format=json
quark-1       | [1598262597578] INFO: During the last 10 seconds, I serviced 0 reads (0 Hz), and 4 writes (0 Hz) over 4 write transactions
quark-1       | [1598262607578] INFO: During the last 10 seconds, I serviced 0 reads (0 Hz), and 4 writes (0 Hz) over 4 write transactions
ocis          | 2020-08-24T09:50:11Z DBG Refreshing external service-registration service={"endpoints":[],"metadata":null,"name":"com.owncloud.reva","nodes":[{"address":"0.0.0.0:9142","id":"com.owncloud.reva-17cf7631-fe2a-4a3b-8cd8-e58c8d875262","metadata":{"broker":"http","protocol":"grpc","registry":"mdns","server":"grpc","transport":"grpc"}}],"version":""}
mgm-master    | 200824 09:50:11 745 MgmOfs_Sched: running underused thread monitor inq=0
mgm-master    | 200824 09:50:11 745 MgmOfs_Sched: 2 threads; 1 idle
mgm-master    | 200824 09:50:11 745 MgmOfs_Sched: scheduling underused thread monitor in 64 secon

@exalate-issue-sync
Copy link

Vincent Petry commented: Ok, got it: recently we changed the share listing routine to do a stat to check if the target resource exist or not to decide whether to skip.

However now that we enforced a stat call, the code is also trying to do the stat for pending or rejected shares.

For now I'll adjust the code to only do a stat for already accepted shares.

@exalate-issue-sync
Copy link

Vincent Petry commented: It looks like the CS3's Share object has no value for the pending state ?!

So I'm not able to read that value in the OCS layer (shares.go)

@exalate-issue-sync
Copy link

Vincent Petry commented: Never mind. The stat in "listUserShares()" is legit. We do want to find out more info about the target even before accepting.

The trouble is that EOS doesn't allow to stat anything outside the user's home: https://github.com/cs3org/reva/blob/master/pkg/storage/utils/eosfs/eosfs.go#L296

I guess that maybe for already accepted shares it would allow it by returning the symlink, but here the symlink does not exist yet since the share is pending.

@PVince81
Copy link

@butonic @labkode

@PVince81
Copy link

some attempts here at reconfiguring the storages: owncloud/ocis#484

@PVince81
Copy link

a solution was found, now in the updated config and dosc in #129

however, uploading is broken: this is because the UI is using "remote.php/dav/files" for uploading while the other operations use "remote.php/webdav". The latter maps to the home storage but the former to the global non-home storage.

We'll attempt to fix "remote.php/dav/files" to be simply rewired to the same handler like "remote.php/webdav" if the specified user matches. Otherwise we either fail with a 403 like OC 10, or optionally could redirect to the non-home storage.

@butonic as discussed

@PVince81
Copy link

PVince81 commented Aug 25, 2020

@PVince81
Copy link

draft PR here for the dav files rewiring: cs3org/reva#1120

@PVince81
Copy link

PVince81 commented Aug 26, 2020

we have a potential solution, it requires to combine following:

@PVince81
Copy link

PVince81 commented Aug 27, 2020

all merged in ocis master and confirmed that sharing is working now with EOS there, closing

@jnweiger
Copy link
Author

retested with rc1 on eos: shares appear in shared with me and can be accepted.
Remaining issues regarding sharing include

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants