file.managed doesn't hash currently existing file prior to download #40479
Labels
Pending-Discussion
The issue or pull request needs more discussion before it can be closed or merged
Milestone
Description of Issue/Question
I use file.managed to distribute qcow2 images across controllers in my openstack cluster. Currently, every time I run a highstate to pull down the latest set of images, it appears that salt doesn't hash the image it already has to compare it against source_hash, and instead fully downloads the file first. As our image repository grows, this causes a lot of unnecessary traffic.
It would be great if salt hashed the file it already had stored locally, compared that hash against the value stored in the file listed at source_hash, and then downloaded the entire file only if there was a hash mismatch.
Setup
file distribution
relevant pillar
Steps to Reproduce Issue
Run highstate (or apply file.managed state individually)
Versions Report
Salt Version:
Salt: 2016.11.3
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: 2.2
gitdb: 0.5.4
gitpython: 0.3.2 RC1
ioflo: Not Installed
Jinja2: 2.9.4
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.2
mysql-python: 1.2.3
pycparser: Not Installed
pycrypto: 2.6.1
pygit2: Not Installed
Python: 2.7.9 (default, Jun 29 2016, 13:08:31)
python-gnupg: Not Installed
PyYAML: 3.11
PyZMQ: 14.4.0
RAET: Not Installed
smmap: 0.8.2
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.0.5
System Versions:
dist: debian 8.7
machine: x86_64
release: 4.8.6-x86_64-linode78
system: Linux
version: debian 8.7
The text was updated successfully, but these errors were encountered: