-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(PE-31696) Require bolt gem before running local tasks #100
Conversation
c9e7ed1
to
3cda97f
Compare
you could pull in my commits here #96 and put the new interpreters bit on top |
Hm, well, these are passing for me now locally 😡 |
2982390
to
88cc152
Compare
In PE we use the Ruby interpreter shipped with the Puppet Agent to run the ace server. The ace server is responsible for executing remote tasks. Remote tasks will often use the puppet library, and run in ACE using the local transport. Now that puppet has moved to using require_relative there is a bug where `require 'puppet'` in the task will load Puppet from the Ruby vendor path instead of the Puppet gem. The vendor Puppet will then try to autoload gems from the Gem path including Puppet, causing a `UniqueFile` error when the same file is loaded from different locations. This updates ACE to run `-r bolt` before executing tasks on localhost, which will add Bolt and it's dependencies to the `$LOAD_PATH` including Puppet, so that the Gem puppet is prefered over the vendor Puppet.
88cc152
to
264c539
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Should the travis stuff land in 2019.8.x? |
It can, but I don't think it matters since we're not bumping Puppet (or Bolt) in 2019.8.x. I'm reasonably sure CI only breaks with those bumps. And if not maybe it's a problem for another PR 😁 |
cool. lets just do that later if we need. |
In PE we use the Ruby interpreter shipped with the Puppet Agent to run the
ace server. The ace server is responsible for executing remote tasks.
Remote tasks will often use the puppet library, and run in ACE using the
local transport. Now that puppet has moved to using require_relative
there is a bug where require 'puppet' in the task will load Puppet
from the Ruby vendor path instead of the Puppet gem. The vendor Puppet
will then try to autoload gems from the Gem path including Puppet,
causing a UniqueFile error when the same file is loaded from different
locations.
This updates ACE to run -r bolt before executing tasks on localhost,
which will add Bolt and it's dependencies to the $LOAD_PATH including
Puppet, so that the Gem puppet is prefered over the vendor Puppet.