Jira (PUP-10648) puppet 6 agent doesn't honor usecacheonfailure setting

12 views
Skip to first unread message

Vadym Chepkov (Jira)

unread,
Aug 27, 2020, 12:28:04 PM8/27/20
to puppe...@googlegroups.com
Vadym Chepkov created an issue
 
Puppet / Bug PUP-10648
puppet 6 agent doesn't honor usecacheonfailure setting
Issue Type: Bug Bug
Affects Versions: PUP 6.17.0
Assignee: Unassigned
Created: 2020/08/27 9:27 AM
Priority: Normal Normal
Reporter: Vadym Chepkov

Puppet Version: 6.17.0 (PE2019.8.1)
Puppet Server Version:  2019.8.0.37
OS Name/Version: RHEL8

Had a case where /etc/resolv.conf was accidentally removed and puppet agent hasn't recovered it for unknown reason.  usecacheonfailure is set to true

 

 

Easy to reproduce, manage /etc/resolv.conf by puppet, remove the file, puppet agent will start failing and not recovering the file. The log entry :

 

Could not run Puppet configuration client: Could not select a functional puppet master from server_list:

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Vadym Chepkov (Jira)

unread,
Aug 27, 2020, 12:31:04 PM8/27/20
to puppe...@googlegroups.com
Vadym Chepkov commented on Bug PUP-10648
 
Re: puppet 6 agent doesn't honor usecacheonfailure setting

resolv.conf is managed by the tempate

# This file is managed by Puppet
<%- if $dns::domain { -%>
domain <%= $dns::domain %>
<% } -%>
<% if $dns::search { -%>
search <%= $dns::search.join(" ") %>
<% } -%>
<% $dns::nameservers.each |$ns| { -%>
nameserver <%= $ns %>
<% } -%>
<% if $dns::options { -%>
options <%= $dns::options.join(" ") %>
<% } -%>

Vadym Chepkov (Jira)

unread,
Aug 27, 2020, 12:38:04 PM8/27/20
to puppe...@googlegroups.com

FYI, if I remove server_list configuration from puppet.conf and replace it with random server config, file gets restored

 

 

Nate McCurdy (Jira)

unread,
Aug 27, 2020, 12:41:04 PM8/27/20
to puppe...@googlegroups.com
Nate McCurdy commented on Bug PUP-10648

This looks to be an issue with server_list as it works for me when just using server

[root@blank ~]# sudo puppet agent --onetime --no-daemonize --verbose --usecacheonfailure
Error: Request to https://master.vagrant:8140/puppet/v3 failed after 0.004 seconds: Failed to open TCP connection to master.vagrant:8140 (getaddrinfo: Name or service not known)
Wrapped exception:
Failed to open TCP connection to master.vagrant:8140 (getaddrinfo: Name or service not known)
Warning: Unable to fetch my node definition, but the agent run will continue:
Warning: No more routes to puppet
Info: Retrieving pluginfacts
Error: Request to https://master.vagrant:8140/puppet/v3 failed after 0.001 seconds: Failed to open TCP connection to master.vagrant:8140 (getaddrinfo: Name or service not known)
Wrapped exception:
Failed to open TCP connection to master.vagrant:8140 (getaddrinfo: Name or service not known)
Error: /File[/opt/puppetlabs/puppet/cache/facts.d]: Failed to generate additional resources using 'eval_generate': No more routes to fileserver
Error: Request to https://master.vagrant:8140/puppet/v3 failed after 0.002 seconds: Failed to open TCP connection to master.vagrant:8140 (getaddrinfo: Name or service not known)
Wrapped exception:
Failed to open TCP connection to master.vagrant:8140 (getaddrinfo: Name or service not known)
Error: /File[/opt/puppetlabs/puppet/cache/facts.d]: Could not evaluate: Could not retrieve file metadata for puppet:///pluginfacts: No more routes to fileserver
Info: Retrieving plugin
Error: Request to https://master.vagrant:8140/puppet/v3 failed after 0.001 seconds: Failed to open TCP connection to master.vagrant:8140 (getaddrinfo: Name or service not known)
Wrapped exception:
Failed to open TCP connection to master.vagrant:8140 (getaddrinfo: Name or service not known)
Error: /File[/opt/puppetlabs/puppet/cache/lib]: Failed to generate additional resources using 'eval_generate': No more routes to fileserver
Error: Request to https://master.vagrant:8140/puppet/v3 failed after 0.003 seconds: Failed to open TCP connection to master.vagrant:8140 (getaddrinfo: Name or service not known)
Wrapped exception:
Failed to open TCP connection to master.vagrant:8140 (getaddrinfo: Name or service not known)
Error: /File[/opt/puppetlabs/puppet/cache/lib]: Could not evaluate: Could not retrieve file metadata for puppet:///plugins: No more routes to fileserver
Info: Loading facts
Error: Request to https://master.vagrant:8140/puppet/v3 failed after 0.001 seconds: Failed to open TCP connection to master.vagrant:8140 (getaddrinfo: Name or service not known)
Wrapped exception:
Failed to open TCP connection to master.vagrant:8140 (getaddrinfo: Name or service not known)
Error: Could not retrieve catalog from remote server: No more routes to puppet
Info: Using cached catalog from environment 'production'
Info: Caching catalog for blank.vagrant
Info: Applying configuration version '1598546211'
Notice: Applied catalog in 0.27 seconds
Error: Request to https://master.vagrant:8140/puppet/v3 failed after 0.001 seconds: Failed to open TCP connection to master.vagrant:8140 (getaddrinfo: Name or service not known)
Wrapped exception:
Failed to open TCP connection to master.vagrant:8140 (getaddrinfo: Name or service not known)
Error: Could not send report: No more routes to report

And here's the same thing when using server_list, which reproduces your problem

[root@blank ~]# sudo puppet agent --onetime --no-daemonize --verbose --usecacheonfailure --server_list master.vagrant
Error: Could not run Puppet configuration client: Could not select a functional puppet master from server_list: 'master.vagrant'

Nate McCurdy (Jira)

unread,
Aug 27, 2020, 12:43:04 PM8/27/20
to puppe...@googlegroups.com
Nate McCurdy updated an issue
 
Change By: Nate McCurdy
Affects Version/s: PUP 6.18.0
Reply all
Reply to author
Forward
0 new messages