Remote execution does not seem to be working in Foreman 3.6/Katello 4.8, or after upgrade to 3.7/4.9

Problem:

REX jobs fail with:

Failed to initialize: RuntimeError - Could not use any proxy for the ["SSH", "Script"] job. Consider configuring remote_execution_global_proxy, remote_execution_fallback_proxy in settings"

I have set both of those settings to “Yes” in Settings->Remote Execution page, but the error still complains about those settings.

As suggested in Marek Hulan’s blog post I’ve tried:

foreman-installer --enable-foreman-plugin-remote-execution --enable-foreman-cli-remote-execution --enable-foreman-proxy-plugin-remote-execution-ssh

but no success

When i look at the local integrated smart proxy features, vie Infrastructure → Smart Proxies, it only lists “Logs and Pulpcore” there, it does not show SSH as other docs suggest it should.

Further, when i go to Administer → Remote Execution Features, i find that most of the features there look fine when i click on the feature label - it takes me to a page which for example summarises Name, Label, Description, Provided Inputs, and Job Template.

But when i click on puppet_run_host, or run_script, i get an error:

Oops, we're sorry but something went wrong undefined method `html_safe' for nil:NilClass Did you mean? html_safe?

Expected outcome:
Expect success when running a remote execution job eg “Check for package updates”, or “Run Command - Script Default” with a simple script like “touch /tmp/balls.txt”

Foreman and Proxy versions:
3.6/4.8 and 3.7.0/4.9.0rc2

Foreman and Proxy plugin versions:

foreman-proxy-3.7.0-1.el8
Not sure what you mean by plugin, i can’t see any plugin rpms no wait AHA!
In About -.> Plugins i do have: Foreman Remote Execution version: 10.0.1

Distribution and version:
Red Hat EL8.8, fully updated

Other relevant data:

AAAH
Brilliant

I have now discovered that the problem is that:
foreman-installer --enable-foreman-proxy-plugin-remote-execution-ssh
no longer works, and now we need to do:
foreman-installer --enable-foreman-proxy-plugin-remote-execution-script

So i have executed that, and now my remote execution jobs are working.

Once again, people needlessly breaking backwards-compatibility and making documentation obsolete and misleading, without bothering to update that documentation has wasted another day of my life.

So, how did I discover the solution you may wonder? Well, googling for answers didn’t give me any useful info, but in logging the issue above showed me similar tickets and i opened a few of them to read later, and then I found this:

From July '22:
Unable to install remote ssh execution proxy plugin - Support - TheForeman

Which links to:
Foreman Remote Execution Plugin Documentation - Support - TheForeman

And in there, there is a link to:
Update installer command for REX plugin by maximiliankolb · Pull Request #1301 · theforeman/foreman-documentation (github.com)

In which it is claimed on June 2, 2022 that the documentation has been updated, but later someone else complains:

Dzeri96 commented on Sep 19, 2022
Can I ask why these changes are not live? I just spent a lot of time wondering why this plugin won't install.

And then the excuses begin to flow.

The upshot of this is that a year after the need to update docs was flagged, the docs have still not been updated.

Ie if i go looking for the latest version of the docs available, i end up here:
Foreman :: Plugin Manuals
And those docs are STILL outdated and wrong, and say to use:

–enable-foreman-proxy-plugin-remote-execution-ssh

Very disappointing.

I have seen this sort of thing happen, time after time, year after year, and it always makes me wonder, why do developers bother developing features when they fail to document them? What is the point of any feature or product if it isn’t documented well enough to use it?

What is the point of changing :

–enable-foreman-proxy-plugin-remote-execution-ssh
to:
–enable-foreman-proxy-plugin-remote-execution-script

if you then completely FAIL to document this, so all you have accomplished is make it impossible for anyone to get their remote execution plugin working?

I just wonder… like why… why do people do this…

1 Like

The current documentation site is docs.theforeman.org. Sorry it wasn’t easier to find.

ssh was renamed to script as part of the introduction of REX pull mode. We do have current documentation on how to enable pull mode, and a description of the two available modes.

The problem is not that the current documentation of this isn’t easy to find.

The problem is that documentation of the current method still does not exist.

You’ve just pointed me to documentation of how to enable the new pull-mqtt mode. And you’ve confirmed the old option for the standard ssh mode changed when you introduced this new mode.

So when you introduced this new mode, you documented the new mode.
Great.

But you didn’t document the change you made to the old mode.
How are people supposed to enable remote execution via ssh if it is not documented?

Nowhere in the new documentation, anywhere, can i find instructions on how to enable remote execution via the normal ssh mode. Someone just needs to document this new switch, that’s all:

--enable-foreman-proxy-plugin-remote-execution-script

Because currently it is only documented in a couple of support requests to the forums and a PR on github, which was never fully acted on.

Thanks.