**Problem:foreman-installer --enable-foreman-plugin-openscap not succesfully installing the openscap plugin
**Expected outcome:Install the plugin successfully
**Foreman and Proxy versions:foreman version is 3.1, Openscap plugin version is 0.8
Foreman and Proxy plugin versions:
**Distribution and version:centos 7.9.2009 (Core)
**Other relevant data:*foreman-rake db:migrate failing
$ sudo foreman-installer --enable-foreman-plugin-openscap
2022-03-04 04:49:58 [NOTICE] [root] Loading installer configuration. This will take some time.
2022-03-04 04:50:02 [NOTICE] [root] Running installer with log based terminal output at level NOTICE.
2022-03-04 04:50:02 [NOTICE] [root] Use -l to set the terminal output log level to ERROR, WARN, NOTICE, INFO, or DEBUG. See --full-help for definitions.
2022-03-04 04:50:10 [NOTICE] [configure] Starting system configuration.
2022-03-04 04:50:19 [NOTICE] [configure] 250 configuration steps out of 1362 steps complete.
2022-03-04 04:50:19 [NOTICE] [configure] 500 configuration steps out of 1364 steps complete.
2022-03-04 04:50:19 [NOTICE] [configure] 750 configuration steps out of 1370 steps complete.
2022-03-04 04:50:34 [ERROR ] [configure] ā/usr/sbin/foreman-rake db:migrateā returned 1 instead of one of [0]
2022-03-04 04:50:34 [ERROR ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: change from ānotrunā to [ā0ā] failed: ā/usr/sbin/foreman-rake db:migrateā returned 1 instead of one of [0]
2022-03-04 04:50:40 [NOTICE] [configure] 1000 configuration steps out of 1371 steps complete.
2022-03-04 04:50:41 [NOTICE] [configure] 1250 configuration steps out of 1371 steps complete.
2022-03-04 04:50:43 [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.
The full log is at /var/log/foreman-installer/foreman.log
$ sudo foreman-rake db:migrate
API controllers newer than Apipie cache! Run apipie:cache rake task to regenerate cache.
== 20200803065041 MigratePortOverridesForAnsible: migrating ===================
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
uninitialized constant MigratePortOverridesForAnsible::AnsibleRole
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_openscap-5.1.1/db/migrate/20200803065041_migrate_port_overrides_for_ansible.rb:14:in transform_lookup_values' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_openscap-5.1.1/db/migrate/20200803065041_migrate_port_overrides_for_ansible.rb:3:in
upā
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:831:in exec_migration' /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:812:in
block (2 levels) in migrateā
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:811:in block in migrate' /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:471:in
with_connectionā
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:810:in migrate' /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:1002:in
migrateā
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:1310:in block in execute_migration_in_transaction' /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:1361:in
block in ddl_transactionā
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/connection_adapters/abstract/database_statements.rb:280:in block in transaction' /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/connection_adapters/abstract/transaction.rb:280:in
block in within_new_transactionā
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in block (2 levels) in synchronize' /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in
handle_interruptā
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in block in synchronize' /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in
handle_interruptā
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in synchronize' /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/connection_adapters/abstract/transaction.rb:278:in
within_new_transactionā
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/connection_adapters/abstract/database_statements.rb:280:in transaction' /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/transactions.rb:212:in
transactionā
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:1361:in ddl_transaction' /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:1309:in
execute_migration_in_transactionā
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:1281:in block in migrate_without_lock' /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:1280:in
eachā
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:1280:in migrate_without_lock' /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:1229:in
block in migrateā
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:1382:in with_advisory_lock' /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:1229:in
migrateā
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:1061:in up' /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:1036:in
migrateā
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/tasks/database_tasks.rb:238:in migrate' /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/railties/databases.rake:86:in
block (3 levels) in <top (required)>ā
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/railties/databases.rake:84:in each' /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/railties/databases.rake:84:in
block (2 levels) in <top (required)>ā
/opt/rh/rh-ruby27/root/usr/share/gems/gems/rake-13.0.1/exe/rake:27:in `<top (required)>ā
Caused by:
NameError: uninitialized constant MigratePortOverridesForAnsible::AnsibleRole
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_openscap-5.1.1/db/migrate/20200803065041_migrate_port_overrides_for_ansible.rb:14:in transform_lookup_values' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_openscap-5.1.1/db/migrate/20200803065041_migrate_port_overrides_for_ansible.rb:3:in
upā
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:831:in exec_migration' /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:812:in
block (2 levels) in migrateā
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:811:in block in migrate' /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:471:in
with_connectionā
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:810:in migrate' /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:1002:in
migrateā
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:1310:in block in execute_migration_in_transaction' /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:1361:in
block in ddl_transactionā
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/connection_adapters/abstract/database_statements.rb:280:in block in transaction' /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/connection_adapters/abstract/transaction.rb:280:in
block in within_new_transactionā
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in block (2 levels) in synchronize' /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in
handle_interruptā
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in block in synchronize' /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in
handle_interruptā
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in synchronize' /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/connection_adapters/abstract/transaction.rb:278:in
within_new_transactionā
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/connection_adapters/abstract/database_statements.rb:280:in transaction' /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/transactions.rb:212:in
transactionā
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:1361:in ddl_transaction' /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:1309:in
execute_migration_in_transactionā
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:1281:in block in migrate_without_lock' /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:1280:in
eachā
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:1280:in migrate_without_lock' /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:1229:in
block in migrateā
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:1382:in with_advisory_lock' /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:1229:in
migrateā
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:1061:in up' /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:1036:in
migrateā
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/tasks/database_tasks.rb:238:in migrate' /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/railties/databases.rake:86:in
block (3 levels) in <top (required)>ā
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/railties/databases.rake:84:in each' /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/railties/databases.rake:84:in
block (2 levels) in <top (required)>ā
/opt/rh/rh-ruby27/root/usr/share/gems/gems/rake-13.0.1/exe/rake:27:in `<top (required)>ā
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
/var/log/foreman-installer/foreman.log
$ sudo cat /var/log/foreman-installer/foreman.log | grep -i error
2022-03-04 04:50:02 [NOTICE] [root] Use -l to set the terminal output log level to ERROR, WARN, NOTICE, INFO, or DEBUG. See --full-help for definitions.
2022-03-04 04:50:12 [DEBUG ] [configure] Facter: Error reading file: No such file or directory
2022-03-04 04:50:12 [DEBUG ] [configure] -D DEFAULT_ERRORLOG=ālogs/error_logā
2022-03-04 04:50:12 [DEBUG ] [configure] -D DEFAULT_ERRORLOG=ālogs/error_logā
2022-03-04 04:50:13 [DEBUG ] [configure] Error Correction Type: Multi-bit ECC
2022-03-04 04:50:13 [DEBUG ] [configure] Error Information Handle: Not Provided
2022-03-04 04:50:13 [DEBUG ] [configure] Error Information Handle: 0x0000
2022-03-04 04:50:13 [DEBUG ] [configure] Status: No errors detected
2022-03-04 04:50:13 [DEBUG ] [configure] Facter: unreachable ::/96 dev lo metric 1024 error -113 pref medium
2022-03-04 04:50:13 [DEBUG ] [configure] Facter: unreachable ::ffff:0.0.0.0/96 dev lo metric 1024 error -113 pref medium
2022-03-04 04:50:13 [DEBUG ] [configure] Facter: unreachable 2002:a00::/24 dev lo metric 1024 error -113 pref medium
2022-03-04 04:50:13 [DEBUG ] [configure] Facter: unreachable 2002:7f00::/24 dev lo metric 1024 error -113 pref medium
2022-03-04 04:50:13 [DEBUG ] [configure] Facter: unreachable 2002:a9fe::/32 dev lo metric 1024 error -113 pref medium
2022-03-04 04:50:13 [DEBUG ] [configure] Facter: unreachable 2002:ac10::/28 dev lo metric 1024 error -113 pref medium
2022-03-04 04:50:13 [DEBUG ] [configure] Facter: unreachable 2002:c0a8::/32 dev lo metric 1024 error -113 pref medium
2022-03-04 04:50:13 [DEBUG ] [configure] Facter: unreachable 2002:e000::/19 dev lo metric 1024 error -113 pref medium
2022-03-04 04:50:13 [DEBUG ] [configure] Facter: unreachable 3ffe:ffff::/32 dev lo metric 1024 error -113 pref medium
2022-03-04 04:50:15 [DEBUG ] [configure] Automatic Parameter Lookup of āforeman_proxy::log_buffer_errorsā
2022-03-04 04:50:15 [DEBUG ] [configure] Searching for āforeman_proxy::log_buffer_errorsā
2022-03-04 04:50:15 [DEBUG ] [configure] No such key: āforeman_proxy::log_buffer_errorsā
2022-03-04 04:50:15 [DEBUG ] [configure] Found key: āforeman_proxy::log_buffer_errorsā value: 1000
2022-03-04 04:50:34 [INFO ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: StandardError: An error has occurred, this and all later migrations canceled:
2022-03-04 04:50:34 [INFO ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: NameError: uninitialized constant MigratePortOverridesForAnsible::AnsibleRole
2022-03-04 04:50:34 [ERROR ] [configure] ā/usr/sbin/foreman-rake db:migrateā returned 1 instead of one of [0]
2022-03-04 04:50:34 [ERROR ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: change from ānotrunā to [ā0ā] failed: ā/usr/sbin/foreman-rake db:migrateā returned 1 instead of one of [0]
Please helpā¦