Bug #9052


Foreman/foreman-proxy don't report classes skipped due to syntax error during import from Puppet.

Added by Shaun Martin over 9 years ago. Updated over 9 years ago.

Target version:
Fixed in Releases:
Found in Releases:


Neither foreman-proxy nor Foreman report on classes skipped during imports from Puppet. For example, this is the proxy.log from an Import operation where a new class added but contains syntax errors: - - [20/Jan/2015 09:32:15] "GET /puppet/environments HTTP/1.1" 200 14 0.1917 - - [20/Jan/2015 09:32:16] "GET /puppet/environments/production/classes HTTP/1.1" 200 16616 1.1230

And this is the same operation from Foreman's production.log:
Started GET "/puppetclasses/import_environments?proxy=1-foreman" for *snip* at 2015-01-20 09:32:15 -0800
Processing by PuppetclassesController#import_environments as HTML
  Parameters: {"proxy"=>"1-foreman"}
  Rendered common/_puppetclasses_or_envs_changed.html.erb within layouts/application (3.7ms)
  Rendered home/_user_dropdown.html.erb (1.6ms)
Read fragment views/tabs_and_title_records-3 0.1ms
  Rendered home/_topbar.html.erb (2.4ms)
  Rendered layouts/base.html.erb (3.9ms)
Completed 200 OK in 1949.9ms (Views: 9.2ms | ActiveRecord: 40.1ms)
Started POST "/puppetclasses/obsolete_and_new" for at 2015-01-20 09:32:19 -0800
Processing by PuppetclassesController#obsolete_and_new as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"*snip*", "changed"=>{"updated"=>{"production"=>"{\"essentials::hosts\":{\"obsolete\":[\"moo\"]}}"}}, "commit"=>"Update"}
Redirected to

Please note that the "obsolete" class was one I created and deleted during testing. Foreman now reports that this class was removed during every import, despite the fact that was removed several import ago. It's irrelevant to this bug report.

I feel like this this operation should have either imported the new class in spite of its errors or else returned an error message. "200 OK" and a success message box reading "no changes detected" are not appropriate in this situation.

Related issues 1 (1 open0 closed)

Is duplicate of Foreman - Bug #3900: Class removed because invalid syntax validationNew12/17/2013Actions
Actions #1

Updated by Dominic Cleal over 9 years ago

  • Is duplicate of Bug #3900: Class removed because invalid syntax validation added
Actions #2

Updated by Dominic Cleal over 9 years ago

  • Status changed from New to Duplicate

Thanks for the report, we're tracking this under #3900 + linked bug. I'd like to see the errors reported back to the UI at least.


Also available in: Atom PDF