Problem:
I have a problem setting up a new foreman-server.
I created a test-system before in which
foreman-rake -- config -k 'trusted_hosts' -v '<puppetmaster-0, puppetmaster-1'
NoMethodError: undefined method `all?' for #<String:0x000000001020c258>
/usr/share/foreman/app/validators/array_hostnames_ips_validator.rb:4:in `validate_each'
/opt/theforeman/tfm/root/usr/share/gems/gems/activemodel-6.0.4.7/lib/active_model/validator.rb:152:in `block in validate'
/opt/theforeman/tfm/root/usr/share/gems/gems/activemodel-6.0.4.7/lib/active_model/validator.rb:149:in `each'
/opt/theforeman/tfm/root/usr/share/gems/gems/activemodel-6.0.4.7/lib/active_model/validator.rb:149:in `validate'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.4.7/lib/active_support/callbacks.rb:428:in `block in make_lambda'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.4.7/lib/active_support/callbacks.rb:181:in `block (2 levels) in halting_and_conditional'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.4.7/lib/active_support/callbacks.rb:605:in `block (2 levels) in default_terminator'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.4.7/lib/active_support/callbacks.rb:604:in `catch'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.4.7/lib/active_support/callbacks.rb:604:in `block in default_terminator'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.4.7/lib/active_support/callbacks.rb:182:in `block in halting_and_conditional'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.4.7/lib/active_support/callbacks.rb:513:in `block in invoke_before'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.4.7/lib/active_support/callbacks.rb:513:in `each'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.4.7/lib/active_support/callbacks.rb:513:in `invoke_before'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.4.7/lib/active_support/callbacks.rb:134:in `run_callbacks'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.4.7/lib/active_support/callbacks.rb:825:in `_run_validate_callbacks'
/opt/theforeman/tfm/root/usr/share/gems/gems/activemodel-6.0.4.7/lib/active_model/validations.rb:406:in `run_validations!'
/opt/theforeman/tfm/root/usr/share/gems/gems/activemodel-6.0.4.7/lib/active_model/validations/callbacks.rb:117:in `block in run_validations!'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.4.7/lib/active_support/callbacks.rb:135:in `run_callbacks'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.4.7/lib/active_support/callbacks.rb:825:in `_run_validation_callbacks'
/opt/theforeman/tfm/root/usr/share/gems/gems/activemodel-6.0.4.7/lib/active_model/validations/callbacks.rb:117:in `run_validations!'
/opt/theforeman/tfm/root/usr/share/gems/gems/activemodel-6.0.4.7/lib/active_model/validations.rb:337:in `valid?'
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.4.7/lib/active_record/validations.rb:68:in `valid?'
/usr/share/foreman/lib/tasks/config.rake:148:in `validate_and_save'
/usr/share/foreman/lib/tasks/config.rake:111:in `block in run_key_values'
/usr/share/foreman/lib/tasks/config.rake:100:in `each'
/usr/share/foreman/lib/tasks/config.rake:100:in `run_key_values'
/usr/share/foreman/lib/tasks/config.rake:77:in `run'
/usr/share/foreman/lib/tasks/config.rake:167:in `block in <top (required)>'
/opt/rh/rh-ruby27/root/usr/share/gems/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
Tasks: TOP => config
(See full trace by running task with --trace)
afterwards i tried also to execute following:
foreman-rake -- config -k 'update_environment_from_facts' -v true
ERROR: Invalid value true for update_environment_from_facts - ["Value is not included in the list"]
foreman-rake -- config -k 'enc_environment'
true
foreman-rake -- config -k 'enc_environment' -v false
ERROR: Invalid value false for enc_environment - ["Value is not included in the list"]
[root@foreman-000000 ~]# foreman-rake -- config -k 'enc_environment'
true
Expected outcome:
puppetmaster is added to trusted hosts in DB and enc_environment / update_environment_from_facts can changed values
Foreman and Proxy versions:
tfm-rubygem-hammer_cli_foreman-3.3.0-1.el7.noarch
tfm-rubygem-foreman_host_extra_validator-0.1.0-5.fm3_3.el7.noarch
foreman-selinux-3.3.1-1.el7.noarch
foreman-3.3.1-1.el7.noarch
foreman-proxy-3.3.1-1.el7.noarch
foreman-cli-3.3.1-1.el7.noarch
tfm-rubygem-hammer_cli_foreman_remote_execution-0.2.2-1.fm3_0.el7.noarch
tfm-rubygem-foreman_puppet-4.0.4-1.fm3_3.el7.noarch
tfm-rubygem-foreman_salt-15.1.0-3.fm3_3.el7.noarch
foreman-release-3.3.1-1.el7.noarch
foreman-debug-3.3.1-1.el7.noarch
foreman-postgresql-3.3.1-1.el7.noarch
tfm-rubygem-hammer_cli_foreman_azure_rm-0.2.2-1.fm3_1.el7.noarch
tfm-rubygem-hammer_cli_foreman_templates-0.2.0-2.fm2_5.el7.noarch
tfm-rubygem-foreman_azure_rm-2.2.7-1.fm3_3.el7.noarch
foreman-dynflow-sidekiq-3.3.1-1.el7.noarch
tfm-rubygem-hammer_cli_foreman_puppet-0.0.6-1.fm3_3.el7.noarch
tfm-rubygem-foreman_discovery-21.0.5-1.fm3_3.el7.noarch
tfm-rubygem-foreman_expire_hosts-7.0.4-4.fm3_3.el7.noarch
tfm-rubygem-foreman-tasks-6.0.2-1.fm3_3.el7.noarch
foreman-service-3.3.1-1.el7.noarch
tfm-rubygem-hammer_cli_foreman_tasks-0.0.17-1.fm3_2.el7.noarch
tfm-rubygem-foreman_remote_execution-7.2.2-1.fm3_3.el7.noarch
tfm-rubygem-foreman_templates-9.3.0-1.fm3_3.el7.noarch
foreman-installer-3.3.1-2.el7.noarch
Distribution and version:
CentOS Linux release 7.9.2009 (Core)