External fact script provided by module not parsing on CentOS6

36 views
Skip to first unread message

Roan O'Sullivan

unread,
Oct 5, 2015, 11:47:08 AM10/5/15
to Puppet Users
I think it's a permissions issue, but not sure how to best resolve. 

On CentOS6 the plugin sync sets file mode for external fact script (/var/opt/lib/pe-puppet/facts.d/myfacts.sh) to 0644, and then agent (or standalone puppet) reports that the file "parsed but returned an empty data set":

[root@foo ~]# puppet apply -e 'notice($mypkg_installed)' --environment development
Fact file /var/opt/lib/pe-puppet/facts.d/myfacts.sh was parsed but returned an empty data set
Notice: Scope(Class[main]):
Notice: Compiled catalog for foo.local in environment development in 0.01 seconds
Notice: Finished catalog run in 0.13 seconds
[root@foo ~]#

If I "chmod a+x" the script then the fact parses successfully:

[root@foo ~]# chmod a+x /var/opt/lib/pe-puppet/facts.d/myfacts.sh
[root@foo ~]# puppet apply -e 'notice($mypkg_installed)' --environment development
Notice: Scope(Class[main]): true
Notice: Compiled catalog for foo.local in environment development in 0.01 seconds
Notice: Finished catalog run in 0.14 seconds
[root@foo ~]#

But the agent will always reset the file mode back to 0644. 

If anyone has suggestions on either preventing Puppet agent from reverting the fact script's permissions to 0644, OR getting the parser to resolve the facts without making the script executable, would be much appreciated. Thanks.

Roan O'Sullivan

unread,
Oct 5, 2015, 12:36:38 PM10/5/15
to Puppet Users
Seems like this may be a regression: https://tickets.puppetlabs.com/browse/PUP-2705

PUP-2705 was closed and marked as fixed in PUP 3.6.2. However this same issue is occurring in PE 3.8.1.

Josh Cooper

unread,
Oct 5, 2015, 1:12:48 PM10/5/15
to puppet...@googlegroups.com
Hi Roan,

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/6f35823d-d57f-46e0-86cf-cc2897b39400%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Can you verify that the executable fact on the master is executable?

Josh

--
Josh Cooper
Developer, Puppet Labs

PuppetConf 2015
 is right around the corner! Join us October 5-9 in Portland, OR. Register now.

Roan O'Sullivan

unread,
Oct 5, 2015, 1:24:22 PM10/5/15
to Puppet Users
Hmmm ... seems like the issue here may be r10k deploy. I've explicitly set +x on the file in Git repo, but "r10k deploy environment" does not update the file permissions.
Reply all
Reply to author
Forward
0 new messages