Jira (PUP-9115) custom facts don't get compiled

2018-10-12 Thread Uwe Bartels (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Uwe Bartels commented on  PUP-9115  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: custom facts don't get compiled   
 

  
 
 
 
 

 
 Hi Jacob, believe me or test it. It works. But this is not the point of this ticket.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)  
 
 

 
   
 

  
 

  
 

   





-- 
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 https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-9115) custom facts don't get compiled

2018-09-12 Thread Uwe Bartels (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Uwe Bartels commented on  PUP-9115  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: custom facts don't get compiled   
 

  
 
 
 
 

 
 OK. I found the cause for this problem. if you configure the agent regarding puppetdb like the master with routes.yaml, puppetdb.conf and the corresponding entries in puppet.conf, then you see this behavior. For me the overall behavior is still a bug as the error message is completely misleading. Actuall I see more than one bug. 
 
I do configuration for the puppetserver in the configuration directory of the puppet agent /etc/puppetlabs/puppet not /etc/puppetlabs/puppetserver. Yes I know this my approach without reading documentation carefully. The main cause for this I see in the documentation: https://puppet.com/docs/puppetdb/5.2/puppetdb_connection.html Here you write (headline) "Configuring a Puppet/PuppetDB connection". puppet is the componen meant as puppet agent. Better write something like "Configuring a Puppet Server/PuppetDB connection". Then you write "The Puppet master makes HTTPS connections to PuppetDB to store catalogs...". But the Puppet Agent also makes HTTPS connections to the PuppetDB, so as I need to configure the puppetdb.conf in the puppet agent directory /etc/puppetlabs/puppet I assumed that I need to configure puppetdb on the agent too. So basically I utterly confused that I configure the puppetserver in /etc/puppetlabs/puppet partly. 
if the confguration of puppetdb on the agent wrong (I know of the puppdb config for puppet apply) then the agent should complain about the misconfiguration 
same for the puppetserver - I configured puppetdb access in the directory /etc/puppetlabs/puppetserver. If this is wrong puppetserver should complain about misconfiguration. 
 I don't want to start a general discussion here. I know that you are using open source components which need to be integrated like this and you want to keep the puppet open for kind of everything the open source component offers. But this makes the configuration hard or especially the search for errornous configuration.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
   

Jira (PUP-9115) custom facts don't get compiled

2018-09-11 Thread Uwe Bartels (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Uwe Bartels commented on  PUP-9115  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: custom facts don't get compiled   
 

  
 
 
 
 

 
 I've got a similar behavior on a different machine. Again puppet code execution uses different custom fact results than the locally called facter command. Different from behavior above is that the fact is not Undef it has a valid but wrong value. I changed in the facter code the string unknown to unknow1 and the facter value used by puppet is still the same. I hope that helps.   Best Regards, Uwe   custom facter:    
 
 
 
 
 # ===Fact: nrpe_user  
 
 
 # This fact determines the user, which runs the nrpe-daemon.  
 
 
 # It was defined for the sudo::nrpe class.  
 
 
 Facter.add("nrpe_user") do  
 
 
   setcode do  
 
 
 if File.exist?('/etc/nagios/nrpe.cfg')  
 
 
   File.open('/etc/nagios/nrpe.cfg') do |f|  
 
 
 line = f.grep(/^\s*nrpe_user/)[0]  
 
 
 line.match(/^\s*nrpe_user\s*=\s*(.+)\s*$/)[1]  
 
 
   end  
 
 
 else  
 
 
   "unknown"  
 
   

Jira (PUP-9115) custom facts don't get compiled

2018-09-07 Thread Uwe Bartels (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Uwe Bartels created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet /  PUP-9115  
 
 
  custom facts don't get compiled   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Affects Versions: 
 PUP 5.3.5  
 
 
Assignee: 
 Unassigned  
 
 
Components: 
 Puppet Server  
 
 
Created: 
 2018/09/07 4:07 AM  
 
 
Priority: 
  Normal  
 
 
Reporter: 
 Uwe Bartels  
 

  
 
 
 
 

 
 Puppet Version: 5.5.6 Puppet Server Version: 5.3.5 OS Name/Version: Ubuntu 16.04 LTS PuppetDB Version 5.2.4  custom fact don't get compiled. root@test-puppet04:~# puppet agent -t --noop --environment f20180907_fix_deprecated_code --tags netvault Info: Using configured environment 'f20180907_fix_deprecated_code' Info: Retrieving pluginfacts Info: Retrieving plugin Info: Retrieving locales Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Function Call, 'versioncmp' parameter 'b' expects a String value, got Undef (file: /etc/puppetlabs/code/environments/f20180907_fix_deprecated_code/modules/netvault/manifests/client/install.pp, line: 50, column: 6) on node test-puppet04.example.net Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run Changes: Events: Resources: Time: {{ Fact generation: 0.01}} {{ Node retrieval: 0.13}} {{ Plugin sync: 0.64}} {{ Last run: 1536316270}} {{ Total: 3.25}} Version: {{ Config: }} {{ Puppet: 5.5.6}} root@test-puppet04:~# facter --puppet --debug| netvault 2018-09-07 12:32:10.358615 INFO puppetlabs.facter - loading custom facts from /opt/puppetlabs/puppet/cache/lib/facter/netvault.rb. 2018-09-07 12:32:12.238808 DEBUG puppetlabs.facter - fact "netvault_architecture" has resolved to "64". 2018-09-07 12:32:12.248292 DEBUG puppetlabs.facter - fact "netvault_version" has resolved to "12001.04". netvault_architecture => 64 netvault_version => 12001.04 root@test-puppet04:~#