Using Environment scoped rancher-nfs volumes
Tested with driver: local and problems does not happen
Is anyone using salt-master in rancher? If so did you have to do any special config on storage or other docker settings to get it to work properly?
I am trying to get salt-master to run in rancher, using environment volumes and rancher-nfs. When I do not run in privileged mode I will see warnings about ‘dmidecode’ installed but can’t be called by the user. Running in privileged mode got rid of all errors except when I try to run a custom state file with “salt ‘*’ state.sls apache” I get the error shown below. This page explains it to be an NFS related issue: https://github.com/saltstack/salt/issues/31543
[salt.master ][ERROR ][30] Error in function _file_hash:
Traceback (most recent call last):
File “/usr/lib/python2.7/dist-packages/salt/master.py”, line 1629, in run_func
ret = getattr(self, func)(load)
File “/usr/lib/python2.7/dist-packages/salt/fileserver/init.py”, line 639, in file_hash
return self.__file_hash_and_stat(load)[0]
File “/usr/lib/python2.7/dist-packages/salt/fileserver/init.py”, line 631, in _file_hash_and_stat
return self.servers[fstr](load, fnd), stat_result
File “/usr/lib/python2.7/dist-packages/salt/fileserver/roots.py”, line 269, in file_hash
return file_hash(load, fnd)
File “/usr/lib/python2.7/dist-packages/salt/fileserver/roots.py”, line 287, in file_hash
with salt.utils.flopen(cache_path, ‘w’) as fp:
File “/usr/lib/python2.7/contextlib.py”, line 17, in enter
return self.gen.next()
File “/usr/lib/python2.7/dist-packages/salt/utils/init.py”, line 1375, in flopen
fcntl.flock(fhandle.fileno(), fcntl.LOCK_SH)
IOError: [Errno 9] Bad file descriptor
Thanks,
Vince