chef-boneyard / chef-dk

DEPRECATED: A streamlined development and deployment workflow for Chef Infra platform.
Apache License 2.0
380 stars 170 forks source link

Error in Uploading Cookbook #1276

Open srirammageswaran opened 7 years ago

srirammageswaran commented 7 years ago

When i try to upload cookbook i get an exception

ERROR: Tarball has contents that are not what they are reported to be

knife supermarket share cookbook_name -VV -o . --supermarket-site https://XXXXXXXX.YYYYY.com knife cookbook site share vault -o . -VV --supermarket-site https://XXXXXXXX.YYYYY.com

My Chef DK version is Given Below :

Chef Development Kit Version: 1.4.3 chef-client version: 12.19.36 delivery version: master (41b94ffb5efd33723cf72a89bf4d273c8151c9dc) berks version: 5.6.4 kitchen version: 1.16.0 inspec version: 1.25.1

I use a centos 7.

Stack Trace given below :

INFO: Using configuration from /home/vagrant/.chef/knife.rb
DEBUG: Chef::HTTP calling Chef::HTTP::JSONInput#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::JSONOutput#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::CookieManager#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::Decompressor#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::RemoteRequestID#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::ValidateContentLength#handle_request
DEBUG: Initiating GET to https://supermarket.local.com/api/v1/cookbooks/cookbook_masked_name
DEBUG: ---- HTTP Request Header Data: ----
DEBUG: Accept: application/json
DEBUG: Accept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3
DEBUG: X-REMOTE-REQUEST-ID: 67b7f2da-2628-498f-a65c-68f48b92430a
DEBUG: ---- End HTTP Request Header Data ----
DEBUG: ---- HTTP Status and Header Data: ----
DEBUG: HTTP 1.1 404 Not Found
DEBUG: server: nginx/1.8.0
DEBUG: date: Thu, 08 Jun 2017 17:27:57 GMT
DEBUG: content-type: application/json; charset=utf-8
DEBUG: transfer-encoding: chunked
DEBUG: connection: close
DEBUG: status: 404 Not Found
DEBUG: x-frame-options: SAMEORIGIN
DEBUG: x-xss-protection: 1; mode=block
DEBUG: x-content-type-options: nosniff
DEBUG: cache-control: no-cache
DEBUG: x-request-id: 6eb951ea-a75c-4ee1-adf7-ebbe904c767b
DEBUG: x-runtime: 0.007986
DEBUG: content-encoding: gzip
DEBUG: ---- End HTTP Status/Header Data ----
DEBUG: ---- HTTP Response Body ----
DEBUG: ▒VJ-*▒/▒▒M-.NLO-V▒▒V
J-▒/-JNUH▒O-V▒▒/QH▒▒,.▒S▒Ձ▒N▒OIU▒R▒▒▒w▒▒sQ▒▒?H
DEBUG: ---- End HTTP Response Body -----
DEBUG: Chef::HTTP calling Chef::HTTP::ValidateContentLength#handle_response
DEBUG: HTTP server did not include a Content-Length header in response, cannot identify truncated downloads.
DEBUG: Chef::HTTP calling Chef::HTTP::RemoteRequestID#handle_response
DEBUG: Chef::HTTP calling Chef::HTTP::Decompressor#handle_response
DEBUG: Decompressing gzip response
DEBUG: Chef::HTTP calling Chef::HTTP::CookieManager#handle_response
DEBUG: Chef::HTTP calling Chef::HTTP::JSONOutput#handle_response
DEBUG: Chef::HTTP calling Chef::HTTP::JSONInput#handle_response
INFO: HTTP Request Returned 404 Not Found:
DEBUG: No chefignore file found at /home/vagrant/chefignore no files will be ignored
INFO: Validating ruby files
DEBUG: Ruby file cookbook_masked_name/libraries/helpercookbook_masked_name.rb is unchanged, skipping syntax check
DEBUG: Ruby file cookbook_masked_name/libraries/matchers.rb is unchanged, skipping syntax check
DEBUG: Ruby file cookbook_masked_name/libraries/cookbook_masked_name_ops.rb is unchanged, skipping syntax check
DEBUG: Ruby file cookbook_masked_name/libraries/cookbook_masked_name_ssl.rb is unchanged, skipping syntax check
DEBUG: Ruby file cookbook_masked_name/libraries/cookbook_masked_name_unseal.rb is unchanged, skipping syntax check
DEBUG: Ruby file cookbook_masked_name/metadata.rb is unchanged, skipping syntax check
DEBUG: Ruby file cookbook_masked_name/recipes/install_cookbook_masked_name_service.rb is unchanged, skipping syntax check
DEBUG: Ruby file cookbook_masked_name/recipes/ssl_apply.rb is unchanged, skipping syntax check
DEBUG: Ruby file cookbook_masked_name/recipes/ssl_ca_pem.rb is unchanged, skipping syntax check
DEBUG: Ruby file cookbook_masked_name/recipes/_service.rb is unchanged, skipping syntax check
INFO: Validating templates
DEBUG: Template cookbook_masked_name/templates/default/cookbook_masked_name-init.erb is unchanged, skipping syntax check
DEBUG: Template cookbook_masked_name/templates/default/cookbook_masked_name-sysconfig.erb is unchanged, skipping syntax check
INFO: Syntax OK
DEBUG: Staging at /tmp/chef-cookbook_masked_name-build20170608-3261-r08o76
DEBUG: Staging /home/vagrant/cookbooks/cookbook_masked_name/recipes/_service.rb to /tmp/chef-cookbook_masked_name-build20170608-3261-r08o76/cookbook_masked_name/recipes/_service.rb
DEBUG: Staging /home/vagrant/cookbooks/cookbook_masked_name/recipes/install_cookbook_masked_name_service.rb to /tmp/chef-cookbook_masked_name-build20170608-3261-r08o76/cookbook_masked_name/recipes/install_cookbook_masked_name_service.rb
DEBUG: Staging /home/vagrant/cookbooks/cookbook_masked_name/recipes/ssl_apply.rb to /tmp/chef-cookbook_masked_name-build20170608-3261-r08o76/cookbook_masked_name/recipes/ssl_apply.rb
DEBUG: Staging /home/vagrant/cookbooks/cookbook_masked_name/recipes/ssl_ca_pem.rb to /tmp/chef-cookbook_masked_name-build20170608-3261-r08o76/cookbook_masked_name/recipes/ssl_ca_pem.rb
DEBUG: Staging /home/vagrant/cookbooks/cookbook_masked_name/libraries/helpercookbook_masked_name.rb to /tmp/chef-cookbook_masked_name-build20170608-3261-r08o76/cookbook_masked_name/libraries/helpercookbook_masked_name.rb
DEBUG: Staging /home/vagrant/cookbooks/cookbook_masked_name/libraries/matchers.rb to /tmp/chef-cookbook_masked_name-build20170608-3261-r08o76/cookbook_masked_name/libraries/matchers.rb
DEBUG: Staging /home/vagrant/cookbooks/cookbook_masked_name/libraries/cookbook_masked_name_ops.rb to /tmp/chef-cookbook_masked_name-build20170608-3261-r08o76/cookbook_masked_name/libraries/cookbook_masked_name_ops.rb
DEBUG: Staging /home/vagrant/cookbooks/cookbook_masked_name/libraries/cookbook_masked_name_ssl.rb to /tmp/chef-cookbook_masked_name-build20170608-3261-r08o76/cookbook_masked_name/libraries/cookbook_masked_name_ssl.rb
DEBUG: Staging /home/vagrant/cookbooks/cookbook_masked_name/libraries/cookbook_masked_name_unseal.rb to /tmp/chef-cookbook_masked_name-build20170608-3261-r08o76/cookbook_masked_name/libraries/cookbook_masked_name_unseal.rb
DEBUG: Staging /home/vagrant/cookbooks/cookbook_masked_name/templates/default/cookbook_masked_name-init.erb to /tmp/chef-cookbook_masked_name-build20170608-3261-r08o76/cookbook_masked_name/templates/default/cookbook_masked_name-init.erb
DEBUG: Staging /home/vagrant/cookbooks/cookbook_masked_name/templates/default/cookbook_masked_name-sysconfig.erb to /tmp/chef-cookbook_masked_name-build20170608-3261-r08o76/cookbook_masked_name/templates/default/cookbook_masked_name-sysconfig.erb
DEBUG: Staging /home/vagrant/cookbooks/cookbook_masked_name/.gitignore to /tmp/chef-cookbook_masked_name-build20170608-3261-r08o76/cookbook_masked_name/.gitignore
DEBUG: Staging /home/vagrant/cookbooks/cookbook_masked_name/chefignore to /tmp/chef-cookbook_masked_name-build20170608-3261-r08o76/cookbook_masked_name/chefignore
DEBUG: Staging /home/vagrant/cookbooks/cookbook_masked_name/Jenkinsfile to /tmp/chef-cookbook_masked_name-build20170608-3261-r08o76/cookbook_masked_name/Jenkinsfile
DEBUG: Staging /home/vagrant/cookbooks/cookbook_masked_name/metadata.rb to /tmp/chef-cookbook_masked_name-build20170608-3261-r08o76/cookbook_masked_name/metadata.rb
DEBUG: Staging /home/vagrant/cookbooks/cookbook_masked_name/Policyfile.rb to /tmp/chef-cookbook_masked_name-build20170608-3261-r08o76/cookbook_masked_name/Policyfile.rb
DEBUG: Staging /home/vagrant/cookbooks/cookbook_masked_name/README.md to /tmp/chef-cookbook_masked_name-build20170608-3261-r08o76/cookbook_masked_name/README.md
DEBUG: Generating metadata
Generating metadata for cookbook_masked_name from /tmp/chef-cookbook_masked_name-build20170608-3261-r08o76/cookbook_masked_name/metadata.rb
DEBUG: Generated /tmp/chef-cookbook_masked_name-build20170608-3261-r08o76/cookbook_masked_name/metadata.json
DEBUG: Temp cookbook directory is "/tmp/chef-cookbook_masked_name-build20170608-3261-r08o76"
Making tarball cookbook_masked_name.tgz
which: no gnutar in (/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/vagrant/.local/bin:/home/vagrant/bin:/opt/chefdk/embedded/bin:/opt/chefdk/embedded/bin:/sbin:/bin)
DEBUG: Signing: method: post, url: https://supermarket.local.com/api/v1/cookbooks, file: #<File:0x00000001326788>, User-id: username, Timestamp: 2017-06-08T17:27:57Z
ERROR: Tarball has contents that are not what they are reported to be
cheeseplus commented 7 years ago

This might be related to the lack of the gnutar utility so I am curious if installing that resolves the issue?