[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-16 Thread Matthaus Owens
Andrea,
Can you post the output of your puppet run using `puppet agent -t --trace 
--debug` on the agent? That might help figure out what's going on.

-- 
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-15 Thread Matthaus Owens
Andrea,

The first example was master and agent on the same machine, so it found the 
module in the modulepath without pluginsync. The second example was agent and 
master on different machines.
Can you post the output of your puppet.conf and `puppet agent -t --trace 
--debug` on the agent? That might help figure out what's going on.

Here is the output from that second run.

# Cleanup
root@lucid-64:~# rm -rf /tmp/puppettest 
root@lucid-64:~# rm -rf /var/lib/puppet/lib/

# Puppet Run
root@lucid-64:~# puppet agent -t
info: Retrieving plugin
notice: /File[/var/lib/puppet/lib/facter]/ensure: created
notice: /File[/var/lib/puppet/lib/facter/test_fact.rb]/ensure: defined content 
as '{md5}fc59074ecb5d02756ee6c2095677bb92'
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 lucid-64.localdomain
info: Applying configuration version '1352931741'
notice: /Stage[main]//Node[default]/File[/tmp/puppettest]/ensure: created
notice: Finished catalog run in 0.03 seconds

# Correct content in file
root@lucid-64:~# cat /tmp/puppettest 
Content from the fact

# Correct facter in lib
root@lucid-64:~# 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-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-14 Thread Matthaus Litteken
I wasn't able to reproduce this on precise. I used the following
manifest to test the fact:

node default {
  file { '/tmp/puppettest':
ensure = present,
content = $test_fact,
  }
}

I had just the fact example you used in
(/etc/puppet/modules/modulewithfact/lib/facter/test_fact.rb)...

Facter.add(:test_fact) do
  confine :kernel = Linux
  setcode do
Content from the fact
  end
end

The puppet run was as follows...

puppet agent -t
info: Loading facts in 
/etc/puppet/modules/modulewithfact/lib/facter/test_fact.rb
info: Caching catalog for precise-64.localdomain
info: Applying configuration version '1353888521'
notice: /Stage[main]//Node[default]/File[/tmp/puppettest]/ensure: created
notice: Finished catalog run in 0.02 seconds

And the content was as expected.

cat /tmp/puppettest 
Content from the fact

-- 
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 Matthaus Owens
And running it from a remote agent had the correct content as well once
pluginsync=true was added to the agent's puppet.conf.

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


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

2012-11-14 Thread Robie Basak
Matthaus,

Thanks for trying. Did you use a puppetmaster in your test our was it
local only? I get the impression that it won't reproduce unless it is
the former.

-- 
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 Matthaus Owens
So if the problem is that custom facts don't get to agents by default
after installing the puppet package, a solution could be to add
pluginsync=true to the puppet.conf in the package, but that might be
surprising to users, depending on what behavior they expect.

Side note: pluginsync defaults to true in Puppet 3.0

-- 
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 Matthaus Owens
Robie,
I used a puppetmaster in both cases. In the first example the agent and master 
were on the same sytem, in the second they were on seperate systems.

-- 
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 Robie Basak
 Puppet sources additional directories for facts, (hence facter -p).

If I understand this report correctly, it sounds to me that the problem
is that puppet is not sourcing /var/lib/puppet/lib/facter for facts,
which is where factsync is writing them. Setting FACTERLIB in
/etc/default/puppet is a workaround for the daemon, but will not work
when calling puppet agent --test from the commandline, which should
work too (but presumably doesn't).

Is this an accurate interpretation? Have I understood your description
wrong? What is upstream's behaviour here?

** Changed in: puppet (Ubuntu)
   Importance: Undecided = Medium

-- 
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] Re: Puppet agent not correcly configuring facts synch'd from master

2012-11-13 Thread Robie Basak
Thanks Andrea.

I'm not sure about fixing /etc/default/puppet in Ubuntu as in my
judgement changing puppet agent --test to behave differently from the
daemon would be worse for users. For the time being, users can find this
bug and the associated workaround.

For a proper fix, the next step is to identify whether this bug is
present in the upstream project, introduced in the Debian packaging or
introduced in Ubuntu's modifications. If Ubuntu hasn't introduced the
problem, we should get a bug filed in the appropriate bug tracker. Are
you able to help with this, please?

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


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

2012-11-08 Thread Michael Stahnke
If I understand this report correctly, you're getting the exact
experience as designed.

Puppet sources additional directories for facts, (hence facter -p).

If you want standalone facter to source more directories you will always
have to modify FACTERLIB.  Where/how you choose to do that is up to you.

I would vote against your proposed change as it changes the expected
behavior of facter and puppet.

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