Issue #14073 has been updated by Josh Cooper.

Status changed from Investigating to Duplicate

This issue has two parts. The ability for `puppet apply` to autoload a module, 
and have that module require utility code. This will be fixed in #7316. 

The second part is autoloading modules on Windows. In 2.7.x, you used to have 
to specify the module path using forward slashes (#11930). This was fixed in 
2.7.x in f9a6337 . Then improvements were made to the autoloader in 3.0.0 to 
canonicalize paths on Windows correctly in de8ade81a.

Since this issue is about autoloaded modules requiring utility code, I am 
closing this as a duplicate of #7316.
----------------------------------------
Bug #14073: puppet apply cannot find types in modules on Windows
https://projects.puppetlabs.com/issues/14073#change-78466

Author: Jeff McCune
Status: Duplicate
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 bd
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 puppet-bugs@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-bugs+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to