Project

General

Profile

Bug #11999

Foreman Puppet Class Import for Specific Environment Failing Due to Malformed Environment Name in API Query

Added by Andrew Wagner about 6 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Puppet integration
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

I just noticed in Foreman 1.9.2 that trying to import Puppet classes for a specific Foreman environment (as opposed to importing all environments/classes) no longer works. When I attempt to import a specific environment's classes to implement new changes, the request 404's in the foreman-proxy log:

[29/Sep/2015 16:26:56] "GET /environments/15-tc/classes HTTP/1.1" 404 9 0.4811

If I click the button to import all environments/classes from the server, the proxy log records the following command that completes successfully:

 [29/Sep/2015 16:40:06] "GET /environments/tc/classes HTTP/1.1" 200 20796 0.4805

Somewhere along the line it appears that the API request got changed for one of these actions but not the other. I verified this by polling the foreman-proxy from the command line via curl. The environment name that does not contain the environment ID completes the curl and returns the classes successfully.


Related issues

Related to Foreman - Bug #11037: Puppet class importer crashes with ruby stack trace trying to import an environment named: newClosed2015-07-07

Associated revisions

Revision eb8d0ff5 (diff)
Added by Shlomi Zadok almost 6 years ago

Fixes #12004, #11999 - Remove reserved words from Environment friendly_id

Restores use of friendly_id, but removes 'new', 'edit' etc from the
reserved words list to ensure they can be used as identifiers.

Reverts the id-name parameterization to purely name, which fixes
related bugs that caused the parameter value to be used as a Puppet
environment name in class imports, rather than the resource name.

Revision 30ef8b6f (diff)
Added by Shlomi Zadok almost 6 years ago

Fixes #12004, #11999 - Remove reserved words from Environment friendly_id

Restores use of friendly_id, but removes 'new', 'edit' etc from the
reserved words list to ensure they can be used as identifiers.

Reverts the id-name parameterization to purely name, which fixes
related bugs that caused the parameter value to be used as a Puppet
environment name in class imports, rather than the resource name.

(cherry picked from commit eb8d0ff5fc76002f568bbb94eced10ca6b8b36a9)

Revision 879346fd (diff)
Added by Shlomi Zadok almost 6 years ago

Fixes #12004, #11999 - Remove reserved words from Environment friendly_id

Restores use of friendly_id, but removes 'new', 'edit' etc from the
reserved words list to ensure they can be used as identifiers.

Reverts the id-name parameterization to purely name, which fixes
related bugs that caused the parameter value to be used as a Puppet
environment name in class imports, rather than the resource name.

(cherry picked from commit eb8d0ff5fc76002f568bbb94eced10ca6b8b36a9)

History

#1 Updated by Dominic Cleal about 6 years ago

  • Related to Bug #11037: Puppet class importer crashes with ruby stack trace trying to import an environment named: new added

#2 Updated by Dominic Cleal about 6 years ago

  • Legacy Backlogs Release (now unused) set to 91

#3 Updated by Shlomi Zadok about 6 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/2800 added
  • Pull request deleted ()

#4 Updated by Shlomi Zadok almost 6 years ago

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

Also available in: Atom PDF