Le vendredi 18 janvier 2013 20:52:03 UTC+1, jcbollinger a écrit :

>
>
> On Friday, January 18, 2013 7:56:20 AM UTC-6, xkrantz wrote:
>>
>> Hello every one,
>>
>> I have looked at a lots of threads in the Puppet User group but I did not 
>> find a clear answer or explanation how custom functions work....
>> Here is my current setup :
>>
>>
>> * I have *2 "environments"*. working fine
>> /etc/puppet/environments/production/
>> /etc/puppet/environments/test/
>>
>> * I have a version of my function already working in production
>>
>> * According to the documentation, *"functions" are executed on puppet 
>> master Side*.
>> So I put my *new version* into 
>> /var/lib/puppet/lib/puppet/parser/functions/myfunction.rb on the master.
>> My new version is also present in 
>> /etc/puppet/*environments/test*/modules/mymodule/lib/puppet/parser/function/myfunction.rb
>>  
>> and synced to the agent via "pluginsync"
>>
>>
>> * When I run my puppet agent on my "test" environment, I get the expected 
>> behavior.
>> So I merged my changes in the "production" environment.
>>
>> * Now when I run my agent on the "production" Environment, I get the 
>> behavior of the previous version of my function.
>> If I run the agent right away against the "test" environment, I get again 
>> the expected behavior...
>> I checked the files in both environment through md5sum and they are the 
>> same.
>> And the /var/lib... on the master is also the same....
>>
>>
>> So, how exactly does it work ?
>>
>>
> Once Puppet loads a function implementation by processing its Ruby source 
> file, I don't think it will ever process that Ruby source again in the same 
> run.  Try restarting the master.
>
>
> John
>  
>

Hi John, 

Indeed, after a while (Passenger's threads with puppet masterd process 
stopped and restarted), it was ok.

But still, I have experienced different behaviors according to the 
"Environment" my puppet Agents were running against.
So, does Puppet master load different versions of the function's ruby files 
per environments ?


Thanks again !


-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/9iOArm2QfVkJ.
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-users?hl=en.

Reply via email to