Foreman 3.5.1 - #34366 Regression / Symptoms

Problem:
Installing Foreman 3.5.1 on a EL8 host from scratch. stripping the installer down to a minimal set of options, the installer errors complaining about missing ansible roles, very similar if not the same as Foreman issue #34366 (and a thread discussing it here) Enabling ansible plugin results in failure of db:migrate A fix was merged into 3.1 which seems valid, the fix is still present in 3.5.1, but it appears the logic has been moved to another file, the logic is still valid, but my assumption is that something is not honouring this check and creating the same problem as 3.5.1

Expected outcome:
Foreman 3.5.1 installs a new clean Foreman instance

Foreman and Proxy versions:
Foreman 3.5.1 - not installed

Foreman and Proxy plugin versions:
Plugins not installed but the installer options passed in are:

–enable-foreman
–enable-foreman-cli
–enable-puppet
–enable-foreman-plugin-dhcp-browser
–enable-foreman-plugin-git-templates
–enable-foreman-plugin-puppet
–enable-foreman-compute-libvirt
–enable-foreman-plugin-templates
–enable-foreman-proxy-plugin-dhcp-remote-isc
–foreman-server-ssl-cert=/etc/pki/tls/certs/star.no-dns.co.uk.crt
–foreman-server-ssl-chain=/etc/pki/tls/certs/gs_ca_bundle.crt
–foreman-server-ssl-key=/etc/pki/tls/private/star.no-dns.co.uk.key
–foreman-websockets-ssl-cert=/etc/pki/tls/certs/star.no-dns.co.uk.crt
–foreman-websockets-ssl-key=/etc/pki/tls/private/star.no-dns.co.uk.key
–foreman-db-manage=true
--foreman-email-reply-address=foreman-admin@no-dns.co.uk
–foreman-email-smtp-address=mail.no-dns.co.uk
–foreman-email-delivery-method=smtp
–foreman-email-smtp-port=25
–foreman-email-subject-prefix=“Foreman NO-DNS”
–foreman-initial-admin-first-name=“no-dns”
–foreman-initial-admin-last-name=“foreman admin”
–foreman-proxy-dhcp=true
–foreman-proxy-dhcp-key-name=“no-dns-dhcp-key”
–foreman-proxy-dhcp-managed=false
–foreman-proxy-dhcp-nameservers=10.11.216.1
–foreman-proxy-dhcp-netmask=255.255.255.0
–foreman-proxy-dhcp-pxeserver=10.11.216.4
–foreman-proxy-dhcp-range=“10.11.216.30 10.11.216.254”
–foreman-proxy-dhcp-search-domains=no-dns.co.uk
–foreman-proxy-dhcp-subnets=“10.11.216.30 10.11.216.254”
–foreman-proxy-dhcp-gateway=10.11.216.1
–foreman-proxy-dns-zone=no-dns.co.uk
–foreman-proxy-dns-server=10.11.216.1
–foreman-proxy-dhcp-provider=isc
–foreman-proxy-dhcp-pxeserver=10.11.216.4
–foreman-proxy-dhcp-range=“10.11.216.30 10.11.216.254”
–foreman-proxy-dhcp-search-domains=no-dns.co.uk
–foreman-proxy-dns=true
–foreman-proxy-dns-managed=false
–foreman-proxy-dns-zone=no-dns.co.uk
–foreman-proxy-dns-provider=nsupdate
–foreman-proxy-dns-reverse=216.11.10.in-addr.arpa \

Distribution and version:
CentOS 8 Stream
ruby 2.7.6p219 (2022-04-12 revision c9c2245c0a) [x86_64-linux]

Other relevant data:
console output for the installer failure - these logs are truncated due to initial post size the full logs are in the second post - these just show the purdent error and debug

2023-01-09 18:40:52 [NOTICE] [root] Loading installer configuration. This will take some time.
2023-01-09 18:40:56 [NOTICE] [root] Running installer with log based terminal output at level NOTICE.
2023-01-09 18:40:56 [NOTICE] [root] Use -l to set the terminal output log level to ERROR, WARN, NOTICE, INFO, or DEBUG. See --full-help for definitions.
2023-01-09 18:41:02 [NOTICE] [configure] Starting system configuration.
2023-01-09 18:41:11 [NOTICE] [configure] 250 configuration steps out of 1412 steps complete.
2023-01-09 18:41:11 [NOTICE] [configure] 500 configuration steps out of 1415 steps complete.
2023-01-09 18:41:12 [NOTICE] [configure] 750 configuration steps out of 1421 steps complete.
2023-01-09 18:42:04 [ERROR ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]: Failed to call refresh: '/usr/sbin/foreman-rake db:seed' returned 1 instead of one of [0]
2023-01-09 18:42:04 [ERROR ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]: '/usr/sbin/foreman-rake db:seed' returned 1 instead of one of [0]
2023-01-09 18:42:04 [NOTICE] [configure] 1000 configuration steps out of 1421 steps complete.
2023-01-09 18:42:04 [NOTICE] [configure] 1250 configuration steps out of 1421 steps complete.
2023-01-09 18:42:06 [NOTICE] [configure] System configuration has finished.

  There were errors detected during install.
  Please address the errors and re-run the installer to ensure the system is properly configured.
  Failing to do so is likely to result in broken functionality.
2023-01-09 18:41:12 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]: Starting to evaluate the resource (885 of 1421)
2023-01-09 18:41:12 [DEBUG ] [configure] Exec[foreman-rake-db:migrate](provider=posix): Executing check '/usr/sbin/foreman-rake db:abort_if_pending_migrations'
2023-01-09 18:41:12 [DEBUG ] [configure] Executing with uid=foreman: '/usr/sbin/foreman-rake db:abort_if_pending_migrations'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: rake aborted!
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: ActiveRecord::StatementInvalid: PG::UndefinedTable: ERROR:  relation "ansible_roles" does not exist
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: LINE 8:  WHERE a.attrelid = '"ansible_roles"'::regclass
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless:                             ^
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activerecord-6.1.7/lib/active_record/model_schema.rb:392:in `columns_hash'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/foreman/app/services/graphql_attribute.rb:15:in `required?'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/foreman/app/graphql/types/base_object.rb:55:in `nullable?'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/foreman/app/graphql/types/base_object.rb:9:in `field'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/foreman_ansible-10.1.0/app/graphql/types/ansible_role.rb:8:in `<class:AnsibleRole>'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/foreman_ansible-10.1.0/app/graphql/types/ansible_role.rb:2:in `<module:Types>'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/foreman_ansible-10.1.0/app/graphql/types/ansible_role.rb:1:in `<top (required)>'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:332:in `block in require'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:299:in `load_dependency'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:332:in `require'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:39:in `load_interlock'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:402:in `require_or_load'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:558:in `load_missing_constant'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/foreman_hooks-0.3.17/lib/foreman_hooks/as_dependencies_hook.rb:4:in `load_missing_constant'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:213:in `const_missing'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/foreman_ansible-10.1.0/app/graphql/types/inherited_ansible_role.rb:2:in `<module:Types>'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/foreman_ansible-10.1.0/app/graphql/types/inherited_ansible_role.rb:1:in `<top (required)>'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:332:in `block in require'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:299:in `load_dependency'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:332:in `require'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: Caused by:
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: PG::UndefinedTable: ERROR:  relation "ansible_roles" does not exist
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: LINE 8:  WHERE a.attrelid = '"ansible_roles"'::regclass
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless:                             ^
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activerecord-6.1.7/lib/active_record/connection_adapters/postgresql/database_statements.rb:19:in `exec'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activerecord-6.1.7/lib/active_record/connection_adapters/postgresql/database_statements.rb:19:in `block (2 levels) in query'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activerecord-6.1.7/lib/active_record/connection_adapters/postgresql/database_statements.rb:18:in `block in query'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activerecord-6.1.7/lib/active_record/connection_adapters/abstract_adapter.rb:696:in `block (2 levels) in log'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/foreman/app/services/graphql_attribute.rb:15:in `required?'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/foreman/app/graphql/types/base_object.rb:55:in `nullable?'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/foreman/app/graphql/types/base_object.rb:9:in `field'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/foreman_ansible-10.1.0/app/graphql/types/ansible_role.rb:8:in `<class:AnsibleRole>'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/foreman_ansible-10.1.0/app/graphql/types/ansible_role.rb:2:in `<module:Types>'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/foreman_ansible-10.1.0/app/graphql/types/ansible_role.rb:1:in `<top (required)>'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:332:in `block in require'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:299:in `load_dependency'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:332:in `require'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:424:in `block in require_or_load'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:39:in `block in load_interlock'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/dependencies/interlock.rb:14:in `block in loading'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/concurrency/share_lock.rb:151:in `exclusive'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/dependencies/interlock.rb:13:in `loading'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:39:in `load_interlock'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:402:in `require_or_load'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:558:in `load_missing_constant'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/foreman_hooks-0.3.17/lib/foreman_hooks/as_dependencies_hook.rb:4:in `load_missing_constant'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:213:in `const_missing'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/foreman_ansible-10.1.0/app/graphql/types/inherited_ansible_role.rb:2:in `<module:Types>'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/foreman_ansible-10.1.0/app/graphql/types/inherited_ansible_role.rb:1:in `<top (required)>'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:332:in `block in require'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:299:in `load_dependency'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:332:in `require'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/railties-6.1.7/lib/rails/application.rb:367:in `require_environment!'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/railties-6.1.7/lib/rails/application.rb:533:in `block in run_tasks_blocks'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: Tasks: TOP => db:abort_if_pending_migrations => db:load_config => environment
2023-01-09 18:41:17 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: (See full trace by running task with --trace)
2023-01-09 18:41:17 [DEBUG ] [configure] Exec[foreman-rake-db:migrate](provider=posix): Executing '/usr/sbin/foreman-rake db:migrate'
2023-01-09 18:41:17 [DEBUG ] [configure] Executing with uid=foreman: '/usr/sbin/foreman-rake db:migrate'
2023-01-09 18:41:36 [INFO  ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: executed successfully
2023-01-09 18:41:36 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]: The container Foreman::Rake[db:migrate] will propagate my refresh event
2023-01-09 18:41:36 [DEBUG ] [configure] Exec[foreman-rake-db:migrate](provider=posix): Executing check '/usr/sbin/foreman-rake db:abort_if_pending_migrations'
2023-01-09 18:41:36 [DEBUG ] [configure] Executing with uid=foreman: '/usr/sbin/foreman-rake db:abort_if_pending_migrations'
2023-01-09 18:41:42 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: rake aborted!
2023-01-09 18:41:42 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: ActiveModel::UnknownAttributeError: unknown attribute 'description' for Setting::DefaultHostgroup.
2023-01-09 18:41:42 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activemodel-6.1.7/lib/active_model/attribute_assignment.rb:51:in `_assign_attribute'
2023-01-09 18:41:42 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activerecord-6.1.7/lib/active_record/attribute_assignment.rb:21:in `block in _assign_attributes'
2023-01-09 18:41:42 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activerecord-6.1.7/lib/active_record/attribute_assignment.rb:13:in `each'
2023-01-09 18:41:42 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activerecord-6.1.7/lib/active_record/attribute_assignment.rb:13:in `_assign_attributes'
2023-01-09 18:41:42 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activemodel-6.1.7/lib/active_model/attribute_assignment.rb:34:in `assign_attributes'
2023-01-09 18:41:42 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activerecord-6.1.7/lib/active_record/core.rb:518:in `initialize'
2023-01-09 18:41:42 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activerecord-6.1.7/lib/active_record/inheritance.rb:72:in `new'
2023-01-09 18:41:42 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activerecord-6.1.7/lib/active_record/inheritance.rb:72:in `new'
2023-01-09 18:41:42 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activerecord-6.1.7/lib/active_record/persistence.rb:37:in `create'
2023-01-09 18:41:42 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/foreman_default_hostgroup-6.0.0/app/models/setting/default_hostgroup.rb:16:in `block (2 levels) in load_defaults'
2023-01-09 18:41:42 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/foreman_default_hostgroup-6.0.0/app/models/setting/default_hostgroup.rb:16:in `each'
2023-01-09 18:41:42 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/foreman_default_hostgroup-6.0.0/app/models/setting/default_hostgroup.rb:16:in `block in load_defaults'
2023-01-09 18:41:42 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activerecord-6.1.7/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `block in transaction'
2023-01-09 18:41:42 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activerecord-6.1.7/lib/active_record/connection_adapters/abstract/transaction.rb:319:in `block in within_new_transaction'
2023-01-09 18:41:42 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
2023-01-09 18:41:42 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
2023-01-09 18:41:42 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
2023-01-09 18:41:42 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
2023-01-09 18:41:42 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
2023-01-09 18:41:42 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activerecord-6.1.7/lib/active_record/connection_adapters/abstract/transaction.rb:317:in `within_new_transaction'
2023-01-09 18:41:42 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activerecord-6.1.7/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `transaction'
2023-01-09 18:41:42 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/railties-6.1.7/lib/rails/application.rb:533:in `block in run_tasks_blocks'
2023-01-09 18:41:42 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
2023-01-09 18:41:42 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: Tasks: TOP => db:abort_if_pending_migrations => db:load_config => environment
2023-01-09 18:41:42 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: (See full trace by running task with --trace)
2023-01-09 18:41:42 [DEBUG ] [configure] Exec[foreman-rake-db:migrate](provider=posix): Executing '/usr/sbin/foreman-rake db:migrate'

The bug #36366 Fixes #34366 - skip GraphQL types enhancements in migrations by ezr-ondrej · Pull Request #9080 · theforeman/foreman · GitHub

has a codeblock that is in config/application.rb this codeblock no-longer exists in application.rb and appears to have been moved to /usr/share/foreman/config/initializers/foreman.rb and the code block looks to be in place and is part of a loop that checks the plugins for initial installer similar to the old fix - I’m not sure if this is still being honoured properly by all plugins.

The other interesting thing to note is the error on defaulthostgroup I’m not sure why that is happening.

I’m exceeding the message body with the log size, and the file upload functionality is not working, I’ll find a way to get the full logs available to this post for reference, the logs are saved.

This comes from a foreman-default_hostgoup installation without the following patch: migrate to Settings DSL (#52) · theforeman/foreman_default_hostgroup@cbf79fe · GitHub

You do not list that plugin in the list above, but it still seems somehow present in your system (or the database).

1 Like

Just to be sure: you do know that you cannot simply remove options from foreman-installer if you have used it in a run before? All options are remembered, e.g. if you only run foreman-installer after you ran foreman-installer with options before, it’ll run with all the remembered options.

Thus if you omit an option you have used before, that option is still active. You’ll have to reset the option to get the default or change the option to a different value… Omitting an option doesn’t mean it’s automatically back to default.

yup - clean database (dropped before each installer run) and answers yaml file deleted before each run

thanks for the feedback on the patch too, I’ll watch for this to be dropped into an upcoming release.

even using the --reset-foreman-plugin-default-hostgroup-hostgroups option as part of the installer, it still creates the error, so that’s with no answer file, and the reset parameter passed in and the database dropped so the installer can re-create it.

023-01-10 09:01:56 [DEBUG ] [configure] Exec[foreman-rake-db:migrate](provider=posix): Executing '/usr/sbin/foreman-rake db:migrate'
2023-01-10 09:01:56 [DEBUG ] [configure] Executing with uid=foreman: '/usr/sbin/foreman-rake db:migrate'
2023-01-10 09:02:15 [INFO  ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: executed successfully
2023-01-10 09:02:15 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]: The container Foreman::Rake[db:migrate] will propagate my refresh event
2023-01-10 09:02:15 [DEBUG ] [configure] Exec[foreman-rake-db:migrate](provider=posix): Executing check '/usr/sbin/foreman-rake db:abort_if_pending_migrations'
2023-01-10 09:02:15 [DEBUG ] [configure] Executing with uid=foreman: '/usr/sbin/foreman-rake db:abort_if_pending_migrations'
2023-01-10 09:02:21 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: rake aborted!
2023-01-10 09:02:21 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: ActiveModel::UnknownAttributeError: unknown attribute 'description' for Setting::DefaultHostgroup.

That is still not the same: foreman-installer installs a variety of packages, too, which again drop in configuration files for foreman and makes changes to lots of configuration files.

You have to reinstall the server or use snapshots to revert to the initial state to really get comparable output…

I’ll rebuild the test box again then, that seems pretty bad that you can’t change an option with confidence without rebuilding the server.

I’ve released default_hostgroup 7.0.0 and pushed it to the 3.4 and 3.5 repos, so at least that part of the issue should be gone.

1 Like

I’ll do a clean build as suggested without defaulthostgroup and make sure that runs, then I’ll include default hostgroup and test the update you’ve just reached.

thanks a lot

interesting, clean build gets passed defaulthostgroup now (looks like there was a lingering config file somewhere) and now does the same error on the GitTemplates options

I’ll strip it down more and rebuild again. Feels like there needs to be more test coverage for the plugins ? (not a critique)

2023-01-10 09:16:01 [DEBUG ] [configure] Exec[foreman-rake-db:migrate](provider=posix): Executing '/usr/sbin/foreman-rake db:migrate'
2023-01-10 09:16:01 [DEBUG ] [configure] Executing with uid=foreman: '/usr/sbin/foreman-rake db:migrate'
2023-01-10 09:16:15 [INFO  ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: executed successfully
2023-01-10 09:16:15 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]: The container Foreman::Rake[db:migrate] will propagate my refresh event
2023-01-10 09:16:15 [DEBUG ] [configure] Exec[foreman-rake-db:migrate](provider=posix): Executing check '/usr/sbin/foreman-rake db:abort_if_pending_migrations'
2023-01-10 09:16:15 [DEBUG ] [configure] Executing with uid=foreman: '/usr/sbin/foreman-rake db:abort_if_pending_migrations'
2023-01-10 09:16:20 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: rake aborted!
2023-01-10 09:16:20 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: ActiveModel::UnknownAttributeError: unknown attribute 'description' for Setting::GitTemplates.
2023-01-10 09:16:20 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activemodel-6.1.7/lib/active_model/attribute_assignment.rb:51:in `_assign_attribute'
2023-01-10 09:16:20 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activerecord-6.1.7/lib/active_record/attribute_assignment.rb:21:in `block in _assign_attributes'
2023-01-10 09:16:20 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activerecord-6.1.7/lib/active_record/attribute_assignment.rb:13:in `each'
2023-01-10 09:16:20 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activerecord-6.1.7/lib/active_record/attribute_assignment.rb:13:in `_assign_attributes'
2023-01-10 09:16:20 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activemodel-6.1.7/lib/active_model/attribute_assignment.rb:34:in `assign_attributes'
2023-01-10 09:16:20 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activerecord-6.1.7/lib/active_record/core.rb:518:in `initialize'
2023-01-10 09:16:20 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activerecord-6.1.7/lib/active_record/inheritance.rb:72:in `new'
2023-01-10 09:16:20 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activerecord-6.1.7/lib/active_record/inheritance.rb:72:in `new'
2023-01-10 09:16:20 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/activerecord-6.1.7/lib/active_record/persistence.rb:54:in `create!'
2023-01-10 09:16:20 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/foreman_git_templates-1.0.6/app/models/setting/git_templates.rb:16:in `block (2 levels) in load_defaults'
2023-01-10 09:16:20 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/foreman_git_templates-1.0.6/app/models/setting/git_templates.rb:16:in `each'
2023-01-10 09:16:20 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: /usr/share/gems/gems/foreman_git_templates-1.0.6/app/models/setting/git_templates.rb:16:in `block in load_defaults'

That’s why I would usually recommend to start with a minimal installation following the docs and then add additional plugins, configuration changes, etc. later step by step. Then you have better control when you recreate the setup on a new server…

Some plugins are not well maintained, that’s true.

See 2022 Foreman Plugin Audit for a recent effort to identify those.

1 Like

As for Git Templates, see Update the plugin to work with Foreman 3.1 by kamils-iRonin · Pull Request #65 · dm-drogeriemarkt/foreman_git_templates · GitHub for the ongoing work to make it compatible.

1 Like