Open arizvisa opened 5 years ago
looks like i'm able to replicate this on 2018.3.3 as well. We will need to get this fixed thanks.
Any word on this? If I take the time to write up a PR will you guys merge it? I have a number of PRs waiting since like the beginning of the year which is why I ask..
(just for my record, it seems like #52944 fixes a similar issue in the same module)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.
Was this fixed at all? Or just abandoned?
Thank you for updating this issue. It is no longer marked as stale.
So, Lol. I wouldn't have thought this as being too common for it to be too big of a deal, but it turns out that the hash file for y'alls windows installer (https://repo.saltstack.com/windows/Salt-Minion-2018.3.3-Py2-x86-Setup.exe.md5) is a utf16 encoded md5. Due to it being utf16, the file.managed fails.
Here's a statefile:
This results in:
This is in the 2019.2 branch. If you look in
salt.modules.file
, you can see thatget_managed()
will callsalt.utils.hashutils.get_hash()
in order to process thesource_hash
file. Thesalt.utils.hashutils.get_hash()
function, which doesn't take any wildarg or kwarg parameters, then callssalt.utils.files.fopen()
to open the file. Althoughsalt.utils.files.fopen()
function can take anencoding=
parameter, theget_hash()
function doesn't even bother since it only has three positional parameters and none of them are an encoding.