Project

General

Profile

Feature #2414

Remove Puppet from Foreman core

Added by Dominic Cleal over 9 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Normal
Category:
Puppet integration
Target version:
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

We need to complete removing the Puppet dependency from Foreman core, so all Puppet usage is in the smart proxy only. This will make it optional for people who don't use Puppet, plus avoid conflicts we've seen when loading Puppet as a library into the full Rails application (monkey patching).

Some tasks:

1. Reports need to be parsed in the report handler, then uploaded as JSON etc. (app/models/report.rb)
2. Fact uploads need to be hashes only, no Puppet::Node::Facts (app/models/host/managed.rb)
3. PuppetSetting checks the PUPPETVERSION constant (lib/puppet_setting.rb)


Related issues

Related to Foreman - Bug #2413: NoMethodError on Puppet 3.2 and Ruby 1.9.2Closed2013-04-19
Related to Foreman - Support #2435: Unable to authentication with LDAP server using ldapsClosed
Related to Foreman - Bug #2448: "vm is required for this operation" when viewing oVirt VMs with Puppet 3.2Resolved2013-05-01
Related to Foreman - Bug #2461: Cannot create a host without a puppet proxyClosed2013-05-06
Related to Foreman - Bug #3030: Facter isn't loaded, but is referenced in DB migrations etc.Closed2013-09-05
Related to Foreman - Bug #3236: prod2dev assumes all production tables exist in developmentNew2013-10-10

Associated revisions

Revision 01055e77 (diff)
Added by Greg Sutcliffe about 9 years ago

Refs #2414 - Remove Puppet from facts API and Settings

Reports are still in progress and will come in a later PR
DB schema is updated to not need puppet/rails

Revision 91ad276d (diff)
Added by Greg Sutcliffe about 9 years ago

Fixes #2414 - Move puppet report processing code to the report processor

This creates a API route for POST:/api/reports which matches the GET
format for reports. Tests are updated, with the report model tests
moving to the puppet-foreman module (along with the report fixtures).

History

#1 Updated by Dominic Cleal over 9 years ago

  • Assignee deleted (Ohad Levy)

Related is that we use Facter too in lib/foreman/default_settings/loader.rb and lib/tasks/reset_permissions.rake to get the current domain and Puppet version again, plus in DB migrations.

#2 Updated by Greg Sutcliffe over 9 years ago

I can take it out of the settings in my plugin-settings PR if needed - it's only used to get the domain, I can add a fallback to shell out to `dnsdomainname` if Facter can't be loaded. Same can probably be done in the permissions.

#3 Updated by Dominic Cleal over 9 years ago

Greg Sutcliffe wrote:

I can take it out of the settings in my plugin-settings PR if needed - it's only used to get the domain, I can add a fallback to shell out to `dnsdomainname` if Facter can't be loaded. Same can probably be done in the permissions.

I wouldn't worry for now, since we have the same use case in the settings loader. When we solve it there we can update both. Facter's less of a problem anyway, maybe it's even a reasonable dependency.

#4 Updated by Dominic Cleal over 9 years ago

Puppet #20136 was another issue introduced by monkey patches distributed by Puppet.

(I'm linking other issues introduced by Puppet's patches to this issue as a tracker.)

#5 Updated by Dominic Cleal over 9 years ago

  • Target version set to 1.3.0

#6 Updated by Dominic Cleal about 9 years ago

  • Description updated (diff)
  • Status changed from New to Ready For Testing
  • Assignee set to Greg Sutcliffe

#7 Updated by Dominic Cleal about 9 years ago

  • % Done changed from 0 to 50

#8 Updated by Greg Sutcliffe about 9 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 50 to 100

#9 Updated by Dominic Cleal about 9 years ago

  • Related to Bug #3030: Facter isn't loaded, but is referenced in DB migrations etc. added

#10 Updated by Dominic Cleal almost 9 years ago

  • Related to Bug #3236: prod2dev assumes all production tables exist in development added

Also available in: Atom PDF