Issue #14073 has been updated by Daniel Pittman.

Status changed from Unreviewed to Investigating
Assignee changed from Daniel Pittman to Patrick Carlisle

So, the desired behaviour is that the agent and apply always pluginsync, which 
means that all library code included on the module path winds up in the Ruby 
load_path on the agent.  This, obviously, only applies to Master where we have 
worked on that - and if that fails, is a separate bug.

Patrick, can you confirm my understanding and, if this highlights an actual 
bug, create a new ticket to track that?

For 2.7, this isn't going to be fixed.  It is also the case that we cannot, 
within the bounds of reason, support this in a real and useful fashion on the 
master.  There is no way to have multiple versions of the support code loaded 
in a single Ruby process, so you will always get the "pick a random environment 
and use only that" version of the support code when you are on a master with 
environments enabled.

In that world, I wonder if the better strategy might be to avoid the support 
code entirely for now?  For Waldorf we may have a better story about this, and 
possibly even inside Telly, but ... not yet.
----------------------------------------
Bug #14073: puppet apply cannot find types in modules on Windows
https://projects.puppetlabs.com/issues/14073#change-61110

Author: Jeff McCune
Status: Investigating
Priority: Normal
Assignee: Patrick Carlisle
Category: modules
Target version: 2.7.x
Affected Puppet version: 2.7.4
Keywords: autoloader windows module load_path LOAD_PATH RUBYLIB autoload require
Branch: 


# Overview #

With Puppet 2.7.x (3a4ac604c85952511fd45c2f0699ce956eda3773) and master 
(b02aa930a03a282588e81f65e14f47a138a4b9f0) Puppet is not able to find custom 
types and providers located in a module.

This appears to be a regression.

# Actual Behaivor #

With the 
[mount_providers](http://forge.puppetlabs.com/puppetlabs/mount_providers) 
module installed in the module path, there is an error because the type uses a 
require statement and the $LOAD_PATH is not correct:

<pre>
Z:\vagrant\modules>puppet describe --modulepath=Z:/vagrant/modules mounttab
Could not run: Could not autoload \
  Z:/vagrant/modules/mount_providers/lib/puppet/type/mountpoint.rb:
Could not autoload 
Z:/vagrant/modules/mount_providers/lib/puppet/provider/mountpoint/linux.rb: \
  no such file to load -- puppet/type/mountpoint
</pre>

# Expected Behavior #

The custom type in the mount providers module should be able to require 
additional files with the $LOAD_PATH modified to include the lib directory of 
the module from the module path.

# Steps to reproduce #

Install Puppet 2.7.13 from our MSI.

Modify environment.bat to use PUPPET_DIR and FACTER_DIR pointing at your Git 
working copies.

Install the mount_providers module somewhere.

Use puppet describe --modulepath=Z:/path/to/modules mountpoint

See the exception raised.

This happens on both 2.7.x and master.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to