Problem:
Installing the Remote Execution plugin (Foreman :: Plugin Manuals) fails with:
root@foreman:/tmp# foreman-installer --enable-foreman-plugin-remote-execution --enable-foreman-proxy-plugin-remote-execution-script
2023-03-23 21:12:55 [NOTICE] [root] Loading installer configuration. This will take some time.
2023-03-23 21:12:57 [NOTICE] [root] Running installer with log based terminal output at level NOTICE.
2023-03-23 21:12:57 [NOTICE] [root] Use -l to set the terminal output log level to ERROR, WARN, NOTICE, INFO, or DEBUG. See --full-help for definitions.
2023-03-23 21:12:58 [NOTICE] [configure] Starting system configuration.
2023-03-23 21:13:03 [NOTICE] [configure] 250 configuration steps out of 1324 steps complete.
2023-03-23 21:13:03 [NOTICE] [configure] 500 configuration steps out of 1328 steps complete.
2023-03-23 21:13:13 [NOTICE] [configure] 750 configuration steps out of 1457 steps complete.
2023-03-23 21:13:26 [ERROR ] [configure] '/usr/sbin/foreman-rake db:migrate' returned 1 instead of one of [0]
2023-03-23 21:13:26 [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-03-23 21:13:32 [NOTICE] [configure] 1000 configuration steps out of 1457 steps complete.
2023-03-23 21:13:33 [NOTICE] [configure] 1250 configuration steps out of 1457 steps complete.
2023-03-23 21:13:38 [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
Relevant log output:
2023-03-23 21:13:26 [INFO ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: == 20180110104432 RenameTemplateInvocationPermission: migrating ===============
2023-03-23 21:13:26 [INFO ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: == 20180110104432 RenameTemplateInvocationPermission: migrated (0.0008s) ======rake aborted!
2023-03-23 21:13:26 [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:
2023-03-23 21:13:26 [INFO ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns:
2023-03-23 21:13:26 [INFO ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: PG::UndefinedColumn: ERROR: column settings.category does not exist
2023-03-23 21:13:26 [INFO ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: LINE 1: ... IN (SELECT "settings"."id" FROM "settings" WHERE "settings"...
Expected outcome:
As a new user, I just set up a new Foreman instance and wanted to make it possible to trigger puppet runs immediately. According to Dropping "Run puppet" button with a replacement using remote execution plugin, the remote execution plugin is the way to go. I followed Foreman :: Plugin Manuals - which did not work - but according to Foreman Remote Execution Plugin Documentation the manual is wrong, and I used the fix suggested there. This led to the error which can be seen above. Figuring that there may be an error, I ran foreman-installer -i
and disabled both foreman-plugin-remote-execution foreman-proxy-plugin-remote-execution-script again, and confirmed, leading to yet another error:
73. Save and run
74. Cancel run without Saving
Choose an option from the menu... 73
2023-03-23 21:17:38 [NOTICE] [configure] Starting system configuration.
2023-03-23 21:17:43 [NOTICE] [configure] 250 configuration steps out of 1239 steps complete.
2023-03-23 21:17:44 [NOTICE] [configure] 750 configuration steps out of 1372 steps complete.
2023-03-23 21:17:55 [ERROR ] [configure] '/usr/sbin/foreman-rake db:migrate' returned 1 instead of one of [0]
2023-03-23 21:17:55 [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-03-23 21:18:00 [NOTICE] [configure] 1000 configuration steps out of 1372 steps complete.
2023-03-23 21:18:00 [NOTICE] [configure] 1250 configuration steps out of 1372 steps complete.
2023-03-23 21:18:02 [NOTICE] [configure] System configuration has finished.
So now my questions are:
- How do I recover from this broken install? Deselecting the plugins doesn’t seem to help.
- How do I install the remote execution plugins correctly?
- If installing them is not possible, which alternatives do I have to trigger puppet runs immediately?
To be honest, this is quite a rocky start trying to use Foreman.
Foreman version:
3.6.0
Distribution and version:
Debian 11.6