Feature #3186
openImprove puppet class importer error reporting, and allow environment specific overrides
Description
When importing classes, if any of the environments have an issue, foreman throws a stack track that's pretty generic:
RestClient::NotAcceptable
406 Not Acceptable
lib/proxy_api/resource.rb:68:in `get'
lib/proxy_api/puppet.rb:18:in `classes'
app/models/puppet_class_importer.rb:143:in `actual_classes'
app/models/puppet_class_importer.rb:66:in `new_classes_for'
app/models/puppet_class_importer.rb:22:in `changes'
app/models/puppet_class_importer.rb:21:in `each'
app/models/puppet_class_importer.rb:21:in `changes'
lib/foreman/controller/environments.rb:9:in `import_environments'
lib/foreman/thread_session.rb:31:in `clear_thread'
It would be useful to know which environment(s) threw the error and allow an override, if one still wants to continue with import for other environments.
Here is an example of the smart-proxy debug log:
puppet.mydomain.com - - [02/Oct/2013:17:29:09 EDT] "GET /puppet/environments HTTP/1.1" 200 48
- > /puppet/environments
puppet.mydomain.com - - [02/Oct/2013:17:29:09 EDT] "GET /puppet/environments/dev/classes HTTP/1.1" 200 29455> /puppet/environments/dev/classes
puppet.mydomain.com - - [02/Oct/2013:17:29:18 EDT] "GET /puppet/environments/prod/classes HTTP/1.1" 200 2> /puppet/environments/prod/classes -> /puppet/environments/test/classes
puppet.mydomain.com - - [02/Oct/2013:17:29:18 EDT] "GET /puppet/environments/test/classes HTTP/1.1" 406 127
In this case the test environment was broken.. was we couldn't import classes in other envs.
No data to display