choria-io / mcorpc-ruby-support

Support libraries to enable Ruby agents and clients to communicate with the Choria Server
https://choria.io/
Apache License 2.0
1 stars 8 forks source link

Choria and Bolt do not run tasks the same way #163

Closed smortex closed 3 years ago

smortex commented 3 years ago

Running a "modern" Ruby task with Choria on CentOS 7 fail because it use the system Ruby (2.0) and the task use more modern code. However, running the same task with Bolt targeting the same host succeed because Bolt use the version of Ruby bundled with Puppet (2.7) to run that task.

Even when the version of Ruby is compatible, some tasks that work with Bolt fail to run with Choria because they rely on command that cannot be found (e.g. Errno::ENOENT: No such file or directory - facter when a task rely on facter to gather some facts).

Maybe we should consider prepending /opt/puppetlabs/puppet/bin to the PATH on AIO platforms before running a task to be consistent with bolt? Or maybe we can make PATH tuneable from the server configuration?

We started discussing this with @ripienaar and @vjanelle on slack but the discussion went stale before we reached a consensus on what to do :-) Opening this issue so that we have a chance to fix this

ripienaar commented 3 years ago

I think prefixing path for the duration of that execution is probably right yeah