Repository navigation
Description
Description of Issue/Question
We randomly see messages like this when calling salt-ssh
stderr:
'test.opts_pkg' is not available.
Up to now we remove /tmp/.root_????_salt/ by hand, and the next call of salt-ssh will succeed.
We noticed that systemd cleans tempfiles regularly and we guess that files in above directory get deleted. On our system (SuSE) the relevant service is /usr/lib/systemd/system/systemd-tmpfiles-clean.timer
The files in the thin-tgz have different timestamps:
remote-host:~ # ls -ltr /tmp/.root_dcdf8c_salt/
total 176
-rw-r--r-- 1 root root 40 Okt 12 2015 ext_version
-rw-r--r-- 1 root root 8292 Dez 7 09:58 singledispatch.py
-rw-r--r-- 1 root root 5228 Dez 7 09:58 singledispatch_helpers.py
-rw-r--r-- 1 root root 5277 Dez 7 09:58 backports_abc.py
-rw-r--r-- 1 root root 29911 Dez 7 13:46 six.py
-rw-r--r-- 1 root root 79 Dez 7 15:27 salt-call
...
We guess this is the cause why randomly calling salt-ssh files with messages like 'test.opts_pkg' is not available..
Potential solution 1
Our suggestion is to use different location where files are not supposed to be deleted automatically.
Potential solution 2
If you update the timestamp for every file in the tmp directory, then all files get deleted at once. I hope that salt will detect this an reinstall the code.
Versions Report
salt:/srv # salt --versions-report
Salt Version:
Salt: 2015.8.3
Dependency Versions:
Jinja2: 2.8
M2Crypto: 0.22
Mako: Not Installed
PyYAML: 3.11
PyZMQ: 15.1.0
Python: 2.7.3 (default, Apr 14 2012, 08:58:41) [GCC]
RAET: Not Installed
Tornado: 4.3
ZMQ: 4.1.2
cffi: 0.8.6
cherrypy: Not Installed
dateutil: 2.1
gitdb: 0.5.4
gitpython: 0.3.2 RC1
ioflo: Not Installed
libnacl: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.6
mysql-python: Not Installed
pycparser: 2.10
pycrypto: 2.6.1
pygit2: 0.21.2
python-gnupg: Not Installed
smmap: 0.8.2
timelib: Not Installed
System Versions:
dist: SuSE 12.3 x86_64
machine: x86_64
release: 3.7.10-1.40-desktop
system: openSUSE 12.3 x86_64
Activity
jfindlay commentedon Apr 22, 2016
@guettli, thanks for reporting. I think either (or both) of your solutions are good.
guettli commentedon May 9, 2016
Is there a work-around for this issue?
Is there a way to untar/unzip the python code on the remote host in a different location? I think
/var/tmp/would be good.jfindlay commentedon May 9, 2016
@guettli, personally I think
/var/tmpwould be a better location according to FHS because of the situation you've encountered. I don't think there is a way to override the temp dir, but you can usesalt-ssh --wipeas another workaround.thatch45 commentedon May 9, 2016
Yes, lets move this to /var/tmp. I think this is a much better place for the thin to be unraveled.
Move salt-ssh thin dir location to /var/tmp
cachedout commentedon May 9, 2016
This will be moved in 2016.3 per #33130. Closing. Thanks @guettli . This was a great catch by you!
Move salt-ssh thin dir location to /var/tmp (#33130)
[develop] Merge forward from 2016.3 to develop (#33193)
guettli commentedon May 17, 2016
I looked at the changeset:
Is there a way to make this directory configurable?
fcrozat commentedon Oct 27, 2016
yes, please, having DEFAULT_THIN_DIR configurable would help for deployment on restricted systems with very small /var/tmp directory.
shallot commentedon Mar 8, 2017
@fcrozat looks like
thin_diris a configurable roster setting which could be useful for thisguettli commentedon Mar 8, 2017
My issue is solved (use of /var/tmp, not /tmp). If you want this to be configurable, please open a new issue.
fcrozat commentedon Mar 15, 2017
@shallot Thanks, using thin_dir should do the trick !
guettli commentedon Mar 16, 2017
Since /var/tmp gets used now, at least me (the issue creator) is happy. I don't have the need to configure the location today. Maybe in the future. If it will be needed in the future, it can be done in the future, too.