Open Source Chef Server 11 Upgrade to Chef Server 12 and Reporting 404

Sean Horn -

An Open Source Chef Server 11 system upgraded to Chef Server 12 with the Reporting add-on will not work properly with chef-client nodes that were running against the open source Chef Server 11 instance.

The reason stems from the `default_orgname` setting found in /etc/chef/client.rb on these older chef-client nodes. See https://docs.chef.io/upgrade_server_open_source_notes.html#organization-names for more detail about the `default_orgname` setting.

Problem:

chef-client nodes with `default_orgname` configured will try to generate and submit run (Reporting) reports against the Chef Server, but those attempts will result in a 404 like this in the opscode-erchef logs on the chef server.

    2016-04-11T21:51:24Z oc_reporting@127.0.0.1 method=POST; path=/reports/nodes/testing/runs; status=404;

Notice anything strange there? Neither did we for a moment, but later, it became clear that the path shown is missing "/organizations/ORGNAME" in the beginning. This leads to a 404 on a Chef Server 12.x instance, because all chef-clients belong to one org or another at the 12.x version of the server code.

Solution:

Please remove `default_orgname` from the /etc/chef/client.rb on all of your managed systems and configure /etc/chef/client.rb to contain the `chef_server_url` that it should have, which will look something like this, where CHEF_SERVER_NAME and ORGNAME are the specific names in your setup.

    chef_server_url "https://CHEF_SERVER_NAME/organizations/ORGNAME"

You can test that the chef-client still runs appropriately with this setting. If you have to, you can always fallback to the `default_orgname` setting from `chef_server_url` if something seems to have gone wrong.

Have more questions? Submit a request

Comments

Powered by Zendesk