saltstack/salt — pull request #15715 by wt (2014-09-11 19:09:34+00:00)
Title: Make s3fs work better.

S3 uses https ETag headers. In some cases (non-multipart uploaded
files), the ETag header is the md5sum of the file. In other cases
(multipart uploaded files) the Etag does not correspond to anything
calculable locally. In that case, files used for the salt filesystem
backend would be downloaded every time the s3 cache timeout expires (a
static 30 seconds). Fortunately, non-md5sum ETags have a hyphen in them.
This patch applies the following logic to such files. If the cached
file is the same size in bytes and has a later last modification time,
it will be considered up to date and will not be downloaded. Otherwise,
it will be updated.

(cherry picked from commit 858e5f9c1d6fd41a8916e8127a2c92ce729ae9aa)
Signed-off-by: Warren Turkal

Conflicts:
salt/fileserver/s3fs.py