Getting 500 from http://www.opscode.com/chef/download

Just noticed that when you go to http://www.opscode.com/chef/download it gives you an internal server error. This is causing the omnibus_updater cookbook to fail to determine the URL to use for downloading the chef artifact as it uses this url[1]

[1] - https://github.com/hw-cookbooks/omnibus_updater/blob/develop/libraries/omnitrucker.rb#L43

Yep, that’s a PR waiting to happen.

Any of the heavywater ops people can make a quick fix?

Come to think of it, looking at where the link is supposed to go, it maybe more than a quick fix.

I broke it… We are working to fix it right now. I will ping when it is fixed.

Looks fixed to me:
500s

The Omnitruck API has been fixed.

Thanks for the update! We're still seeing failures on other packages - like server.

No version specified, and no candidate version available for download-server?p=ubuntu&pv=12.04&m=x86_64&v=11.1.6&prerelease=false&nightlies=false

Can you find the URL that’s being used?

Yep, chef-server is broken. Fix incoming. Will update when it’s deployed

1 Like

Fixed.

We’re still seeing issues with the server-side of things.

Here’s the code that is executing: https://github.com/chef-cookbooks/chef-server/blob/chef11/recipes/default.rb#L21-L25
Which seems to use https://github.com/chef-cookbooks/chef-server/blob/chef11/libraries/omnitruck_client.rb#L38-L49

Here’s a couple of lines from my debug log:

[2015-12-15T01:43:32+00:00] INFO: Omnitruck download-server request: http://www.opscode.com/chef/download-server?p=ubuntu&pv=12.04&m=x86_64&v=11.1.6&prerelease=false&nightlies=false
[2015-12-15T01:43:32+00:00] INFO: Downloading chef-server package from: https://www.chef.io/chef/download-server?p=ubuntu&pv=12.04&m=x86_64&v=11.1.6&prerelease=false&nightlies=false

A curl command example of the original URL indicates that there are 3 calls that need to be made before it resolves the final package URL - is that expected to work with the single-step redirect_target method?

$ curl -IL "http://www.opscode.com/chef/download-server?p=ubuntu&pv=12.04&m=x86_64&v=11.1.6&prerelease=false&nightlies=false"
HTTP/1.1 302 Moved Temporarily
Content-Length: 169
Content-Type: text/html
Date: Tue, 15 Dec 2015 01:44:35 GMT
Location: https://www.chef.io/chef/download-server?p=ubuntu&pv=12.04&m=x86_64&v=11.1.6&prerelease=false&nightlies=false
Server: nginx/1.4.6 (Ubuntu)
Connection: keep-alive

HTTP/1.1 302 Found
Content-Type: text/html;charset=utf-8
Location: https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/12.04/x86_64/chef-server_11.1.6-1_amd64.deb
Server: nginx/1.4.6 (Ubuntu)
Status: 302 Found
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Content-Length: 0
Accept-Ranges: bytes
Date: Tue, 15 Dec 2015 01:44:35 GMT
Via: 1.1 varnish
Age: 0
Connection: keep-alive
X-Served-By: cache-iad2138-IAD
X-Cache: MISS
X-Cache-Hits: 0
Strict-Transport-Security: max-age= 7776000; includeSubDomains
X-Frame-Options: SAMEORIGIN

HTTP/1.1 200 OK
x-amz-id-2: m4USBfOnK/fJ/aBE79+7VDkQ7tbptmOoctOMfU3A5AtDu1v8xmvIkF8krGuDlT+uKd+7qOQuBaw=
x-amz-request-id: 8E2FE059034B2B8C
Date: Tue, 15 Dec 2015 01:44:37 GMT
Last-Modified: Fri, 17 Oct 2014 02:38:00 GMT
ETag: "d07cf230410b55bd8939ab29d65a3cc5"
Accept-Ranges: bytes
Content-Type: application/x-debian-package
Content-Length: 276814842
Server: AmazonS3

I’ll also note that I’m using chef-server cookbook version 2.1.6.

I realize this is dated and for Chef 11. My rationale is: we didn’t update to 3.0.0 because it was for Chef 12, a major version bump (scary!) and not 100% clear as to when we are going to upgrade.
the cookbook is already up to 4.1.0 - so we’ll likely go that route eventually.

But the redirecting logic is broken as of today, and that makes us sad.

If there’s anything we can help to continue debugging this, and get a fix in for us people running older things, please let me know.

I think I know what is up. I will go take a look.

Also, I am on IRC and the hangops slack org, so if you wanted to ping me there, that would rock.

I think that fixes it.

curl -v 'https://www.opscode.com/chef/download-server?p=ubuntu&pv=12.04&m=x86_64&v=11.1.6&prerelease=false&nightlies=false'
*   Trying 54.68.116.8...
* Connected to www.opscode.com (54.68.116.8) port 443 (#0)
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
* Server certificate: *.opscode.com
* Server certificate: DigiCert SHA2 Secure Server CA
* Server certificate: DigiCert Global Root CA
> GET /chef/download-server?p=ubuntu&pv=12.04&m=x86_64&v=11.1.6&prerelease=false&nightlies=false HTTP/1.1
> Host: www.opscode.com
> User-Agent: curl/7.43.0
> Accept: */*
>
< HTTP/1.1 302 Found
< Content-Type: text/html;charset=utf-8
< Date: Tue, 15 Dec 2015 02:38:20 GMT
< Location: https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/12.04/x86_64/chef-server_11.1.6-1_amd64.deb
< Server: nginx/1.4.6 (Ubuntu)
< Status: 302 Found
< X-Content-Type-Options: nosniff
< X-Frame-Options: SAMEORIGIN
< X-XSS-Protection: 1; mode=block
< Content-Length: 0
< Connection: keep-alive
<
* Connection #0 to host www.opscode.com left intact
1 Like

Confirmed working, thanks!