[Bug 1076286] Re: Puppet agent not correcly configuring facts synch'd from master

2012-11-16 Thread Andrea Biancini
Hi Matthaus,
I just re-executed the operations described. I work with master and agent on 
two different machines.
On the agent machine the /etc/puppet/puppet.conf is as follows:

[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet
factpath=$vardir/lib/facter
templatedir=$confdir/templates
prerun_command=/etc/puppet/etckeeper-commit-pre
postrun_command=/etc/puppet/etckeeper-commit-post

[agent]
server=puppet.example.com
report=true
pluginsync=true
runinterval=1800


Now the outputs:
# Cleanup
root@puppetclient:~# rm -Rf /tmp/puppettest 
root@puppetclient:~# rm -Rf /var/lib/puppet/lib/

# Puppet Run
root@puppetclient:~# puppet agent -t
info: Retrieving plugin
notice: /File[/var/lib/puppet/lib/puppet]/ensure: removed
notice: /File[/var/lib/puppet/lib/augeas]/ensure: removed
notice: /File[/var/lib/puppet/lib/facter/util]/ensure: removed
notice: /File[/var/lib/puppet/lib/facter/test_date.rb]/ensure: removed
notice: /File[/var/lib/puppet/lib/facter/ldapserver.rb]/ensure: removed
notice: /File[/var/lib/puppet/lib/facter/shib2idp_status.rb]/ensure: removed
notice: /File[/var/lib/puppet/lib/facter/facter_dot_d.rb]/ensure: removed
notice: /File[/var/lib/puppet/lib/facter/root_home.rb]/ensure: removed
notice: /File[/var/lib/puppet/lib/facter/test_fact.rb]/ensure: defined content 
as '{md5}fc59074ecb5d02756ee6c2095677bb92'
notice: /File[/var/lib/puppet/lib/facter/puppet_vardir.rb]/ensure: removed
notice: /File[/var/lib/puppet/lib/facter/shib2idp_javasecurity.rb]/ensure: 
removed
notice: /File[/var/lib/puppet/lib/facter/pe_version.rb]/ensure: removed
info: Loading downloaded plugin /var/lib/puppet/lib/facter/test_fact.rb
info: Loading facts in /var/lib/puppet/lib/facter/test_fact.rb
info: Caching catalog for puppetclient.example.com
info: Applying configuration version '1353052499'
notice: /Stage[main]//Node[puppetclient]/File[/tmp/puppettest]/ensure: created
notice: Finished catalog run in 0.14 seconds

# Wrong content in file
root@puppetclient:~# cat /tmp/puppettest 
root@puppetclient:~# 

# Correct facter in lib
root@puppetclient:~# find /var/lib/puppet/lib/
/var/lib/puppet/lib/
/var/lib/puppet/lib/facter
/var/lib/puppet/lib/facter/test_fact.rb

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to puppet in Ubuntu.
https://bugs.launchpad.net/bugs/1076286

Title:
  Puppet agent not correcly configuring facts synch'd from master

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/puppet/+bug/1076286/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1076286] Re: Puppet agent not correcly configuring facts synch'd from master

2012-11-15 Thread Andrea Biancini
On my linux box the fact is synched on the agent (with pluginsync=true
attribute) and the fact file is created in the folder
/var/lib/puppet/lib/facter (and not in
/etc/puppet/modules/modulewithfact/lib/facter/test_fact.rb as by your
example).

At this point the puppet daemon is not able to find the fact and so it does not 
get executed correctly.
I'm curious to know why the problem didn't came up on your servers.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to puppet in Ubuntu.
https://bugs.launchpad.net/bugs/1076286

Title:
  Puppet agent not correcly configuring facts synch'd from master

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/puppet/+bug/1076286/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1076286] Re: Puppet agent not correcly configuring facts synch'd from master

2012-11-14 Thread Andrea Biancini
Robie, I tested it on Debian wheezy and the situation is exactly the same.
I will try and track the problem to signal it at the more appropriate level.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to puppet in Ubuntu.
https://bugs.launchpad.net/bugs/1076286

Title:
  Puppet agent not correcly configuring facts synch'd from master

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/puppet/+bug/1076286/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1076286] Re: Puppet agent not correcly configuring facts synch'd from master

2012-11-13 Thread Andrea Biancini
Robie, yes the problem is exactly the one you described.
The puppet daemon does not source /var/lib/puppet/lib/facter for facts and my 
proposed modification is a workaround to have it properly running.
Also the command puppet agent --test does not source the facts in 
/var/lib/puppet/lib/facter and this is not solved by the modification I 
proposed.

My proposal is a very quick fix to have the daemon properly running.
I thought that when running the puppet command from commandline the user could 
define FACTERLIB in his environment somehow.
Of course if you can find better solutions, they're very welcome.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to puppet in Ubuntu.
https://bugs.launchpad.net/bugs/1076286

Title:
  Puppet agent not correcly configuring facts synch'd from master

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/puppet/+bug/1076286/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1076286] [NEW] Puppet agent not correcly configuring facts synch'd from master

2012-11-08 Thread Andrea Biancini
Public bug reported:

Hi all,
I'm writing to signal a very easy to fix potential problem to your puppet 
package.
The package for the agent, as provided, does not permit to facts defined on the 
master to be correctly deployed and used on the agent side.

To reproduce the error, for example, I could define in the master a site.pp as 
follow:
node puppetclient {
  include modulewithfact

  file { '/tmp/puppettest':
ensure = present,
content = $test_fact,
  }
}
And a module, under modules/modulewithfact, that has under the lib/facter a 
file test_fact.rb as follows:
Facter.add(:test_fact) do
  confine :kernel = Linux
  setcode do
Content from the fact
  end
end
Given this configuration the expected behavior should be that the fact is 
deployed on every agent (of course if they enable pluginsync=true in the 
puppet.conf) and then properly executed.
So the file /tmp/puppettest should contain the string  Content from the fact.

This is not happening, with the default configuration, because the agent is not 
instructed to include in the facterlib path all the facts synchronized from the 
server.
To avoid this situation I simply added to the /etc/default/puppet file the 
following line:
FACTERLIB=/var/lib/puppet/lib/facter
which permits to include in the facterlib the folder where facts from the 
server are synchronized by the agent.

I am writing to propose you to add this line in the standard 
/etc/defatult/puppet file in the puppet package from further versions.
I hope my example and explaination is clear enough.

Thanks and regards,
Andrea

** Affects: puppet (Ubuntu)
 Importance: Undecided
 Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to puppet in Ubuntu.
https://bugs.launchpad.net/bugs/1076286

Title:
  Puppet agent not correcly configuring facts synch'd from master

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/puppet/+bug/1076286/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1076286] Re: Puppet agent not correcly configuring facts synch'd from master

2012-11-08 Thread Andrea Biancini
Hi, yes I know it is not needed to have a manifest file to propagate the fact 
to the node.
In fact the facter gets propagated and is available on the node machine, 
however whey I try to recall it from a manifest, the fact simply is not 
evaluated.

I try to better describe the problem by answering your questions and adding 
some informations.
Following your procedure:
1: already done
2: done
3: yes the fact is properly transmitted
4: I can correctly see the fact running facter --puppet on the node

I am using:
Ubuntu 12.04.1 LTS
puppet 2.7.11-ubuntu2.1
facter 1.6.5-1ubuntu2.1

However, for the use I would like to achieve with puppet, the fact the the 
command facter --puppet works correctly is not satisfactory.
In fact I would like the node to synchronize with the agent using the puppet 
daemon launched with
service puppet start.

In this case the facter on the node do not gets evaluated correctly.
To solve this problem I found that putting a value for the FACTERLIB including 
the folder where the facts are deployed from the master to the nodes, I would 
solve the error.
So I added this directive in the /etc/default/puppet file which is sourced in 
the /etc/init.d/puppet init script.

I hope you could test and reproduce the problem, using the fact from a manifest.
If you then have a better and more clean solution (instead of the one I 
proposed) I will be glad to accept it.
For the moment on my servers I will leave my modification which is working 
correctly and without evident problems.

Thanks,
A.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to puppet in Ubuntu.
https://bugs.launchpad.net/bugs/1076286

Title:
  Puppet agent not correcly configuring facts synch'd from master

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/puppet/+bug/1076286/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs