Chef 12: System Time and Expiring Bookshelf Links
Nobody has claimed this yet.
- Dominant language
- Erlang
- Stars
- 303
- Forks
- 211
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 5
Description
Customer Issue: Zendesk 4921
Backends' unix system time set 4 hours ahead of Frontend. A knife client with the same OS
time as the frontend tries to upload cookbooks, gets "403 Access Denied"
for all new cookbook checksums it tried to upload. Existing checksums are
ok and can be read as well. Existing checksums do not result in an expiring link generation.
New cookbook checksums on the other hand, as a part of a new or
changed cookbook, have expiring links generated for them by bookshelf.
The expiration time is 5 - 15 minutes, idk. Anyway, the links are
already long expired in this case from the perspective of the knife client making the request at an earlier time, even before the backend generates
them. I tested by setting the backends in an HA cluster 4 hours ahead
and reproduced the error the customer was seeing.
The system is operating as designed here, but it's not helping Support support defensively in this case.
Chef Server 12 in Tiered or HA topology should refuse to run with an obvious error log message if the unix system times are minutes off between the Frontend and Backend layer. Just log and shut the cluster down. That way the problem is obvious and gets fixed.
It's possible for Bookshelf to return a response better than just a plain 403 if it knows that the incoming request timestamp and its own timestamp are wildly out of date. Maybe by sending the x-ops-timestamp from Req0 all the way down into https://github.com/chef/chef-server/blob/master/src/bookshelf/src/bksw_xml.erl#L83-L92 through
https://github.com/chef/chef-server/blob/master/src/bookshelf/src/bksw_sec.erl#L12 and altering the message returned to the knife client?
Versions
Chef Server 12.0.8 on all servers.
Knife 12.0.3
Dates on Frontend and current Primary Backend, respectively
vagrant@vagrant:~$ date
Sat Jun 27 09:14:04 UTC 2015
root@chefserver1:~# date
Sat Jun 27 14:09:45 UTC 2015
Coordinated examples of a knife client hitting a frontend follow
Client hitting Frontend
Attempts to upload the community ntpd cookbook,
which is not already present on the server.
vagrant@vagrant:~$ /opt/opscode/embedded/bin/knife cookbook upload ntpd -VV
INFO: Using configuration from /home/vagrant/.chef/knife.rb
DEBUG: No chefignore file found at /home/vagrant/chefignore no files will be ignored
DEBUG: Chef::HTTP calling Chef::HTTP::JSONInput#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::JSONToModelOutput#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::Authenticator#handle_request
DEBUG: Signing the request as stevedanno
DEBUG: Chef::HTTP calling Chef::HTTP::RemoteRequestID#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::ValidateContentLength#handle_request
DEBUG: Initiating GET to https://chefserver1FE/organizations/4thcoffee/cookbooks?num_versions=all
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-OPS-SIGN: algorithm=sha1;version=1.0;
DEBUG: X-OPS-USERID: stevedanno
DEBUG: X-OPS-TIMESTAMP: 2015-06-27T09:17:46Z
DEBUG: X-OPS-CONTENT-HASH: 2jmj7l5rSw0yVb/vlWAYkK/YBwk=
DEBUG: X-OPS-AUTHORIZATION-1: V1M6+2rMNCu4BiJIEn1d9UvEawoLsiKxFgbxfe8i6qGa8+4L9hQm6pmguUSk
DEBUG: X-OPS-AUTHORIZATION-2: u0FETwO180VWikntCqWt5/rfEZ+hX0+xPap8gCyMMgLANQIc5AMv6KqRfQ/q
DEBUG: X-OPS-AUTHORIZATION-3: K+AW+I56QpRYekbq/dxWhdbdrJQMT6tO99vCGbIONJp9Oi7TAQMml5OyXMOM
DEBUG: X-OPS-AUTHORIZATION-4: Ca0LiEUeTSNd3JO2E1DeUax6oSFmWB82dMZDGgbAgSjIIkr6iR7I4JzpNSiL
DEBUG: X-OPS-AUTHORIZATION-5: fJ0fTwOeUKwfjxyFVPj3cfsh7iMA+Ocof1W7tZXl8pGCy+6CVSEUVG3OqGvM
DEBUG: X-OPS-AUTHORIZATION-6: iFridGL4CNJPuCkpugNYXqzz0hJ/4n3n1J8lK2PnFw==
DEBUG: HOST: chefserver1FE:443
DEBUG: X-REMOTE-REQUEST-ID: efea7439-9bf0-47cd-a0a2-2d6c4ef1bb9a
DEBUG: ---- End HTTP Request Header Data ----
DEBUG: ---- HTTP Status and Header Data: ----
DEBUG: HTTP 1.1 200 OK
DEBUG: server: openresty/1.7.10.1
DEBUG: date: Sat, 27 Jun 2015 09:17:46 GMT
DEBUG: content-type: application/json
DEBUG: transfer-encoding: chunked
DEBUG: connection: close
DEBUG: x-ops-api-info: flavor=cs;version=12.0.0;oc_erchef=1.6.4
DEBUG: content-encoding: gzip
DEBUG: ---- End HTTP Status/Header Data ----
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::Authenticator#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::JSONToModelOutput#handle_response
DEBUG: Chef::HTTP calling Chef::HTTP::JSONInput#handle_response
Uploading ntpd [0.0.1]
DEBUG: No chefignore file found at /home/vagrant/cookbooks/chefignore no files will be ignored
INFO: Unable to access cache at /var/chef. Switching cache to /home/vagrant/.chef
INFO: Validating ruby files
DEBUG: Ruby file /home/vagrant/cookbooks/ntpd/metadata.rb is unchanged, skipping syntax check
DEBUG: Ruby file /home/vagrant/cookbooks/ntpd/recipes/default.rb is unchanged, skipping syntax check
INFO: Validating templates
INFO: Syntax OK
INFO: Saving ntpd
DEBUG: Chef::HTTP calling Chef::HTTP::JSONInput#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::JSONToModelOutput#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::Authenticator#handle_request
DEBUG: Signing the request as stevedanno
DEBUG: Chef::HTTP calling Chef::HTTP::RemoteRequestID#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::ValidateContentLength#handle_request
DEBUG: Initiating POST to https://chefserver1FE/organizations/4thcoffee/sandboxes
DEBUG: ---- HTTP Request Header Data: ----
DEBUG: Content-Type: application/json
DEBUG: Accept: application/json
DEBUG: Accept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3
DEBUG: X-OPS-SIGN: algorithm=sha1;version=1.0;
DEBUG: X-OPS-USERID: stevedanno
DEBUG: X-OPS-TIMESTAMP: 2015-06-27T09:17:46Z
DEBUG: X-OPS-CONTENT-HASH: EVtq7olWKYgJ/pn7wpa573Qptog=
DEBUG: X-OPS-AUTHORIZATION-1: spk2ZCDc+Ok2uz1DYuweTIFR9fETo855lmCU1207ME89OmJNFvf3+3O4Ts92
DEBUG: X-OPS-AUTHORIZATION-2: ImtkqUD5V/+BiVwVcrpywrDNSpl6LMwp00+yqP1yr2IZHOxYQWaNClOgojPL
DEBUG: X-OPS-AUTHORIZATION-3: GsTj1ogeYURCetmGJ/thHxdTQQD4Abpnr3LiGonGnnNX3xvxmWxmEFVcPliw
DEBUG: X-OPS-AUTHORIZATION-4: bSlooVYOEEC+7h4UFlJhhVpWCltC14ymoak0Cmq9HXIJYqETUnqoWlsDHSe1
DEBUG: X-OPS-AUTHORIZATION-5: 9EOSbw19MJicp+souHJxMCxi7QUOS4f8JtkwLFbOPsw3Rb1SIQD6V9Gt47ZO
DEBUG: X-OPS-AUTHORIZATION-6: nFUFA1vG595voUEHUCCshuz5Rp74vwxBnx6aWVv6DQ==
DEBUG: HOST: chefserver1FE:443
DEBUG: X-REMOTE-REQUEST-ID: efea7439-9bf0-47cd-a0a2-2d6c4ef1bb9a
DEBUG: Content-Length: 135
DEBUG: ---- End HTTP Request Header Data ----
DEBUG: ---- HTTP Status and Header Data: ----
DEBUG: HTTP 1.1 201 Created
DEBUG: server: openresty/1.7.10.1
DEBUG: date: Sat, 27 Jun 2015 09:17:46 GMT
DEBUG: content-type: application/json
DEBUG: content-length: 828
DEBUG: connection: close
DEBUG: x-ops-api-info: flavor=cs;version=12.0.0;oc_erchef=1.6.4
DEBUG: location: http://chefserver1fe/organizations/4thcoffee/sandboxes/d8efa6ef240baaf85a4b2d2aaedfab46
DEBUG: ---- End HTTP Status/Header Data ----
DEBUG: Chef::HTTP calling Chef::HTTP::ValidateContentLength#handle_response
DEBUG: Content-Length validated correctly.
DEBUG: Chef::HTTP calling Chef::HTTP::RemoteRequestID#handle_response
DEBUG: Chef::HTTP calling Chef::HTTP::Authenticator#handle_response
DEBUG: Chef::HTTP calling Chef::HTTP::Decompressor#handle_response
DEBUG: Chef::HTTP calling Chef::HTTP::CookieManager#handle_response
DEBUG: Chef::HTTP calling Chef::HTTP::JSONToModelOutput#handle_response
DEBUG: Chef::HTTP calling Chef::HTTP::JSONInput#handle_response
INFO: Uploading files
INFO: Uploading /home/vagrant/cookbooks/ntpd/metadata.rb (checksum hex = 173e27c7eac4a6488529b7364f406725) to https://chefserver1fe:443/bookshelf/organization-dbf375b2554cf22bc19ad8efa6ef240b/checksum-173e27c7eac4a6488529b7364f406725?AWSAccessKeyId=b2c2f4132523d22c4520648c864c8d3ec156be25&Expires=1435397566&Signature=By0B8S3KWK66skPPILiXvyeEIAI%3D
INFO: Uploading /home/vagrant/cookbooks/ntpd/recipes/default.rb (checksum hex = 201ecd16d298cea2f353b0081b0da7c7) to https://chefserver1fe:443/bookshelf/organization-dbf375b2554cf22bc19ad8efa6ef240b/checksum-201ecd16d298cea2f353b0081b0da7c7?AWSAccessKeyId=b2c2f4132523d22c4520648c864c8d3ec156be25&Expires=1435397566&Signature=3fIfFbGrecRlTb6MsAxiR/UsycU%3D
DEBUG: /home/vagrant/cookbooks/ntpd/README.md has not changed
DEBUG: Chef::HTTP calling Chef::HTTP::JSONInput#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::JSONToModelOutput#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::Authenticator#handle_request
DEBUG: Signing the request as stevedanno
DEBUG: Chef::HTTP calling Chef::HTTP::RemoteRequestID#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::ValidateContentLength#handle_request
DEBUG: Initiating PUT to https://chefserver1fe/bookshelf/organization-dbf375b2554cf22bc19ad8efa6ef240b/checksum-173e27c7eac4a6488529b7364f406725?AWSAccessKeyId=b2c2f4132523d22c4520648c864c8d3ec156be25&Expires=1435397566&Signature=By0B8S3KWK66skPPILiXvyeEIAI%3D
DEBUG: ---- HTTP Request Header Data: ----
DEBUG: content-type: application/x-binary
DEBUG: content-md5: Fz4nx+rEpkiFKbc2T0BnJQ==
DEBUG: accept: application/json
DEBUG: Chef::HTTP calling Chef::HTTP::JSONInput#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::JSONToModelOutput#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::Authenticator#handle_request
DEBUG: Signing the request as stevedanno
DEBUG: Accept: application/json
DEBUG: Accept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3
DEBUG: X-OPS-SIGN: algorithm=sha1;version=1.0;
DEBUG: X-OPS-USERID: stevedanno
DEBUG: X-OPS-TIMESTAMP: 2015-06-27T09:17:46Z
DEBUG: X-OPS-CONTENT-HASH: POCqKw6JdepfiE2IVh9n6S0aoLs=
DEBUG: Chef::HTTP calling Chef::HTTP::RemoteRequestID#handle_request
DEBUG: Chef::HTTP calling Chef::HTTP::ValidateContentLength#handle_request
DEBUG: X-OPS-AUTHORIZATION-1: aiKP0iW2MDSrPqvBv+LYJiPdXQk8Jo3cSs9A9QqQH+uOkv9jto5WhkkrC3XB
DEBUG: X-OPS-AUTHORIZATION-2: QxotUj5C4jrU7/IHYl412uYjpMwGClydoclovNvvkvxQzBGLH3dT1fdwHrQs
DEBUG: X-OPS-AUTHORIZATION-3: uES60w6aVSTDME8akfjUNrqVckFT6qfMaBiyOALtFm/6POyhGK9qAMidGDCY
DEBUG: Initiating PUT to https://chefserver1fe/bookshelf/organization-dbf375b2554cf22bc19ad8efa6ef240b/checksum-201ecd16d298cea2f353b0081b0da7c7?AWSAccessKeyId=b2c2f4132523d22c4520648c864c8d3ec156be25&Expires=1435397566&Signature=3fIfFbGrecRlTb6MsAxiR/UsycU%3D
DEBUG: ---- HTTP Request Header Data: ----
DEBUG: content-type: application/x-binary
DEBUG: content-md5: IB7NFtKYzqLzU7AIGw2nxw==
DEBUG: X-OPS-AUTHORIZATION-4: FgDxt25AM/MSsVUH0yVRmcFPaSjjvaXtrUnDv1VomS8TecfCoagbj/WwnNGd
DEBUG: X-OPS-AUTHORIZATION-5: cLFqmPkuqEb3svyUKuS4IM+4UEQr34zIdJTTmzw+p4Pz6lfg/71zWP4zNCN8
DEBUG: X-OPS-AUTHORIZATION-6: zpNtwH0VsQ+Qi7JS8mD5ZU7IASoE1rtQBkdibep5jw==
DEBUG: accept: application/json
DEBUG: Accept: application/json
DEBUG: HOST: chefserver1fe:443
DEBUG: X-REMOTE-REQUEST-ID: efea7439-9bf0-47cd-a0a2-2d6c4ef1bb9a
DEBUG: Accept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3
DEBUG: X-OPS-SIGN: algorithm=sha1;version=1.0;
DEBUG: Content-Length: 263
DEBUG: ---- End HTTP Request Header Data ----
DEBUG: X-OPS-USERID: stevedanno
DEBUG: X-OPS-TIMESTAMP: 2015-06-27T09:17:46Z
DEBUG: X-OPS-CONTENT-HASH: I5A9ZWRhsBTo68RAYz459cEVrRY=
DEBUG: X-OPS-AUTHORIZATION-1: FQAl/7Gwgbsx7CUkFoHqsyVdSbAPcFjpkw7Ddyp9VlRU2FiCDnS5UYsyfqlG
DEBUG: X-OPS-AUTHORIZATION-2: HmIBd6wdh2fZPUAQdw7gh39sdnzZFji5JH7TNvVVsDV5W6oo3an5aondjKcE
DEBUG: X-OPS-AUTHORIZATION-3: 8e9FrTJUtC9kTZwkeN6Xm07w5jFvoLnIggmvh2f9dbPIQL7RVKJQRfXqBn3s
DEBUG: X-OPS-AUTHORIZATION-4: PhePFCcIENGZFuXBhAadhKshlYKE/yqsxstEl95JZCdCafMi8/AqXsSFqd/K
DEBUG: X-OPS-AUTHORIZATION-5: w9pNYyFfLuCFgKd3eYc7vDLqs7IQ4X2nZ40zPbOwmBLAQzviKkklUEMuC5HW
DEBUG: X-OPS-AUTHORIZATION-6: ERxjO7apg1bHdlmvgpp9TD5Hp+9rBF+OFyFAwJ7M+w==
DEBUG: HOST: chefserver1fe:443
DEBUG: X-REMOTE-REQUEST-ID: efea7439-9bf0-47cd-a0a2-2d6c4ef1bb9a
DEBUG: Content-Length: 28
DEBUG: ---- End HTTP Request Header Data ----
DEBUG: ---- HTTP Status and Header Data: ----
DEBUG: HTTP 1.1 403 Forbidden
DEBUG: server: openresty/1.7.10.1
DEBUG: date: Sat, 27 Jun 2015 09:17:46 GMT
DEBUG: content-length: 206
DEBUG: connection: close
DEBUG: x-amz-request-id: g2gCZAATYm9va3NoZWxmQDEyNy4wLjAuMWgDYgAABZtiAAZS0GIACLPC
DEBUG: x-amz-id-2: g2gCZAATYm9va3NoZWxmQDEyNy4wLjAuMWgDYgAABZtiAAZS0GIACLSb
DEBUG: ---- End HTTP Status/Header Data ----
DEBUG: ---- HTTP Response Body ----
DEBUG: <?xml version="1.0" encoding="UTF-8"?><Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>g2gCZAATYm9va3NoZWxmQDEyNy4wLjAuMWgDYgAABZtiAAZS0GIACLPC</RequestId><HostId></HostId></Error>
DEBUG: ---- End HTTP Response Body -----
DEBUG: ---- HTTP Request Body ----
DEBUG: name "ntpd"
maintainer "YOUR_COMPANY_NAME"
maintainer_email "YOUR_EMAIL"
license "All rights reserved"
description "Installs/Configures ntpd"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version "0.0.1"
DEBUG: ---- End HTTP Request Body ----
DEBUG: Chef::HTTP calling Chef::HTTP::ValidateContentLength#handle_response
DEBUG: Content-Length validated correctly.
DEBUG: Chef::HTTP calling Chef::HTTP::RemoteRequestID#handle_response
DEBUG: Chef::HTTP calling Chef::HTTP::Authenticator#handle_response
DEBUG: Chef::HTTP calling Chef::HTTP::Decompressor#handle_response
DEBUG: Chef::HTTP calling Chef::HTTP::CookieManager#handle_response
DEBUG: Chef::HTTP calling Chef::HTTP::JSONToModelOutput#handle_response
DEBUG: Expected JSON response, but got content-type ''
DEBUG: Chef::HTTP calling Chef::HTTP::JSONInput#handle_response
INFO: HTTP Request Returned 403 Forbidden:
DEBUG: ---- HTTP Status and Header Data: ----
DEBUG: HTTP 1.1 403 Forbidden
ERROR: Failed to upload /home/vagrant/cookbooks/ntpd/metadata.rb (173e27c7eac4a6488529b7364f406725) to https://chefserver1fe:443/bookshelf/organization-dbf375b2554cf22bc19ad8efa6ef240b/checksum-173e27c7eac4a6488529b7364f406725?AWSAccessKeyId=b2c2f4132523d22c4520648c864c8d3ec156be25&Expires=1435397566&Signature=By0B8S3KWK66skPPILiXvyeEIAI%3D : 403 "Forbidden"
<?xml version="1.0" encoding="UTF-8"?><Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>g2gCZAATYm9va3NoZWxmQDEyNy4wLjAuMWgDYgAABZtiAAZS0GIACLPC</RequestId><HostId></HostId></Error>
DEBUG: server: openresty/1.7.10.1
DEBUG: date: Sat, 27 Jun 2015 09:17:46 GMT
DEBUG: content-length: 206
DEBUG: connection: close
DEBUG: x-amz-request-id: g2gCZAATYm9va3NoZWxmQDEyNy4wLjAuMWgDYgAABZtiAAZS0GIACML9
DEBUG: x-amz-id-2: g2gCZAATYm9va3NoZWxmQDEyNy4wLjAuMWgDYgAABZtiAAZS0GIACMOz
DEBUG: ---- End HTTP Status/Header Data ----
DEBUG: ---- HTTP Response Body ----
DEBUG: <?xml version="1.0" encoding="UTF-8"?><Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>g2gCZAATYm9va3NoZWxmQDEyNy4wLjAuMWgDYgAABZtiAAZS0GIACML9</RequestId><HostId></HostId></Error>
DEBUG: ---- End HTTP Response Body -----
DEBUG: ---- HTTP Request Body ----
DEBUG: log "Loaded Cookbook: ntpd"
DEBUG: ---- End HTTP Request Body ----
DEBUG: Chef::HTTP calling Chef::HTTP::ValidateContentLength#handle_response
DEBUG: Content-Length validated correctly.
DEBUG: Chef::HTTP calling Chef::HTTP::RemoteRequestID#handle_response
DEBUG: Chef::HTTP calling Chef::HTTP::Authenticator#handle_response
DEBUG: Chef::HTTP calling Chef::HTTP::Decompressor#handle_response
DEBUG: Chef::HTTP calling Chef::HTTP::CookieManager#handle_response
DEBUG: Chef::HTTP calling Chef::HTTP::JSONToModelOutput#handle_response
DEBUG: Expected JSON response, but got content-type ''
DEBUG: Chef::HTTP calling Chef::HTTP::JSONInput#handle_response
INFO: HTTP Request Returned 403 Forbidden:
ERROR: Failed to upload /home/vagrant/cookbooks/ntpd/recipes/default.rb (201ecd16d298cea2f353b0081b0da7c7) to https://chefserver1fe:443/bookshelf/organization-dbf375b2554cf22bc19ad8efa6ef240b/checksum-201ecd16d298cea2f353b0081b0da7c7?AWSAccessKeyId=b2c2f4132523d22c4520648c864c8d3ec156be25&Expires=1435397566&Signature=3fIfFbGrecRlTb6MsAxiR/UsycU%3D : 403 "Forbidden"
<?xml version="1.0" encoding="UTF-8"?><Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>g2gCZAATYm9va3NoZWxmQDEyNy4wLjAuMWgDYgAABZtiAAZS0GIACML9</RequestId><HostId></HostId></Error>
/opt/opscode/embedded/lib/ruby/2.1.0/net/http/response.rb:119:in `error!': 403 "Forbidden" (Net::HTTPServerException)
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.0.3/lib/chef/http.rb:145:in `request'
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.0.3/lib/chef/http.rb:118:in `put'
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.0.3/lib/chef/cookbook_uploader.rb:123:in `block in uploader_function_for'
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.0.3/lib/chef/util/threaded_job_queue.rb:52:in `call'
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.0.3/lib/chef/util/threaded_job_queue.rb:52:in `block (3 levels) in process'
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.0.3/lib/chef/util/threaded_job_queue.rb:50:in `loop'
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.0.3/lib/chef/util/threaded_job_queue.rb:50:in `block (2 levels) in process'
vagrant@vagrant:~$
Example Frontend nginx output
172.16.58.202 - - [27/Jun/2015:09:17:46 +0000] "GET /organizations/4thcoffee/cookbooks?num_versions=all HTTP/1.1" 200 "0.051" 137 "-" "Chef Knife/12.0.3 (ruby-2.1.4-p265; ohai-8.2.0; x86_64-linux; +http://opscode.com)" "127.0.0.1:8000" "200" "0.049" "12.0.3" "algorithm=sha1;version=1.0;" "stevedanno" "2015-06-27T09:17:46Z" "2jmj7l5rSw0yVb/vlWAYkK/YBwk=" 1025
172.16.58.202 - - [27/Jun/2015:09:17:46 +0000] "POST /organizations/4thcoffee/sandboxes HTTP/1.1" 201 "0.290" 828 "-" "Chef Knife/12.0.3 (ruby-2.1.4-p265; ohai-8.2.0; x86_64-linux; +http://opscode.com)" "127.0.0.1:8000" "201" "0.288" "12.0.3" "algorithm=sha1;version=1.0;" "stevedanno" "2015-06-27T09:17:46Z" "EVtq7olWKYgJ/pn7wpa573Qptog=" 1197
172.16.58.202 - - [27/Jun/2015:09:17:46 +0000] "PUT /bookshelf/organization-dbf375b2554cf22bc19ad8efa6ef240b/checksum-173e27c7eac4a6488529b7364f406725?AWSAccessKeyId=b2c2f4132523d22c4520648c864c8d3ec156be25&Expires=1435397566&Signature=By0B8S3KWK66skPPILiXvyeEIAI%3D HTTP/1.1" 403 "0.005" 206 "-" "Chef Knife/12.0.3 (ruby-2.1.4-p265; ohai-8.2.0; x86_64-linux; +http://opscode.com)" "172.16.58.210:4321" "403" "0.004" "12.0.3" "algorithm=sha1;version=1.0;" "stevedanno" "2015-06-27T09:17:46Z" "POCqKw6JdepfiE2IVh9n6S0aoLs=" 1547
172.16.58.202 - - [27/Jun/2015:09:17:46 +0000] "PUT /bookshelf/organization-dbf375b2554cf22bc19ad8efa6ef240b/checksum-201ecd16d298cea2f353b0081b0da7c7?AWSAccessKeyId=b2c2f4132523d22c4520648c864c8d3ec156be25&Expires=1435397566&Signature=3fIfFbGrecRlTb6MsAxiR/UsycU%3D HTTP/1.1" 403 "0.049" 206 "-" "Chef Knife/12.0.3 (ruby-2.1.4-p265; ohai-8.2.0; x86_64-linux; +http://opscode.com)" "172.16.58.210:4321" "403" "0.007" "12.0.3" "algorithm=sha1;version=1.0;" "stevedanno" "2015-06-27T09:17:46Z" "I5A9ZWRhsBTo68RAYz459cEVrRY=" 1311
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Bookshelf request path in src/bookshelf/src/bksw_xml.erl around lines 83-92 and src/bookshelf/src/bksw_sec.erl around line 12. Trace how the request timestamp could be handled between the frontend and backend, then define the error-log and cluster-shutdown behavior for clock differences in tiered or HA deployments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- erlang
- Domain
- backend, distributed-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100