Rancher-NFS issues?

Hello, I am having the darnest time getting rancher-nfs working. The NFS share is off a FreeNAS system and while the following test docker-compose actually works with it:

docker-compose.yml

version: '2’
volumes:
test_volume:
external: true
driver: rancher-nfs
services:
test:
image: ubuntu
volumes:
- test_volume:/data
tty: true
command:
- bash

However the https://hub.docker.com/r/smcline06/cacti/ gives me this (apparently common) chown error. Is there a known issue that would cause this? I am able to mount the NFS location from all hosts containing these containers (even added nfs-utils to the container itself just incase). I dont believe this to be a permissions issue since I am able to test functionality using the ubuntu image above - just lost on getting this going :frowning:

Error:
(Failed to allocate instance [container:1i299]: Bad instance [container:1i299] in state [error]: Error response from daemon: chown /var/lib/rancher/volumes/rancher-nfs/cacti_tmp: invalid argument)

docker-compose

version: '2’
volumes:
cacti_tmp:
external: true
driver: rancher-nfs

services:
cacti:
image: smcline06/cacti:1.1.2
environment:
DB_HOST: db
DB_NAME: cacti_master
DB_PASS: cactipassword
DB_PORT: '3306’
DB_ROOT_PASS: rootpassword
DB_USER: cactiuser
INITIALIZE_DB: '1’
TZ: America/Los_Angeles
volumes:
- cacti_tmp:/tmp
links:
- db:db
ports:
- 80:80/tcp
- 443:443/tcp

db:
image: percona:5.7.14
environment:
MYSQL_ROOT_PASSWORD: rootpassword
TZ: America/Los_Angeles
ports:
- 3306:3306/tcp
command:
- mysqld
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
- --max_connections=200
- --max_heap_table_size=128M
- --max_allowed_packet=32M
- --tmp_table_size=128M
- --join_buffer_size=128M
- --innodb_buffer_pool_size=1G
- --innodb_doublewrite=OFF
- --innodb_flush_log_at_timeout=3
- --innodb_read_io_threads=32
- --innodb_write_io_threads=16

This is using Centos7 has the agent nodes and Rancher 1.5.3, any help would be greatly appreciated.

Try the nocopy option

volumes:

  • cacti_tmp:/tmp:nocopy

by default if the directory /tmp exist in the container it will try to copy any files back to the NFS on mount and merge the two. It will (incorrectly in my opinion) chown the NFS directory to match the one in the container. :nocopy should solve your issue. (though the /tmp directory in your container may now have incorrect permissions)