-
Notifications
You must be signed in to change notification settings - Fork 21
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
Use pseudo-relative include paths in parser-function and type. #19
Use pseudo-relative include paths in parser-function and type. #19
Conversation
This fixes puppetlabs#8 and puppetlabs#14 in our setup (Puppet 5.2.0).
nice digging around. I remember this problem but just never connected the two. |
@@ -1,4 +1,4 @@ | |||
require 'puppet_x/binford2k/node_encrypt' | |||
require File.join(File.dirname(__FILE__), '../..', 'puppet_x/binford2k/node_encrypt.rb') |
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.
Did you validate this on a windows node? It should work, since the win32 filesystem APIs all recognize the forward slash as a directory separator. But I'd like to validate that before merging.
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.
I sadly don't have access to a Windows node as of yet...
We are still fighting with the Puppet 5 upgrade and improving Foreman integration here ;-).
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.
I think adding a
require File.join(File.dirname(File.dirname(File.dirname(__FILE__))), 'puppet_x/binford2k/node_encrypt.rb')
would help on windows.
You're totally right. Now that I read a bit further I see that. PE adds the agent libdir to the Puppetserver load path and I didn't realize until just now that ootb Puppetserver did not! Thanks for catching that. |
I swapped out for (I didn't bother to change the one in the face, it's going to use the synced load path anyway) |
I feel vindicated. @binford2k |
…y-file-paths Use pseudo-relative include paths in parser-function and type.
This fixes #8 and #14 in our setup (Puppet 5.2.0).
The underlying cause is described at:
https://tickets.puppetlabs.com/browse/SERVER-973
Without manually patching puppetserver's load path, the only other workaround would be to use something more complex like:
https://github.com/nanliu/puppet-archive/blob/766062a3465053ca8a326ea0b3c31648a49474a4/lib/puppet/provider/archive/default.rb#L1-L10
I guess it's patched somewhere in Puppet Enterprise's puppetserver, which might be the cause why it works for some people.