Jira (PUP-684) Namevar over 1024 characters is not caught and results in invalid yaml with accompanying errors

1 view
Skip to first unread message

Jochen Häberle (JIRA)

unread,
Jan 9, 2015, 5:58:30 AM1/9/15
to puppe...@googlegroups.com
Jochen Häberle commented on Bug PUP-684
 
Re: Namevar over 1024 characters is not caught and results in invalid yaml with accompanying errors

I can confirm this when handling ssh-keys as namevars, which is rather a rather common basic example around the Internet and in several books.
It is very common that this gives you errors on every agent run like:

  1. puppet agent -t
    Notice: Ignoring --listen on onetime run
    Error: Checksumfile /var/lib/puppet/state/state.yaml is corrupt ((/var/lib/puppet/state/state.yaml): could not find expected ':' while scanning a simple key at line 804 column 3); replacing

But those do not really do any harm.

But now I have one host that throws the mentioned error in this ticket. On every puppet run:

puppet --version
2.7.23

puppet agent -t
notice: Ignoring --listen on onetime run
info: Caching catalog for monster.sensano.com
info: Applying configuration version '1420798929'
notice: /Stage[main]/Apt::Update/Exec[apt_update]/returns: executed successfully
notice: Finished catalog run in 14.29 seconds
err: Could not send report: Error 400 on SERVER: (<unknown>): could not find expected ':' while scanning a simple key at line 2262 column 5

Despite the success notice, which turns up on any run, too, I think the puppet agent run works as expected, but the master does not receive any reports which makes the management of this host rather problematic.

Is there anything known how to circumvent if not fix this situation on the master? A workaround?

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.3.10#6340-sha1:7ea293a)
Atlassian logo

Henrik Lindberg (JIRA)

unread,
Jan 9, 2015, 8:08:22 AM1/9/15
to puppe...@googlegroups.com

The title of this ticket suggests that a solution is to error when an attempt is made to set a title that will cause it to result in yaml keys that are over the limit. Do you agree that is the right approach to solving this problem?

Henrik Lindberg (JIRA)

unread,
Jan 9, 2015, 8:09:29 AM1/9/15
to puppe...@googlegroups.com

Jochen Häberle (JIRA)

unread,
Jan 9, 2015, 8:43:25 AM1/9/15
to puppe...@googlegroups.com
Jochen Häberle commented on Bug PUP-684
 
Re: Namevar over 1024 characters is not caught and results in invalid yaml with accompanying errors

From what I read on the Internet searching this subject, yes I agree. It seems the YAML-Specs has a limit on String-Lengths that gets enforced in Ruby 1.9.3 and was ignored in earlier versions due to a change of the YAML-Parser. This seems to make sense.

Jochen Häberle (JIRA)

unread,
Jan 9, 2015, 1:42:33 PM1/9/15
to puppe...@googlegroups.com

Preparing my latest comment, I saw that the agent giving problems was running the debian version of Puppet 2.7.23 for unknown reason. Checking with Foreman, this machine really was the only one out of over 30 with that Puppet-Version.
We had a bit of a trouble to get the machine to upgrade to the Puppetlabs supplied Version 3.7.3. At last we uninstalled Puppet and installed it again. This forced us to generate a new key certificate for the host. After that the mentioned problem went away, the new reports come in and are added in the history to those of the time before we had those problems.

The problem on our side was either solved by upgrading the agent to Puppet 3.7.3 or by readding the host to Foreman/Puppetmaster.

i think it was probably solved by upgrading as I tried to delete and readd the host before which was not possible, at least not from Foreman.

Henrik Lindberg (JIRA)

unread,
Sep 7, 2016, 6:14:09 PM9/7/16
to puppe...@googlegroups.com
Henrik Lindberg updated an issue
Change By: Henrik Lindberg
Team: Puppet Developer Support
This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe)
Atlassian logo

Sean McDonald (JIRA)

unread,
May 16, 2017, 1:13:03 PM5/16/17
to puppe...@googlegroups.com

Sean McDonald (JIRA)

unread,
May 16, 2017, 1:13:05 PM5/16/17
to puppe...@googlegroups.com

Josh Cooper (JIRA)

unread,
May 16, 2017, 1:14:05 PM5/16/17
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-684
 
Re: Namevar over 1024 characters is not caught and results in invalid yaml with accompanying errors

Longer term we want to stop storing state on the agent using YAML, and instead to use JSON. We weren't able to make that change in Puppet 5.

Moses Mendoza (JIRA)

unread,
May 18, 2017, 1:46:51 PM5/18/17
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Jan 26, 2021, 3:26:03 PM1/26/21
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-684
 
Re: Namevar over 1024 characters is not caught and results in invalid yaml with accompanying errors

This is no longer reproducible given 6.19. We've also moved to JSON in puppet 7, so I'm going to close this:

? Notify[ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff]

This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages