Project

General

Profile

Actions

Bug #21985

open

Getting "can't modify frozen String" when importing environments with ignored_environments.yml set up

Added by Torsten Roloff almost 7 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

I have set up /usr/share/foreman/config/ignored_environments.yml to ignore most classes on import.

# https://www.theforeman.org/manuals/1.16/index.html#4.2.2Classes
:filters:
  - !ruby/regexp '/^(?!roles::)/'

On first run, or if there are changes, everything works as expected. The table with selectable and ignored classes is shown.

On second run, when there are no changes, an error message is returned:

Bitte entschuldigen Sie, etwas ist schief gelaufen (Sorry something went wrong) can't modify frozen String

Log shows:

RuntimeError
can't modify frozen String
/usr/share/foreman/app/controllers/concerns/foreman/controller/environments.rb:59:in `list_ignored'
/usr/share/foreman/app/controllers/concerns/foreman/controller/environments.rb:32:in `import_environments'
/usr/share/foreman/vendor/ruby/2.1.0/gems/actionpack-4.2.8/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/usr/share/foreman/vendor/ruby/2.1.0/gems/actionpack-4.2.8/lib/abstract_controller/base.rb:198:in `process_action'
/usr/share/foreman/vendor/ruby/2.1.0/gems/actionpack-4.2.8/lib/action_controller/metal/rendering.rb:10:in `process_action'
/usr/share/foreman/vendor/ruby/2.1.0/gems/actionpack-4.2.8/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:117:in `call'
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:117:in `call'

It would be nice to have a list of "ignored" classes instead of the error.

No data to display

Actions

Also available in: Atom PDF