Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove md5 source hash prepend #50

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

blbradley
Copy link
Contributor

Modern versions of Salt match hash length to hash type.

I was the author of this piece of code.

Modern versions of Salt match hash length to hash type.
@sroegner
Copy link
Member

@blbradley just a random thought: it certainly is beneficial to keep the hash type for users of older salt versions - is keeping it detrimental in any way when using newer Salt versions?

@blbradley
Copy link
Contributor Author

Yes, although I'm out of touch with the error thrown.

With this patch, the user will choose either a value or a key=value that is compatible with their version of Salt. In addition, I'm pretty sure this patch will not break anything for end users of older versions.

@blbradley
Copy link
Contributor Author

Clarification: older versions of this formula or older versions of Salt.

Let me know if you need the error/reports/runs on an older version of Salt.

@blbradley
Copy link
Contributor Author

I finally setup a single machine HDFS minion and ran my states without this patch:

          ID: unpack-hadoop-dist
    Function: archive.extracted
        Name: /usr/lib/
      Result: False
     Comment: Invalid length (64) for hash type 'md5'. Either remove the hash type and simply use 'd489df3808244b906eb38f4d081ba49e50c46
03db03efd5e594a1e98b09259c2' as the source_hash, or change the hash type to 'sha256'
     Started: 12:42:12.242848
    Duration: 1.238 ms
     Changes:
----------

So, users cannot use hash types other than md5 without this patch.

@blbradley
Copy link
Contributor Author

This will not restrict users of older versions of Salt. They would now be required to supply the hash type and the hash instead of just the md5 hash.

@blbradley blbradley closed this Aug 11, 2017
@blbradley blbradley reopened this Aug 11, 2017
@blbradley
Copy link
Contributor Author

Been almost a year. I don't remember the context. Is this better or worse?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants