Error starting smart-proxy after install of remote execution ssh

Problem: foreman-proxy (smart-proxy) will not start after install of ruby-smart-proxy-remote-execution-ssh with “uninitialized constant Dynflow (NameError)”. Note, I have installed an older package for ruby-concurrency to resolve Concurrent::Edge::Future issues.

Expected outcome: smart-proxy should start

Foreman and Proxy versions: Foreman 1.24.2-1 from Debian Buster 1.24 source.
Foreman and Proxy plugin versions: Plugin repository is Debian Buster 1.24.
foreman-cli/buster,now 1.24.2-1 all [installed]
foreman-debug/buster,now 1.24.2-1 all [installed,automatic]
foreman-ec2/buster,now 1.24.2-1 all [installed]
foreman-installer/buster,now 1.24.2-1 all [installed]
foreman-postgresql/buster,now 1.24.2-1 all [installed]
foreman-proxy/buster,now 1.24.2-1 all [installed,automatic]
foreman/buster,now 1.24.2-1 amd64 [installed,automatic]
ruby-foreman-remote-execution-core/buster,now 1.1.6-1 all [installed]
ruby-foreman-tasks-core/buster,now 0.2.5-1 all [installed]
ruby-hammer-cli-foreman/buster,now 0.19.7-1 all [installed,automatic]
ruby-smart-proxy-dynflow-core/plugins,now 0.2.2-1 all [installed]
ruby-smart-proxy-dynflow/plugins,now 0.2.3-1 all [installed]
ruby-smart-proxy-remote-execution-ssh/plugins,now 0.2.1-1 all [installed]
ruby-concurrent/now 1.0.0-3 all [installed,upgradable to: 1.0.5-3]

Distribution and version:
Distributor ID: Debian
Description: Debian GNU/Linux 10 (buster)
Release: 10.3
Codename: buster

Other relevant data:
Feb 11 10:42:32 hostname smart-proxy[2921]: /usr/lib/ruby/vendor_ruby/foreman_tasks_core/ticker.rb:2:in <module:ForemanTasksCore>': uninitialized constant Dynflow (NameError) Feb 11 10:42:32 hostname smart-proxy[2921]: from /usr/lib/ruby/vendor_ruby/foreman_tasks_core/ticker.rb:1:in <top (required)>’
Feb 11 10:42:32 hostname smart-proxy[2921]: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in require' Feb 11 10:42:32 hostname smart-proxy[2921]: from /usr/lib/ruby/vendor_ruby/foreman_tasks_core.rb:6:in <top (required)>’
Feb 11 10:42:32 hostname smart-proxy[2921]: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in require' Feb 11 10:42:32 hostname smart-proxy[2921]: from /usr/lib/ruby/vendor_ruby/foreman_remote_execution_core.rb:1:in <top (required)>’
Feb 11 10:42:32 hostname smart-proxy[2921]: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in require' Feb 11 10:42:32 hostname smart-proxy[2921]: from /usr/lib/ruby/vendor_ruby/bundler_ext/runtime.rb:41:in block in system_require’
Feb 11 10:42:32 hostname smart-proxy[2921]: from /usr/lib/ruby/vendor_ruby/bundler_ext/runtime.rb:37:in each' Feb 11 10:42:32 hostname smart-proxy[2921]: from /usr/lib/ruby/vendor_ruby/bundler_ext/runtime.rb:37:in system_require’
Feb 11 10:42:32 hostname smart-proxy[2921]: from /usr/lib/ruby/vendor_ruby/bundler_ext.rb:19:in block in system_require' Feb 11 10:42:32 hostname smart-proxy[2921]: from /usr/lib/ruby/vendor_ruby/bundler_ext.rb:14:in each’
Feb 11 10:42:32 hostname smart-proxy[2921]: from /usr/lib/ruby/vendor_ruby/bundler_ext.rb:14:in system_require' Feb 11 10:42:32 hostname smart-proxy[2921]: from /usr/share/foreman-proxy/lib/bundler_helper.rb:22:in require_groups’
Feb 11 10:42:32 hostname smart-proxy[2921]: from /usr/share/foreman-proxy/lib/smart_proxy_main.rb:31:in <top (required)>' Feb 11 10:42:32 hostname smart-proxy[2921]: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in require’
Feb 11 10:42:32 hostname smart-proxy[2921]: from /usr/share/foreman-proxy/bin/smart-proxy:5:in `’

This is definitely related to an early post, but it seems like the remote execution ssh smart-proxy plugin is a key bit.

Installing the ruby-smart-proxy-remote-execution-ssh package starts the problem, purging the package allows smart-poxy to start running again.

@corvar Note, I have installed an older package for ruby-concurrency to resolve Concurrent::Edge::Future issues.

With this “hack”, did remote execution work on this version of the foreman that you inform?

I have foreman 2.0 nightly and the same bug still happens.

The ruby-concurrency package install allows Foreman in general to run, but does NOT fix the remote execution ssh DynFlow error.

As an experiment, I spun up a CentOS 7 instance and installed Foreman on it. The remote execution ssh stuff seems to work on there.

A big difference between CentOS and Debian is that there is a process on CentOS:
ruby /usr/bin/smart_proxy_dynflow_core -d -p /var/run/foreman-proxy/smart_proxy_dynflow_core.pid

that has no equivalent on Debian.

Trying to execute that manually gives:

ruby /usr/bin/smart_proxy_dynflow_core -d -p /var/run/foreman-proxy/smart_proxy_dynflow_core.pid
Traceback (most recent call last):
        13: from /usr/bin/smart_proxy_dynflow_core:32:in `<main>'
        12: from /usr/lib/ruby/vendor_ruby/smart_proxy_dynflow_core/launcher.rb:8:in `launch!'
        11: from /usr/lib/ruby/vendor_ruby/smart_proxy_dynflow_core/launcher.rb:12:in `start'
        10: from /usr/lib/ruby/vendor_ruby/smart_proxy_dynflow_core/launcher.rb:28:in `load_settings!'
         9: from /usr/lib/ruby/vendor_ruby/smart_proxy_dynflow_core/bundler_helper.rb:26:in `require_groups'
         8: from /usr/share/rubygems-integration/all/gems/bundler-1.17.3/lib/bundler.rb:114:in `require'
         7: from /usr/share/rubygems-integration/all/gems/bundler-1.17.3/lib/bundler.rb:101:in `setup'
         6: from /usr/share/rubygems-integration/all/gems/bundler-1.17.3/lib/bundler.rb:134:in `definition'
         5: from /usr/share/rubygems-integration/all/gems/bundler-1.17.3/lib/bundler.rb:66:in `configure'
         4: from /usr/share/rubygems-integration/all/gems/bundler-1.17.3/lib/bundler.rb:532:in `configure_gem_home_and_path'
         3: from /usr/share/rubygems-integration/all/gems/bundler-1.17.3/lib/bundler.rb:551:in `configure_gem_home'
         2: from /usr/share/rubygems-integration/all/gems/bundler-1.17.3/lib/bundler.rb:80:in `bundle_path'
         1: from /usr/share/rubygems-integration/all/gems/bundler-1.17.3/lib/bundler.rb:230:in `root'
/usr/share/rubygems-integration/all/gems/bundler-1.17.3/lib/bundler.rb:234:in `rescue in root': Could not locate Gemfile or .bundle/ directory (Bundler::GemfileNotFound)