Bug #12600
open
Name clash with foreman_deployments in production env
Added by Ondřej Pražák almost 9 years ago.
Updated almost 9 years ago.
Description
When foreman_deployments plugin is added to a Foreman instance with foreman_docker in a production environment, the server fails to start. There seems to be a name clash between these two plugins and foreman_docker controllers tend to look for class definitions in foreman_deployments' files, which results in undefined constant. Renaming controllers in question seems to resolve the issue.
Files
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman-docker/pull/128 added
I don't think this is a problem with the foreman_docker plugin, https://github.com/theforeman/foreman_deployments/blob/v0.0.1/lib/foreman_deployments/engine.rb#L7 looks incorrect to me. This will add every directory recursively to the autoload path, but it should only add the top level that's required.
This may cause app/lib/foreman_deployments/ to be added as a load path, but it should be only app/lib/. Rails might then expect "Registry" to be loaded rather than ForemanDeployments::Registry because it's relative to the wrong dir.
Also available in: Atom
PDF