[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


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

2012-11-08 Thread Stig Sandbeck Mathisen
Hello, and thanks for reporting an issue with puppet.

Andrea Biancini andrea.bianc...@gmail.com writes:

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

You do not need a manifest in order to check if facts propagate from
master to nodes. Factsync takes place before the manifest is compiled.

1: Set pluginsync=true in /etc/puppet/puppet.conf on the node

2: Run puppet agent --test --noop on the node

3: If you have authenticated the node to the master, you should see the
   fact being transmitted.

4: Verify by:

   run facter --puppet on the node. Do you see your fact?

   check /var/lib/puppet/yaml/facts/node.yaml on the master, do you
   see the new fact there?

What is your puppet version, your facter version, and your ubuntu
version?

 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 don't think this is the correct fix. This will not have any effect if
you run puppet agent --test on the command line.

-- 
Stig Sandbeck Mathisen

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