[chef] Re: Re: Re: Re: remote_file resource is it idempotent ?


Chronological Thread 
  • From: "John E. Vincent (lusis)" < >
  • To: " " < >
  • Subject: [chef] Re: Re: Re: Re: remote_file resource is it idempotent ?
  • Date: Sun, 6 Oct 2013 04:35:55 -0400

Not sure about Nexus but I just wrote an artifactory proxy (using nginx/lua) for our chef downloads and that information is indeed there and being used by Chef11 client. Artifactory actually adds a few other headers as well:

< Last-Modified: Thu, 05 Sep 2013 21:33:35 GMT
Last-Modified: Thu, 05 Sep 2013 21:33:35 GMT
< ETag: dd9cc472ec2ebf81131c2a1c79b9d4b3d54732de
ETag: dd9cc472ec2ebf81131c2a1c79b9d4b3d54732de
< X-Checksum-Sha1: dd9cc472ec2ebf81131c2a1c79b9d4b3d54732de
X-Checksum-Sha1: dd9cc472ec2ebf81131c2a1c79b9d4b3d54732de
< X-Checksum-Md5: 76674a9a48462bd2630d044a7c7d7c43
X-Checksum-Md5: 76674a9a48462bd2630d044a7c7d7c43



On Sat, Oct 5, 2013 at 7:22 PM, Jesse Campbell < " target="_blank"> > wrote:
in the versions of nexus i've used, both etag and if-modified-since tags are supported.

-jesse


On Thu, Oct 3, 2013 at 2:18 PM, Manoj Thakkar < " target="_blank"> > wrote:
Thanks for quick help Dan,

i am using a 3rd party prodcut (Nexus) to download data from , i am not sure if they support it , i think i will just run a test to see if it works,

-Manoj

On Thu, Oct 3, 2013 at 11:12 AM, Daniel DeLeo < " target="_blank"> > wrote:

On Thursday, October 3, 2013 at 11:09 AM, Manoj Thakkar wrote:

Hi,

i want to use the remote_file resource sunch that the client does not download the file if file size is same, is there something extra i have to do or remote_file is idempotent by default ?
I was looking at documentation, its confusing at some places it says use_conditional_get , but again there are no examples on how to use it.

Thanks
Manoj 
If you're on Chef 11.6.0+, and your HTTP server supports ETag and/or If-Modified-Since, Chef will handle use those HTTP features automatically to avoid unnecessary downloads.

If you're on an earlier version of Chef, or your HTTP server doesn't implement those cache control features, you need to provide a SHA2-256 checksum of the file in the resource's checksum attribute.

-- 
Daniel DeLeo







Archive powered by MHonArc 2.6.16.

§