[Puppet - Feature #4248] Load library plugins that are used by multiple puppet functions and delivered via pluginsync

2013-01-04 Thread tickets

Issue #4248 has been updated by Andrew Parker.

Target version deleted (2.7.x)



Feature #4248: Load library plugins that are used by multiple puppet 
functions and delivered via pluginsync
https://projects.puppetlabs.com/issues/4248#change-80255

Author: R.I. Pienaar
Status: Accepted
Priority: Normal
Assignee: 
Category: plumbing
Target version: 
Affected Puppet version: 0.25.5
Keywords: autoloader
Branch: 


Because we do not add all module lib directories to Ruby's search path, ruby 
classes that exist only in the modules (because they have not yet been synced 
via pluginsync) cannot be found.  The autoloader correctly loads files from the 
modules, but ruby itself can't load supporting classes.


Old description:

At present we can copy parser functions, types and providers out with plugins 
sync, this works fine.

It seems though we cannot copy out Puppet::Util::* classes - useful for code 
accessed by various parser functions for example.

I need to do something like:

pre
require File.dirname(__FILE__) + '/../../util/foo.rb'
/pre

from a parser function since:

pre
require 'puppet/util/foo'
/pre

doesnt work.

I am also keen to be able to copy out new application classes that will tie 
into the puppet single executable thing, i guess these 2 features might be in 
the same realm.



-- 
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.



[Puppet - Feature #4248] Load library plugins that are used by multiple puppet functions and delivered via pluginsync

2012-12-06 Thread tickets

Issue #4248 has been updated by Josh Cooper.


The proposed fix for #7316 will ensure an application can require custom facts, 
types, providers, applications, faces and actions from the modulepath or gem, 
and that code can in turn require utility code, also from the modulepath or 
gem. However, the proposed fix won't fix this particular issue, trying to 
require utility code from a function. Also true for report processors. 
Additional changes will be required to the compiler to ensure code does not 
leak across environments, likely fork (but not exec) a child to do the compile.

Feature #4248: Load library plugins that are used by multiple puppet 
functions and delivered via pluginsync
https://projects.puppetlabs.com/issues/4248#change-78366

Author: R.I. Pienaar
Status: Accepted
Priority: Normal
Assignee: 
Category: plumbing
Target version: 2.7.x
Affected Puppet version: 0.25.5
Keywords: autoloader
Branch: 


Because we do not add all module lib directories to Ruby's search path, ruby 
classes that exist only in the modules (because they have not yet been synced 
via pluginsync) cannot be found.  The autoloader correctly loads files from the 
modules, but ruby itself can't load supporting classes.


Old description:

At present we can copy parser functions, types and providers out with plugins 
sync, this works fine.

It seems though we cannot copy out Puppet::Util::* classes - useful for code 
accessed by various parser functions for example.

I need to do something like:

pre
require File.dirname(__FILE__) + '/../../util/foo.rb'
/pre

from a parser function since:

pre
require 'puppet/util/foo'
/pre

doesnt work.

I am also keen to be able to copy out new application classes that will tie 
into the puppet single executable thing, i guess these 2 features might be in 
the same realm.



-- 
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.



[Puppet - Feature #4248] Load library plugins that are used by multiple puppet functions and delivered via pluginsync

2012-11-09 Thread tickets

Issue #4248 has been updated by Josh Cooper.

Keywords set to autoloader

Andrew  Parker wrote:
 The mount_providers module has a file `lib/puppet/provider/mountpoint.rb` 
 that is loaded with `require` from `lib/puppet/provider/mountpoint/linux.rb`. 
 This fails because the `mountpoint.rb` file is nowhere to be found in the 
 load path.

If the autoloader loads module A, and A requires module B, and both modules 
change, e.g. pluginsync, then the autoloader will never reload B, which will 
lead to crazy code inconsistency bugs. Fortunately, the agent forks (it will in 
3.0.2 #17361) eliminating this issue on the agent side. But it is an issue on 
the master side, e.g. an autoloaded function requires utility code.

Feature #4248: Load library plugins that are used by multiple puppet 
functions and delivered via pluginsync
https://projects.puppetlabs.com/issues/4248#change-76134

Author: R.I. Pienaar
Status: Accepted
Priority: Normal
Assignee: 
Category: plumbing
Target version: 2.7.x
Affected Puppet version: 0.25.5
Keywords: autoloader
Branch: 


Because we do not add all module lib directories to Ruby's search path, ruby 
classes that exist only in the modules (because they have not yet been synced 
via pluginsync) cannot be found.  The autoloader correctly loads files from the 
modules, but ruby itself can't load supporting classes.


Old description:

At present we can copy parser functions, types and providers out with plugins 
sync, this works fine.

It seems though we cannot copy out Puppet::Util::* classes - useful for code 
accessed by various parser functions for example.

I need to do something like:

pre
require File.dirname(__FILE__) + '/../../util/foo.rb'
/pre

from a parser function since:

pre
require 'puppet/util/foo'
/pre

doesnt work.

I am also keen to be able to copy out new application classes that will tie 
into the puppet single executable thing, i guess these 2 features might be in 
the same realm.



-- 
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.



[Puppet - Feature #4248] Load library plugins that are used by multiple puppet functions and delivered via pluginsync

2012-09-24 Thread tickets

Issue #4248 has been updated by Andrew  Parker.


A correction on what Eric said:

`lib/` subdirectories of modules DO NOT get added to $: in the Puppet 3.0.0 
release. There was some experimentation with this that hacked the 
`Kernel.require` method much like Rubygems does, but that was not put in 
because of the issue of environments and a threaded environment.  At the moment 
our only threaded environment (that I know of) is in webrick, if we can change 
webrick to not using threads, then that greatly mitigates some of the problems 
involved in this.

Feature #4248: Load library plugins that are used by multiple puppet 
functions and delivered via pluginsync
https://projects.puppetlabs.com/issues/4248#change-71686

Author: R.I. Pienaar
Status: Accepted
Priority: Normal
Assignee: 
Category: plumbing
Target version: 2.7.x
Affected Puppet version: 0.25.5
Keywords: 
Branch: 


Because we do not add all module lib directories to Ruby's search path, ruby 
classes that exist only in the modules (because they have not yet been synced 
via pluginsync) cannot be found.  The autoloader correctly loads files from the 
modules, but ruby itself can't load supporting classes.


Old description:

At present we can copy parser functions, types and providers out with plugins 
sync, this works fine.

It seems though we cannot copy out Puppet::Util::* classes - useful for code 
accessed by various parser functions for example.

I need to do something like:

pre
require File.dirname(__FILE__) + '/../../util/foo.rb'
/pre

from a parser function since:

pre
require 'puppet/util/foo'
/pre

doesnt work.

I am also keen to be able to copy out new application classes that will tie 
into the puppet single executable thing, i guess these 2 features might be in 
the same realm.



-- 
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.



[Puppet - Feature #4248] Load library plugins that are used by multiple puppet functions and delivered via pluginsync

2012-09-24 Thread tickets

Issue #4248 has been updated by Andrew  Parker.


#9827 shows the exact problem that is caused by not being able to load the 
library code from modules. The mount_providers module has a file 
`lib/puppet/provider/mountpoint.rb` that is loaded with `require` from 
`lib/puppet/provider/mountpoint/linux.rb`. This fails because the 
`mountpoint.rb` file is nowhere to be found in the load path.

Feature #4248: Load library plugins that are used by multiple puppet 
functions and delivered via pluginsync
https://projects.puppetlabs.com/issues/4248#change-71687

Author: R.I. Pienaar
Status: Accepted
Priority: Normal
Assignee: 
Category: plumbing
Target version: 2.7.x
Affected Puppet version: 0.25.5
Keywords: 
Branch: 


Because we do not add all module lib directories to Ruby's search path, ruby 
classes that exist only in the modules (because they have not yet been synced 
via pluginsync) cannot be found.  The autoloader correctly loads files from the 
modules, but ruby itself can't load supporting classes.


Old description:

At present we can copy parser functions, types and providers out with plugins 
sync, this works fine.

It seems though we cannot copy out Puppet::Util::* classes - useful for code 
accessed by various parser functions for example.

I need to do something like:

pre
require File.dirname(__FILE__) + '/../../util/foo.rb'
/pre

from a parser function since:

pre
require 'puppet/util/foo'
/pre

doesnt work.

I am also keen to be able to copy out new application classes that will tie 
into the puppet single executable thing, i guess these 2 features might be in 
the same realm.



-- 
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.



[Puppet - Feature #4248] Load library plugins that are used by multiple puppet functions and delivered via pluginsync

2012-08-22 Thread tickets

Issue #4248 has been updated by eric sorenson.


Recording for posterity, later in the 3.0.0 release we stopped pluginsync on 
apply, because it clobbers the cache of downloaded plugins from the master with 
the (almost certainly more limited) set know to the modulepath of 'puppet 
apply'. Gem directories (via #7788) and any lib/ subdirectories in modulepath 
get appended to $: to build up a consistent picture of loadable code without 
causing agent-master disparities.

Feature #4248: Load library plugins that are used by multiple puppet 
functions and delivered via pluginsync
https://projects.puppetlabs.com/issues/4248#change-69623

Author: R.I. Pienaar
Status: Accepted
Priority: Normal
Assignee: 
Category: plumbing
Target version: 2.7.x
Affected Puppet version: 0.25.5
Keywords: 
Branch: 


Because we do not add all module lib directories to Ruby's search path, ruby 
classes that exist only in the modules (because they have not yet been synced 
via pluginsync) cannot be found.  The autoloader correctly loads files from the 
modules, but ruby itself can't load supporting classes.


Old description:

At present we can copy parser functions, types and providers out with plugins 
sync, this works fine.

It seems though we cannot copy out Puppet::Util::* classes - useful for code 
accessed by various parser functions for example.

I need to do something like:

pre
require File.dirname(__FILE__) + '/../../util/foo.rb'
/pre

from a parser function since:

pre
require 'puppet/util/foo'
/pre

doesnt work.

I am also keen to be able to copy out new application classes that will tie 
into the puppet single executable thing, i guess these 2 features might be in 
the same realm.



-- 
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.



[Puppet - Feature #4248] Load library plugins that are used by multiple puppet functions and delivered via pluginsync

2012-06-21 Thread tickets

Issue #4248 has been updated by Chris Price.


I believe that, as Nigel suggested, that this has been dealt with as part of 
the autoloader and pluginsync work that Patrick and I did for Telly (#7316, 
#11858, #12126, etc.).

We do not alter Ruby's load path to reflect the quirks of our modulepath, but 
pluginsync will sync module content directly into the agent's libdir (which 
**is** in Ruby's load path) in a way that should allow the ruby 'require' 
statements to work as expected.

I would love for someone who is a stakeholder for this (R.I., Jeff) to try it 
out in Telly and let us know if my assessment is incorrect; otherwise I think 
that we can mark this as fixed in 3.0 and close this ticket.

Feature #4248: Load library plugins that are used by multiple puppet 
functions and delivered via pluginsync
https://projects.puppetlabs.com/issues/4248#change-65511

Author: R.I. Pienaar
Status: Accepted
Priority: Normal
Assignee: 
Category: plumbing
Target version: 2.7.x
Affected Puppet version: 0.25.5
Keywords: 
Branch: 


Because we do not add all module lib directories to Ruby's search path, ruby 
classes that exist only in the modules (because they have not yet been synced 
via pluginsync) cannot be found.  The autoloader correctly loads files from the 
modules, but ruby itself can't load supporting classes.


Old description:

At present we can copy parser functions, types and providers out with plugins 
sync, this works fine.

It seems though we cannot copy out Puppet::Util::* classes - useful for code 
accessed by various parser functions for example.

I need to do something like:

pre
require File.dirname(__FILE__) + '/../../util/foo.rb'
/pre

from a parser function since:

pre
require 'puppet/util/foo'
/pre

doesnt work.

I am also keen to be able to copy out new application classes that will tie 
into the puppet single executable thing, i guess these 2 features might be in 
the same realm.



-- 
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.



[Puppet - Feature #4248] Load library plugins that are used by multiple puppet functions and delivered via pluginsync

2012-06-21 Thread tickets

Issue #4248 has been updated by Jeff McCune.


OK, so Chris and I are going to dive into this together on Friday.

As I mentioned in the comments many moons ago...  This is not limited to 
pluginsync.

* Puppet apply needs to work as a first class citizen.  If it pluginsyncs, 
great, if not, it still needs to work.
* Puppet master needs to work as a first class citizen.  (Parser functions.  
Types and providers, etc...)

So, don't go based on the subject alone.  It's not capturing the full scope of 
this problem.

Feature #4248: Load library plugins that are used by multiple puppet 
functions and delivered via pluginsync
https://projects.puppetlabs.com/issues/4248#change-65513

Author: R.I. Pienaar
Status: Accepted
Priority: Normal
Assignee: 
Category: plumbing
Target version: 2.7.x
Affected Puppet version: 0.25.5
Keywords: 
Branch: 


Because we do not add all module lib directories to Ruby's search path, ruby 
classes that exist only in the modules (because they have not yet been synced 
via pluginsync) cannot be found.  The autoloader correctly loads files from the 
modules, but ruby itself can't load supporting classes.


Old description:

At present we can copy parser functions, types and providers out with plugins 
sync, this works fine.

It seems though we cannot copy out Puppet::Util::* classes - useful for code 
accessed by various parser functions for example.

I need to do something like:

pre
require File.dirname(__FILE__) + '/../../util/foo.rb'
/pre

from a parser function since:

pre
require 'puppet/util/foo'
/pre

doesnt work.

I am also keen to be able to copy out new application classes that will tie 
into the puppet single executable thing, i guess these 2 features might be in 
the same realm.



-- 
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.



[Puppet - Feature #4248] Load library plugins that are used by multiple puppet functions and delivered via pluginsync

2012-06-21 Thread tickets

Issue #4248 has been updated by Nigel Kersten.


`apply` does pluginsync now in 3.0, precisely to avoid the special casing of 
solutions for problems like this.



Feature #4248: Load library plugins that are used by multiple puppet 
functions and delivered via pluginsync
https://projects.puppetlabs.com/issues/4248#change-65527

Author: R.I. Pienaar
Status: Accepted
Priority: Normal
Assignee: 
Category: plumbing
Target version: 2.7.x
Affected Puppet version: 0.25.5
Keywords: 
Branch: 


Because we do not add all module lib directories to Ruby's search path, ruby 
classes that exist only in the modules (because they have not yet been synced 
via pluginsync) cannot be found.  The autoloader correctly loads files from the 
modules, but ruby itself can't load supporting classes.


Old description:

At present we can copy parser functions, types and providers out with plugins 
sync, this works fine.

It seems though we cannot copy out Puppet::Util::* classes - useful for code 
accessed by various parser functions for example.

I need to do something like:

pre
require File.dirname(__FILE__) + '/../../util/foo.rb'
/pre

from a parser function since:

pre
require 'puppet/util/foo'
/pre

doesnt work.

I am also keen to be able to copy out new application classes that will tie 
into the puppet single executable thing, i guess these 2 features might be in 
the same realm.



-- 
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.



[Puppet - Feature #4248] Load library plugins that are used by multiple puppet functions and delivered via pluginsync

2012-01-25 Thread tickets

Issue #4248 has been updated by Nigel Kersten.

Subject changed from Plugin library dirs are not searched by ruby to Load 
library plugins that are used by multiple puppet functions and delivered via 
pluginsync



Feature #4248: Load library plugins that are used by multiple puppet 
functions and delivered via pluginsync
https://projects.puppetlabs.com/issues/4248

Author: R.I. Pienaar
Status: Accepted
Priority: Normal
Assignee: 
Category: plumbing
Target version: 2.7.x
Affected Puppet version: 0.25.5
Keywords: 
Branch: 


Because we do not add all module lib directories to Ruby's search path, ruby 
classes that exist only in the modules (because they have not yet been synced 
via pluginsync) cannot be found.  The autoloader correctly loads files from the 
modules, but ruby itself can't load supporting classes.


Old description:

At present we can copy parser functions, types and providers out with plugins 
sync, this works fine.

It seems though we cannot copy out Puppet::Util::* classes - useful for code 
accessed by various parser functions for example.

I need to do something like:

pre
require File.dirname(__FILE__) + '/../../util/foo.rb'
/pre

from a parser function since:

pre
require 'puppet/util/foo'
/pre

doesnt work.

I am also keen to be able to copy out new application classes that will tie 
into the puppet single executable thing, i guess these 2 features might be in 
the same realm.



-- 
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.