Jira (PUP-11474) puppet run after agent upgrade when use_cached_catalog is enabled results in error

6 views
Skip to first unread message

Taika Augustaitis (Jira)

unread,
Mar 2, 2022, 4:52:03 PM3/2/22
to puppe...@googlegroups.com
Taika Augustaitis updated an issue
 
Puppet / Bug PUP-11474
puppet run after agent upgrade when use_cached_catalog is enabled results in error
Change By: Taika Augustaitis
Summary: puppet run after agent upgrade when used_cache_catalog use_cached_catalog is enabled results in error
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d)
Atlassian logo

Taika Augustaitis (Jira)

unread,
Mar 2, 2022, 4:54:01 PM3/2/22
to puppe...@googlegroups.com
Taika Augustaitis updated an issue
*Puppet Version:* Upgrade of Puppet agent from 6.4.2 to 6.25.1  
*Puppet Server Version:* 6.25.1
*OS Name/Version:*
  reproduced issue behavior on Centos7

Describe steps to reproduce:
Standard install of 2019.1.0 and enable `use_cached_catalog` on an agent node

```
[agent]
use_cached_catalog = true
```

Upgrade PE to 2019.8.9 and next, upgrade the agent node following these instructions [https://puppet.com/docs/pe/2019.8/upgrading_agents.html#upgrade_agents_using_the_puppet_agent_module]. Run Puppet via the Orchestrator to update the node from 6.4.2 to 6.25.1. Then, run Puppet using the cached catalog on the agent `puppet agent -t`

```
[root@testnode ~]# puppet --version
6.4.2
[root@testnode ~]# puppet --version
6.25.1
[root@testnode~]# puppet agent -t --trace
Info: Using cached catalog from environment 'production'
Info: Using environment 'production'
Info: Loading facts
Error: Failed to apply catalog: Got nil value for name
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type.rb:687:in `[]='
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/component.rb:24:in `[]='
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type.rb:2522:in `set_name'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type.rb:2445:in `initialize'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/component.rb:31:in `initialize'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource.rb:533:in `new'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource.rb:533:in `to_ral'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:623:in `block in to_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:615:in `each'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:615:in `to_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:508:in `to_ral'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:118:in `block in convert_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:546:in `block in thinmark'
/opt/puppetlabs/puppet/lib/ruby/2.5.0/benchmark.rb:308:in `realtime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:545:in `thinmark'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:112:in `convert_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:393:in `run_internal'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:251:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:62:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:310:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:221:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:60:in `block (5 levels) in run'
/opt/puppetlabs/puppet/lib/ruby/2.5.0/timeout.rb:93:in `block in timeout'
/opt/puppetlabs/puppet/lib/ruby/2.5.0/timeout.rb:103:in `timeout'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:59:in `block (4 levels) in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent/locker.rb:21:in `lock'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:53:in `block (3 levels) in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:136:in `with_client'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:50:in `block (2 levels) in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:101:in `run_in_fork'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:49:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:179:in `controlled_run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:47:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/agent.rb:437:in `onetime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/agent.rb:397:in `block in run_command'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:62:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:310:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/agent.rb:393:in `run_command'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:382:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:735:in `exit_on_fail'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:382:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:143:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:77:in `execute'
/opt/puppetlabs/puppet/bin/puppet:5:in `<main>'
```

Resolve the error by running puppet again via the Orchestrator to apply additional changes

*Desired Behavior:* Upgrading agents following these instructions [https://puppet.com/docs/pe/2019.8/upgrading_agents.html#upgrade_agents_using_the_puppet_agent_module] should require one Puppet run to complete even when `use_cached_catalog` is enabled

*Actual Behavior:*

Requires two Puppet runs via the Orchestrator to resolve the issue

Taika Augustaitis (Jira)

unread,
Mar 2, 2022, 4:59:02 PM3/2/22
to puppe...@googlegroups.com
Taika Augustaitis updated an issue
*Puppet Version:* Upgrade of Puppet agent from 6.4.2 to 6.25.1  
*Puppet Server Version:* 6.25.1
*OS Name/Version:* reproduced behavior on Centos7


Describe steps to reproduce:
Standard install of 2019.1.0 and enable `use_cached_catalog` on an agent node

```
[agent]
use_cached_catalog = true
```

Upgrade PE to 2019.8.9 and next, upgrade the agent using the puppet_agent module and Run Puppet via the Orchestrator to update the node following from 6.4.2 to 6.25.1. The steps follow these instructions [https://puppet.com/docs/pe/2019.8/upgrading_agents.html#upgrade_agents_using_the_puppet_agent_module] . Run
 except run
Puppet via the Orchestrator to update Orhcestrator in the node from 6 console . 4.2 to 6.25.1.  
Then, run Puppet using the cached catalog on the agent `puppet agent -t` to result in `Error: Failed to apply catalog: Got nil value for name`
Resolve the error by running puppet again via the Orchestrator to apply additional changes configuration 

*Desired Behavior:* Upgrading agents following these instructions [https://puppet.com/docs/pe/2019.8/upgrading_agents.html#upgrade_agents_using_the_puppet_agent_module] should require one Puppet run to complete even when `use_cached_catalog` is enabled

*Actual Behavior:*

Requires two an additional Puppet runs via the Orchestrator run to resolve remove the issue error message

Josh Cooper (Jira)

unread,
Mar 28, 2022, 3:44:02 PM3/28/22
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-11474
 
Re: puppet run after agent upgrade when use_cached_catalog is enabled results in error

We decided to close this given it only occurs once and automatically resolves itself when the agent next runs.

Reply all
Reply to author
Forward
0 new messages