Jira (FACT-696) facts.d module external facts get put in client dir which facter doesn't look at by default
Title: Message Title Josh Cooper commented on FACT-696 Re: facts.d module external facts get put in client dir which facter doesn't look at by default Thanks David Gardner. So given the future direction of FACT-96, I'm going to close this ticket as will-not-fix. /cc Kylo Ginsberg, Peter Huene Add Comment This message was sent by Atlassian JIRA (v6.3.10#6340-sha1:7ea293a) -- You received this message because you are subscribed to the Google Groups Puppet Bugs group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (FACT-696) facts.d module external facts get put in client dir which facter doesn't look at by default
Title: Message Title David Gardner commented on FACT-696 Re: facts.d module external facts get put in client dir which facter doesn't look at by default puppet facts find hostname does show this information so this looks like a fine replacement. Many thanks! Add Comment This message was sent by Atlassian JIRA (v6.3.10#6340-sha1:7ea293a) -- You received this message because you are subscribed to the Google Groups Puppet Bugs group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (FACT-696) facts.d module external facts get put in client dir which facter doesn't look at by default
Title: Message Title Josh Cooper commented on FACT-696 Re: facts.d module external facts get put in client dir which facter doesn't look at by default Note we are planning on deprecating the ability to run facter --puppet, see FACT-96, which is effectively what this ticket is requesting. I would be interested to know if puppet fact find returns the information you're already looking for. Add Comment This message was sent by Atlassian JIRA (v6.3.10#6340-sha1:7ea293a) -- You received this message because you are subscribed to the Google Groups Puppet Bugs group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (FACT-696) facts.d module external facts get put in client dir which facter doesn't look at by default
Title: Message Title Josh Cooper updated an issue Facter / FACT-696 facts.d module external facts get put in client dir which facter doesn't look at by default Change By: Josh Cooper Assignee: JoshCooper KyloGinsberg Add Comment This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups Puppet Bugs group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (FACT-696) facts.d module external facts get put in client dir which facter doesn't look at by default
Title: Message Title Josh Cooper commented on an issue Re: facts.d module external facts get put in client dir which facter doesn't look at by default David Gardner hmm, so I see the same behavior that you do, ie external facts are available when executing puppet, but not when executing facter, even when the -p argument is used: [root@centos64-x64 facts.d]# puppet agent -t Info: Retrieving pluginfacts Notice: /File[/var/lib/puppet/facts.d/hyperthreading.sh]/ensure: defined content as '{md5}242e6945dbb4817aa0d30e58fb3b788b' Info: Retrieving plugin Info: Loading facts Info: Caching catalog for centos64-x64.localdomain Info: Applying configuration version '1412013273' Notice: Finished catalog run in 0.03 seconds [root@centos64-x64 facts.d]# puppet apply -e 'notice($hyperthreading)' Notice: Scope(Class[main]): 1
Jira (FACT-696) facts.d module external facts get put in client dir which facter doesn't look at by default
Title: Message Title David Gardner updated an issue Facter / FACT-696 facts.d module external facts get put in client dir which facter doesn't look at by default Change By: David Gardner Assignee: DavidGardner JoshCooper Add Comment This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups Puppet Bugs group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (FACT-696) facts.d module external facts get put in client dir which facter doesn't look at by default
Title: Message Title David Gardner commented on an issue Re: facts.d module external facts get put in client dir which facter doesn't look at by default (These are from the original example I've been trying this with) It's executable for puppet and root: ``` ls -la /var/lib/puppet/facts.d/ total 12 drwxr-xr-x 2 root root 4096 Sep 1 14:40 . drwxr-xr-x 18 puppet puppet 4096 Jun 9 22:09 .. -rwxr-xr-x 1 root root 342 Sep 1 14:40 hyperthreading.sh ``` And an strace on the facter run shows that it doesn't look in `/var/lib/puppet/facts.d` where puppet is placing this for a module-provided fact, or for any sh scripts there: ``` strace facter -p hyperthreading 21 | grep hyper execve(/usr/bin/facter, [facter, -p, hyperthreading], [/* 27 vars */]) = 0 stat(/usr/lib/ruby/site_ruby/1.8/facter/hyperthreading.rb, 0x7fffd2c9dc70) = -1 ENOENT (No such file or directory) stat(/var/lib/puppet/lib/facter/hyperthreading.rb, 0x7fffd2c9dc70) = -1 ENOENT (No such file or directory) strace facter -p hyperthreading 21 | grep facts.d open(/etc/facter/facts.d, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3 open(/etc/puppetlabs/facter/facts.d, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = -1 ENOENT (No such file or directory) So: Is the puppet agent placing these files in the wrong location? Or, Should facter be looking in the puppet facts.d sync location? Or, Should I always be using the --external-dir option to facter to get these facts? When running puppet via strace and following forks I see it look at and then write the file into `/var/lib/puppet/facts.d` and not `/var/lib/puppet/facts` as facter does. All of these are being run as the same user (root) for these tests. Add Comment
Jira (FACT-696) facts.d module external facts get put in client dir which facter doesn't look at by default
Title: Message Title David Gardner commented on an issue Re: facts.d module external facts get put in client dir which facter doesn't look at by default [Do I assign this back now or will it be seen by you watching it?] Add Comment Facter / FACT-696 facts.d module external facts get put in client dir which facter doesn't look at by default Fact scripts placed in the recommended path of MODULEPATH/MODULE/facts.d/ get added to clients into the /var/lib/puppet/facts.d directory, but then this directory is only searched for .rb ruby fact snippets by default. If facter is run explicitly as: facter --external-dir /var/lib/puppet/facts.d/ factname ..then this works fine, as does l... This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups Puppet Bugs group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (FACT-696) facts.d module external facts get put in client dir which facter doesn't look at by default
Title: Message Title Josh Cooper updated an issue Facter / FACT-696 facts.d module external facts get put in client dir which facter doesn't look at by default Change By: Josh Cooper Assignee: EricSorenson DavidGardner Add Comment This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups Puppet Bugs group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (FACT-696) facts.d module external facts get put in client dir which facter doesn't look at by default
Title: Message Title Josh Cooper commented on an issue Re: facts.d module external facts get put in client dir which facter doesn't look at by default David Gardner It sounds like the external executable fact does not have the execute mode bit set within the module. The execute bit must be set in the module (for owner, group, etc), and puppet will preserve the mode when copying the fact to the /var/lib/puppet/facts.d directory. If the execute bit is not set, then puppet will copy the fact, but will not be able to execute it. I'm guessing it works when you run facter --external-dir ... because the user you are running facter as does have permission to execute the script? Add Comment Facter / FACT-696 facts.d module external facts get put in client dir which facter doesn't look at by default Fact scripts placed in the recommended path of MODULEPATH/MODULE/facts.d/ get added to clients into the /var/lib/puppet/facts.d directory, but then this directory is only searched for .rb ruby fact snippets by default. If facter is run explicitly as: facter --external-dir /var/lib/puppet/facts.d/ factname ..then this works fine, as does l... This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede)
Jira (FACT-696) facts.d module external facts get put in client dir which facter doesn't look at by default
Title: Message Title David Gardner commented on an issue Re: facts.d module external facts get put in client dir which facter doesn't look at by default (found by adding a shell-script fact to module/facts.d/fact.sh, which then syncs to the given directory on the client but isn't picked up by factor without the external-dir option) Add Comment Facter / FACT-696 facts.d module external facts get put in client dir which facter doesn't look at by default Fact scripts placed in the recommended path of MODULEPATH/MODULE/facts.d/ get added to clients into the /var/lib/puppet/facts.d directory, but then this directory is only searched for .rb ruby fact snippets by default. If facter is run explicitly as: facter --external-dir /var/lib/puppet/facts.d/ factname ..then this works fine, as does l... This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups Puppet Bugs group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at
Jira (FACT-696) facts.d module external facts get put in client dir which facter doesn't look at by default
Title: Message Title David Gardner created an issue Facter / FACT-696 facts.d module external facts get put in client dir which facter doesn't look at by default Issue Type: Bug Affects Versions: 2.2.0 Assignee: Eric Sorenson Created: 01/Sep/14 8:01 AM Environment: Facter 2.2.0 Puppet 3.6.2 CentOS 6.5 Priority: Normal Reporter: David Gardner Fact scripts placed in the recommended path of MODULEPATH/MODULE/facts.d/ get added to clients into the /var/lib/puppet/facts.d directory, but then this directory is only searched for .rb ruby fact snippets by default. If facter is run explicitly as: facter --external-dir /var/lib/puppet/facts.d/ factname ..then this works fine, as does lookup of the facts in puppet manifests. However, this seems non-sensical and that the facter default should be to look in the directory which fact scripts are placed into automatically; especially as this is the recommended method of adding external script facts via module magic sync rather than placing them into /etc/facter/facts.d explicitly.