Visitar URL original
Adding collaborators doesn't work in docker on mac · Issue #182 · owncloud/ocis · GitHub
Skip to content

Adding collaborators doesn't work in docker on mac #182

Closed

Description

@micbar

Steps to reproduce

  • Use owncloud/ocis:1.0.0-beta2
  • Mount /var/tmp/reva/data to the outside
  • Try to add a collaborator
  • Popup with error message "grpc error"

Log

ocis_1   | 10:44AM ERR srv/app/pkg/mod/github.com/cs3org/reva@v0.1.1-0.20200320145721-40c4334849c3/internal/grpc/services/storageprovider/storageprovider.go:675 > error setting ACL error="xattr.Set /var/tmp/reva/data/einstein/files/Goethe_(Stieler_1828).jpg user.oc.acl.u:marie: operation not supported" pid=56 pkg=rgrpc traceid=3227113cc371ffc11b650727f6cd9b75
ocis_1   | 10:44AM INF srv/app/pkg/mod/github.com/cs3org/reva@v0.1.1-0.20200320145721-40c4334849c3/internal/grpc/interceptors/log/log.go:69 > unary code=OK end="01/Apr/2020:10:44:10 +0000" from=tcp://127.0.0.1:57360 pid=56 pkg=rgrpc start="01/Apr/2020:10:44:10 +0000" time_ns=2839900 traceid=3227113cc371ffc11b650727f6cd9b75 uri=/cs3.storage.provider.v1beta1.ProviderAPI/AddGrant user-agent=grpc-go/1.26.0
ocis_1   | 10:44AM ERR srv/app/pkg/mod/github.com/cs3org/reva@v0.1.1-0.20200320145721-40c4334849c3/internal/grpc/services/gateway/usershareprovider.go:91 > error committing share to storage grant error="gateway: grpc failed with code CODE_INTERNAL" pid=205 pkg=rgrpc traceid=3227113cc371ffc11b650727f6cd9b75
ocis_1   | 10:44AM INF srv/app/pkg/mod/github.com/cs3org/reva@v0.1.1-0.20200320145721-40c4334849c3/internal/grpc/interceptors/log/log.go:69 > unary code=OK end="01/Apr/2020:10:44:10 +0000" from=tcp://127.0.0.1:35660 pid=205 pkg=rgrpc start="01/Apr/2020:10:44:10 +0000" time_ns=10421700 traceid=3227113cc371ffc11b650727f6cd9b75 uri=/cs3.gateway.v1beta1.GatewayAPI/CreateShare user-agent=grpc-go/1.26.0

Reason

Create bind mount

docker run -i -v /Users/mbarz/Development:/root/tmp -t owncloud/base /bin/bash

List the mounts

overlay on / type overlay (rw,relatime,lowerdir=/var/lib/docker/overlay2/l/PTYN5X4ICYATB3PXAWTOS6LOX7:/var/lib/docker/overlay2/l/63FNL6Z76ABXDNAJIEOZ7GSMIQ:/var/lib/docker/overlay2/l/BMJYLZJXTRT3RQKQRPCKKMVPEI:/var/lib/docker/overlay2/l/C5GZ7ZIKWO3S7MG67SXNAIDEE5:/var/lib/docker/overlay2
shm on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=65536k)
osxfs on /root/tmp type fuse.osxfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,max_read=1048576)
/dev/vda1 on /mnt/data type ext4 (rw,relatime)

Try to create some attributes

touch /root/tmp/tt; setfattr -n user.name -v value /root/tmp/tt; getfattr -d /root/tmp/tt
setfattr: /root/tmp/tt: Operation not supported
getfattr: /root/tmp/tt: Operation not supported

Activity

  1. micbar commented on Apr 1, 2020

    @micbar
    ContributorAuthor

    @butonic @refs Maybe a configuration problem of the docker volume?

  2. micbar commented on Apr 1, 2020

    @micbar
    ContributorAuthor

    https://www.berthon.eu/2018/containers-volumes-and-file-permissions/

    Maybe the uid of the process inside the container cannot set acl's on the host system

  3. micbar commented on Apr 1, 2020

    @micbar
    ContributorAuthor

    That is the correct assuption.

    Test

    • Run the docker image without mounting a data dir from the host system works fine.
    • The files are not persisted
  4. butonic commented on Apr 2, 2020

    @butonic
    Contributor

    might be related to aufs not supporting extended attributtes: moby/moby#1070 (comment)

  5. micbar commented on Apr 2, 2020

    @micbar
    ContributorAuthor

    use a volume (with run -v ...), since it translates into a bind-mount to the underlying filesystem;

    That is what I tried

  6. micbar commented on Apr 2, 2020

    @micbar
    ContributorAuthor

    @xoxys could you help?

  7. butonic commented on Apr 2, 2020

    @butonic
    Contributor

    might be fixed by using the overlay2 driver: https://docs.docker.com/storage/storagedriver/overlayfs-driver/

  8. butonic commented on Apr 2, 2020

    @butonic
    Contributor

    @micbar what does docker info say?

    $ docker info
    Client:
     Debug Mode: false
    
    Server:
     Containers: 62
      Running: 7
      Paused: 0
      Stopped: 55
     Images: 32
     Server Version: 19.03.8
     Storage Driver: overlay2
    [...]
  9. butonic commented on Apr 2, 2020

    @butonic
    Contributor
  10. micbar commented on Apr 2, 2020

    @micbar
    ContributorAuthor

    @butonic

    docker info
    Client:
     Debug Mode: false
    
    Server:
     Containers: 86
      Running: 1
      Paused: 0
      Stopped: 85
     Images: 119
     Server Version: 19.03.8
     Storage Driver: overlay2
      Backing Filesystem: <unknown>
      Supports d_type: true
      Native Overlay Diff: true
     Logging Driver: json-file
     Cgroup Driver: cgroupfs
     Plugins:
      Volume: local
      Network: bridge host ipvlan macvlan null overlay
      Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
     Swarm: inactive
     Runtimes: runc
     Default Runtime: runc
     Init Binary: docker-init
     containerd version: 7ad184331fa3e55e52b890ea95e65ba581ae3429
     runc version: dc9208a3303feef5b3839f4323d9beb36df0a9dd
     init version: fec3683
     Security Options:
      seccomp
       Profile: default
     Kernel Version: 4.19.76-linuxkit
     Operating System: Docker Desktop
     OSType: linux
     Architecture: x86_64
     CPUs: 4
     Total Memory: 3.846GiB
     Name: docker-desktop
     ID: MB7L:BWTI:C3YL:Q6CV:E7TP:4AQH:47OH:GNK6:AZIE:4ZBD:6SVA:6REG
     Docker Root Dir: /var/lib/docker
     Debug Mode: true
      File Descriptors: 42
      Goroutines: 61
      System Time: 2020-04-02T07:59:56.8768678Z
      EventsListeners: 3
     HTTP Proxy: gateway.docker.internal:3128
     HTTPS Proxy: gateway.docker.internal:3129
     Registry: https://index.docker.io/v1/
     Labels:
     Experimental: false
     Insecure Registries:
      127.0.0.0/8
     Live Restore Enabled: false
     Product License: Community Engine
    
  11. micbar commented on Apr 2, 2020

    @micbar
    ContributorAuthor

    So it seems, we both are already using overlay2 filesystem.

  12. xoxys commented on Apr 2, 2020

    @xoxys
    Contributor

    Not really, I would also need experimenting

  13. micbar commented on Apr 14, 2020

    @micbar
    ContributorAuthor

    needs concept.

  14. micbar commented on Apr 14, 2020

    @micbar
    ContributorAuthor

    @pmaier1 @felixboehm we need to schedule a concepts call.

  15. 8 remaining items

  16. refs commented on Jan 13, 2021

    @refs
    Contributor

    ping @micbar could we try this again? Or at least have it on the radar.

  17. added
    Category:DefectExisting functionality is not working as expected
    and removed on Jan 13, 2021
  18. micbar commented on Jan 13, 2021

    @micbar
    ContributorAuthor

    It doesn't work. It is a known issue on docker for mac, that the current fst doesn't support xattr.

  19. refs commented on Jan 13, 2021

    @refs
    Contributor

    thanks for the update. Let's leave it open as a known issue

  20. ddelange commented on Jan 24, 2021

    @ddelange

    Another xattr related side-effect on Mac occurs with a local bind mount, which will crash the startup sequence of storage-users, storage-metadata, storage-home:

    ---
    version: "3.7"
    
    services:
      ocis:
        volumes:
          - "ocis-data:/var/tmp/ocis"
    
    # disabling local bind mount below due to https://github.com/owncloud/ocis/issues/182#issuecomment-759386736
    # # ocis       | {"level":"info","service":"storage","transport":"debug","addr":"0.0.0.0:9156","time":"2021-01-24T00:33:28.8212382Z","message":"starting server"}
    # # ocis       | {"level":"info","service":"storage","time":"2021-01-24T00:33:28.8321616Z","message":"host info: c5d4d33350b5"}
    # # ocis       | {"level":"info","service":"storage","time":"2021-01-24T00:33:28.8324468Z","message":"running on 3 cpus"}
    # # ocis       | {"level":"info","service":"storage","pkg":"grace","time":"2021-01-24T00:33:28.8359769Z","message":"pidfile saved at: /tmp/revad-storage-home-50459403-12ce-4ad1-bfb1-a0d7bc2a9cf1.pid"}
    # # ocis       | {"level":"error","service":"storage","error":"http service dataprovider could not be started,: ocisfs: could not set parentid attribute: xattr.Set /var/tmp/ocis/storage/users/nodes/root user.ocis.parentid: operation not supported","time":"2021-01-24T00:33:28.8401978Z","message":"error starting the http server"}
    # # ocis       | {"level":"info","service":"storage","pkg":"grace","time":"2021-01-24T00:33:28.8410325Z","message":"pid file \"/tmp/revad-storage-home-50459403-12ce-4ad1-bfb1-a0d7bc2a9cf1.pid\" got removed"}
    # # ocis       | 2021-01-24T00:33:28Z INF storage-home exited with code: 1 package=watcher
    volumes:
      ocis-data:
        driver: local
        # driver_opts:
        #   type: 'none'
        #   o: 'bind'
        #   device: '${OCIS_PERSISTENCE_PATH}/ocis'
  21. micbar commented on May 29, 2024

    @micbar
    ContributorAuthor

    outdated. Ocis doesn't use xattrs anymore.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions