New Katello installed, errors when trying to enable foreman-plugin-ansible and foreman-proxy-plugin-ansible

Problem: Getting the following errors, when trying to enable foreman-plugin-ansible and foreman-proxy-plugin-ansible.

Expected outcome: foreman-plugin-ansible and foreman-proxy-plugin-ansible enabled without errors.

Foreman and Proxy versions: foreman-3.6.1 and foreman-proxy-3.6.1

Foreman and Proxy plugin versions: foreman-3.6.1 and foreman-proxy-3.6.1

Distribution and version: RHEL 8.7

Other relevant data:
I followed the Foreman :: Plugin Manuals
Following is what I am getting when I run foreman-installer --enable-foreman-plugin-ansible --enable-foreman-proxy-plugin-ansible…

[root@]# foreman-installer --enable-foreman-plugin-ansible --enable-foreman-proxy-plugin-ansible
2023-04-19 17:59:07 [NOTICE] [root] Loading installer configuration. This will take some time.
2023-04-19 17:59:10 [NOTICE] [root] Running installer with log based terminal output at level NOTICE.
2023-04-19 17:59:10 [NOTICE] [root] Use -l to set the terminal output log level to ERROR, WARN, NOTICE, INFO, or DEBUG. See --full-help for definitions.
2023-04-19 17:59:13 [NOTICE] [configure] Starting system configuration.
2023-04-19 17:59:24 [NOTICE] [configure] 250 configuration steps out of 1491 steps complete.
2023-04-19 17:59:28 [NOTICE] [configure] 500 configuration steps out of 1493 steps complete.
2023-04-19 17:59:30 [NOTICE] [configure] 750 configuration steps out of 1498 steps complete.
2023-04-19 17:59:31 [NOTICE] [configure] 1000 configuration steps out of 1502 steps complete.
2023-04-19 17:59:52 [ERROR ] [configure] ‘/usr/sbin/foreman-rake db:migrate’ returned 1 instead of one of [0]
2023-04-19 17:59:52 [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]
2023-04-19 18:00:04 [NOTICE] [configure] 1250 configuration steps out of 1502 steps complete.
2023-04-19 18:00:10 [NOTICE] [configure] 1500 configuration steps out of 1502 steps complete.
2023-04-19 18:00:12 [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/katello.log

Please help, this is a new installation and the installation of Katello was successful, but the foreman-plugin-ansible and foreman-proxy-plugin-ansible are failing.

Thanks in advance.

Best regards,
Balaji Sankaran.

Without the whole error from /var/log/foreman-installer/katello.log it’s a bit hard to guess, but I would be it’s the same error as reported in Bug #36299: The migration for adding the new ansible_callback_enabled column is failing on nightly Katello - Ansible - Foreman

cc @nofaralfasi for awareness

Thanks @evgeni! I’m working on fixing that bug.
@Balaji_Arun_Kumar_Sa As Evgeni mentioned, without the log file we can’t know for sure if that’s the issue here.

Thank you for your response, attached are the logs.

Best regards,
Balaji Sankaran
katello.log (1.8 MB)
katello.20230419-175907.log (1.9 MB)
katello.20230419-175255.log (1.7 MB)
katello.20230419-174457.log (2.2 MB)
katello.20230419-172504.log (62.6 KB)
katello.20230419-172352.log (43.3 KB)

Hello nofaralfasi,
Attached the logs for you to review, hope it will help you to help me.

Best regards,
Balaji Sankaran.

from the log:

2023-04-19 17:59:52 [INFO  ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: Couldn't find Template without an ID
2023-04-19 17:59:52 [INFO  ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/finder_methods.rb:456:in `find_with_ids'
2023-04-19 17:59:52 [INFO  ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/finder_methods.rb:69:in `find'
2023-04-19 17:59:52 [INFO  ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/querying.rb:22:in `find'
2023-04-19 17:59:52 [INFO  ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/core.rb:344:in `find'
2023-04-19 17:59:52 [INFO  ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: /usr/share/gems/gems/foreman_ansible-11.1.2/db/migrate/20221003153000_add_ansible_callback_enabled_to_templates.rb:7:in `block in change'

yepp, this is the linked issue.

Thank you for the update, evgeni.
May I know when this will be fixed?

Best regards,
Balaji Sankaran.

In the next foreman_ansible release :slight_smile:

Do the foreman version 3.5 and katello version 4.7 have the same bug?

I’m not sure about Katello, but Foreman 3.5 does not have this issue.

Okay thanks, I will try Foreman 3.5 and update you.

Best regards,
Balaji Sankaran.

Hi nofaralfasi.

The foreman version 3.5 and Katello version 4.7 worked just fine for the command “foreman-installer --enable-foreman-plugin-ansible --enable-foreman-proxy-plugin-ansible”, but when I tried to run the command “foreman-installer --enable-foreman-plugin-remote-execution --enable-foreman-proxy-plugin-remote-execution-ssh” it errors with “ERROR: Unrecognised option ‘–enable-foreman-proxy-plugin-remote-execution-ssh’”.
When I checked foreman-installer help, I see the following…
[root@ ~]# foreman-installer --help|grep remote-execution
–[no-]enable-foreman-cli-remote-execution Enable ‘foreman_cli_remote_execution’ puppet module (default: true)
–[no-]enable-foreman-plugin-remote-execution Enable ‘foreman_plugin_remote_execution’ puppet module (default: true)
–[no-]enable-foreman-plugin-remote-execution-cockpit Enable ‘foreman_plugin_remote_execution_cockpit’ puppet module (default: false)
–[no-]enable-foreman-proxy-plugin-remote-execution-script Enable ‘foreman_proxy_plugin_remote_execution_script’ puppet module (default: false)
–foreman-plugin-remote-execution-cockpit-origins Specify additional Cockpit Origins to configure cockpit.conf.
–foreman-proxy-plugin-remote-execution-script-cockpit-integration Enables/disables Cockpit integration (current: true)
–foreman-proxy-plugin-remote-execution-script-mode Operation Mode of the plugin. (current: “ssh”)

Is the “–foreman-proxy-plugin-remote-execution-script-mode” a replacement for “–foreman-proxy-plugin-remote-execution-ssh”?

Best regards,
Balaji Sankaran.

Not exactly. You’re looking for --enable-foreman-proxy-plugin-remote-execution-script

Thank you, aruzicka.