salt: archive.extracted/file.managed source_hash format is invalid
Description of Issue/Question
When I try to extract archive or use file.managed with source_hash url, state fails. Error returns:
ID: archieve
Function: archive.extracted
Name: /tmp/
Result: False
Comment: Source hash http://192.168.1.5/storage/test/archive.md5 format is invalid. The supported formats are: 1) a hash, 2) an expression in the format <hash_type>=<hash>, or 3) either a path to a local file containing hashes, or a URI of a remote hash file. Supported protocols for remote hash files are: salt, file, http, https, ftp, swift, s3. The hash may also not be of a valid length, the following are supported hash types and lengths: md5 (32), sha1 (40), sha224 (56), sha256 (64), sha384 (96), sha512 (128).
Started: 02:29:24.927676
Duration: 197.943 ms
Changes:
Error occurs on linux, on windows works fine
Steps to Reproduce Issue
test_hash.sls:
archieve:
archive.extracted:
- name: /tmp/
- if_missing: /tmp/test
- source: http://192.168.1.5/storage/test/archive.tar.gz
- source_hash: http://192.168.1.5/storage/test/archive.md5
- archive_format: tar
- options: zx
- enforce_toplevel: False
/tmp/zaq.conf:
file.managed:
- source: http://192.168.1.5/storage/test/zaq.conf
- source_hash: http://192.168.1.5/storage/test/zaq.md5
- backup: minion
Create simple archive (archive.tar.gz) and file zaq.conf Create md5sum using:
md5sum archive.tar.gz > archive.md5
md5sum zaq.conf > zaq.md5
Versions Report
Salt Version:
Salt: 2017.7.2
Dependency Versions:
cffi: 1.5.2
cherrypy: 3.5.0
dateutil: 2.4.2
docker-py: Not Installed
gitdb: 0.6.4
gitpython: 1.0.1
ioflo: Not Installed
Jinja2: 2.8
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: 1.0.3
msgpack-pure: Not Installed
msgpack-python: 0.4.6
mysql-python: Not Installed
pycparser: 2.14
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 2.7.12 (default, Nov 19 2016, 06:48:10)
python-gnupg: Not Installed
PyYAML: 3.11
PyZMQ: 15.2.0
RAET: Not Installed
smmap: 0.9.0
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.1.4
System Versions:
dist: Ubuntu 16.04 xenial
locale: UTF-8
machine: x86_64
release: 4.4.0-83-generic
system: Linux
version: Ubuntu 16.04 xenial
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 1
- Comments: 15 (7 by maintainers)
I can reproduce this in 2017.7.2, but not on the head of the
2017.7branch (which will become 2017.7.3 once we are ready to release it).It seems that there was a regression, but it has since been fixed.
I am unable to replicate this.
The debug log would be helpful.
Thanks, Daniel