Jira (PUP-11321) Warning: #<Puppet::Transaction::Persistence since upgrade to puppet-agent 6.25.0

29 views
Skip to first unread message

Tibor Répási

unread,
Oct 15, 2021, 8:59:02 AM10/15/21
to puppe...@googlegroups.com
Tibor Répási updated an issue
 
Puppet / Bug PUP-11321
Warning: #<Puppet::Transaction::Persistence since upgrade to puppet-agent 6.25.0
Change By: Tibor Répási
Summary: {brief summary of issue} Warning: #<Puppet::Transaction::Persistence since upgrade to puppet-agent 6.25.0
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo

Josh Cooper (Jira)

unread,
Oct 20, 2021, 4:49:02 PM10/20/21
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-11321
 
Re: Warning: #<Puppet::Transaction::Persistence since upgrade to puppet-agent 6.25.0

There are a few different things going on here:

1. The yaml_settings module generates a YAML hash where the keys are arrays https://github.com/cataphract/puppet-yaml_settings/blob/bbd6a9210233be03d29b9d0fa423f3fdcdae7452/lib/puppet/type/yaml_settings.rb#L146-L147 That's allowed in the YAML specification, but not JSON:

$ bx ruby -rjson -e "puts JSON.parse('{[1] => 2}')"                     
Traceback (most recent call last):
	2: from -e:1:in `<main>'
	1: from /home/josh/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/json-2.5.1/lib/json/common.rb:216:in `parse'
/home/josh/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/json-2.5.1/lib/json/common.rb:216:in `parse': 809: unexpected token at '{[1] => 2}' (JSON::ParserError)

2. The prefix passed to ToDataSerializer is the string representation of the Persistence object, which causes the message to contain: <Puppet::Transaction::Persistence:0x00005598a2c1ebf8>. That should be fixed
3. There's a bug in the ToDataSerializer which loses track of the current path, so we get repeated elements in the warning message:

['resources']['Yaml_settings[cassandra::config]']['parameters']['values']['system_value'][0] contains a hash with an Array key. It will be converted to the String '["listen_address"]'
['resources']['Yaml_settings[cassandra::config]']['parameters']['values']['system_value'][0]['resources']['Yaml_settings[cassandra::config]']['parameters']['values']['system_value'][0] contains a hash with an Array key. It will be converted to the String '["broadcast_rpc_address"]'

Josh Cooper (Jira)

unread,
Oct 21, 2021, 12:49:02 PM10/21/21
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-11321

Tibor Répási to answer your question above, I would expect puppetserver to receive the same warning when sending the catalog to the agent, and likely puppetdb to have issues as well. I'm not sure I understand why the module is always creating an array of keys, especially since it's a one element array. I'd reach out to the module author about fixing that.

I'll leave this ticket open as there some things in puppet that need fixing.

Stefan (Jira)

unread,
Nov 2, 2021, 4:37:03 PM11/2/21
to puppe...@googlegroups.com
Stefan commented on Bug PUP-11321

We have a similar problem. Our yaml looks like this:

 

our::variables:
  error_level: 0
  intervals:
    86400:
      older_than:
        number: 1
        interval: 86400
      keep_per:
        number: 1
        interval: 604800

And we get this message:

Warning: #<Puppet::Transaction::Persistence:0x00005608a7a72eb0> ... contains a hash with an Integer key. It will be converted to the String '7'

 

Josh Cooper (Jira)

unread,
Nov 2, 2021, 8:29:02 PM11/2/21
to puppe...@googlegroups.com

Tibor Répási

unread,
Nov 10, 2021, 3:54:02 AM11/10/21
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Nov 10, 2021, 11:07:02 PM11/10/21
to puppe...@googlegroups.com
Josh Cooper updated an issue
 
Change By: Josh Cooper
Fix Version/s: PUP 6.26.0
Fix Version/s: PUP 7.13.0

Josh Cooper (Jira)

unread,
Nov 30, 2021, 8:22:03 PM11/30/21
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Nov 30, 2021, 8:22:03 PM11/30/21
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Nov 30, 2021, 8:22:03 PM11/30/21
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Dec 1, 2021, 1:31:02 PM12/1/21
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Dec 1, 2021, 1:36:02 PM12/1/21
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Release Notes: Bug Fix
Release Notes Summary: Fixes a regression introduced in 6.25.0 and 7.10.0 that caused a "Puppet::Transaction::Persistence" warning during each agent run.

Parker Leach (Jira)

unread,
Dec 7, 2021, 10:53:01 PM12/7/21
to puppe...@googlegroups.com
Parker Leach updated an issue
Change By: Parker Leach
Labels: docs_reviewed
This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d)
Atlassian logo

Austin Boyd (Jira)

unread,
Dec 16, 2021, 3:46:02 PM12/16/21
to puppe...@googlegroups.com
Austin Boyd updated an issue
Change By: Austin Boyd
Zendesk Ticket Count: 1
Zendesk Ticket IDs: 46570

Austin Boyd (Jira)

unread,
Dec 16, 2021, 3:46:02 PM12/16/21
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages