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

Ark continues to download file when the file is already present #66

Open
burtlo opened this issue Jul 17, 2014 · 4 comments
Open

Ark continues to download file when the file is already present #66

burtlo opened this issue Jul 17, 2014 · 4 comments
Assignees

Comments

@burtlo
Copy link

burtlo commented Jul 17, 2014

Ark is always downloading the remote_file, can we not add a new attribute say redownload = true/false, which can then internally check for the existence of the archive and skip downloaded if needed.

@burtlo burtlo added the bug label Jul 17, 2014
@burtlo burtlo self-assigned this Jul 17, 2014
@maraca
Copy link

maraca commented Jul 30, 2014

Seeing this too.

@Brantone
Copy link

+1
I would imagine a simple check for if checksum matches, to skip download ... otherwise headache when files being downloaded > 500mb

@gildegoma
Copy link
Contributor

The checksum attribute can be used to avoid re-downloading a file when already present on the system. Of course, it requires to specify the expected checksum.

Note that in the past (ark ~0.1), the checksum attribute was providing a security check, which has been lost when ark code switched to Chef remote_file, as reported in #55. devrandom@86bd1fe removed checksum from the documentation, but actually this attribute is still present but with a different behavior:

From https://docs.getchef.com/resource_remote_file.html:

Use to prevent the remote_file resource from re-downloading a file. When the local file matches the checksum, the chef-client will not download it.

I feel that many people get confused with the checksum behavior (even when using remote_file resource) and I wonder if you are also interested to provide again a handful of features:

  • add redownload attribute (by default set to true). If set to false no more download will be executed when a file is locally present (no checksum verification is applied in this case).
  • checksum attribute is used to avoid unnecessary download effort
  • raise an error if download file mismatch checksum atttribute

Pending: Define the priority rules between redownload and checksum (e.g. what to do when redownload == false && checkum != nil)

@burtlo interested to align all that?

@qubitrenegade
Copy link

qubitrenegade commented Nov 23, 2017

I read this before writing #201... but after writing #201 I think maybe some relation?

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

No branches or pull requests

7 participants