rexray: S3 doesn't work on Swarm bucket name containers invalid chars

Summary

When using Docker swarm and deploy a stack with the volumes defined like the following:

version: '3'
...
volumes:
	test:
		driver: rexray/s3fs

When deployed with have the prefix of the stack name for example docker stack deploy -c ./deployment.yml web will make the volume name web_test which then means the rexray/s3fs driver tries to make a bucket web_test which has invalid characters (the underscore). I have tried Setting volumes.test.name and volumes.test.driver_opts.name but neither overwrite the volume name.

Version

rexray/s3fs:latest

Expected Behavior

A) Either accept the name/bucket as a driver_opts so you can set volumes.test.drivers_opts.bucket . B) Get word after the last underscore web_test => test and use as bucket name.

Actual Behavior

Invalid bucket name from volume name in a Swarm stack deployment.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 18 (2 by maintainers)

Most upvoted comments

I encountered this as well today, and found this workaround:

If you use compose file version 3.4, you can specify a name option for the volume like this:

volumes:
  myvolumename:
    name: myvolumename
    driver: rexray/s3fs

This will create a volume with the name myvolumename.