Jira (PUP-8409) Puppet config print lists invalid value for environment_timeout when set to unlimited

5 views
Skip to first unread message

Josh Cooper (JIRA)

unread,
Jan 30, 2018, 8:00:03 PM1/30/18
to puppe...@googlegroups.com
Josh Cooper updated an issue
 
Puppet / Bug PUP-8409
Puppet config print lists invalid value for environment_timeout when set to unlimited
Change By: Josh Cooper
Fix Version/s: PUP 5.4.0
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.0.2#70111-sha1:88534db)
Atlassian logo

Past Haus (JIRA)

unread,
Jan 30, 2018, 8:00:03 PM1/30/18
to puppe...@googlegroups.com
Past Haus updated an issue
Change By: Past Haus
Summary: Puppet config print lists invalid  default  value for environment_timeout  when set to unlimited

Past Haus (JIRA)

unread,
Jan 30, 2018, 8:01:01 PM1/30/18
to puppe...@googlegroups.com
Past Haus updated an issue
When running {{puppet config print --all}} on the command line  with {{environment_timeout}} set to {{unlimited}} in {{puppet.conf}} , the  default  value for {{environment_timeout}} is listed as {{Infinity}}, which is not a valid setting (it can be an integer, 0 or {{unlimited}}). As a user if I saw this I would presume it was a valid setting.

When I try using {{Infinity}} as a setting value for {{environment_timeout}}, I get a not so helpful error message and stack trace.

{code}
puppet apply --environment_timeout=Infinity -e "notify{'foo':}"
/Users/matthaus/src/puppet/lib/puppet/settings/ttl_setting.rb:43:in `munge': Invalid 'time to live' format '"Infinity"' for parameter: environment_timeout (Puppet::Settings::ValidationError)
from /Users/matthaus/src/puppet/lib/puppet/settings/ttl_setting.rb:25:in `munge'
from /Users/matthaus/src/puppet/lib/puppet/settings.rb:1310:in `interpolate'
from /Users/matthaus/src/puppet/lib/puppet/settings.rb:1082:in `value_sym'
from /Users/matthaus/src/puppet/lib/puppet/settings.rb:1054:in `value'
from /Users/matthaus/src/puppet/lib/puppet/settings/environment_conf.rb:87:in `environment_timeout'
from /Users/matthaus/src/puppet/lib/puppet/environments.rb:414:in `entry'
from /Users/matthaus/src/puppet/lib/puppet/environments.rb:345:in `get'
from /Users/matthaus/src/puppet/lib/puppet/util/autoload.rb:131:in `module_directories'
from /Users/matthaus/src/puppet/lib/puppet/util/autoload.rb:166:in `search_directories'
from /Users/matthaus/src/puppet/lib/puppet/util/autoload.rb:100:in `files_to_load'
from /Users/matthaus/src/puppet/lib/puppet/util/autoload.rb:220:in `files_to_load'
from /Users/matthaus/src/puppet/lib/puppet/application.rb:212:in `available_application_names'
from /Users/matthaus/src/puppet/lib/puppet/util/command_line.rb:90:in `find_subcommand'
from /Users/matthaus/src/puppet/lib/puppet/util/command_line.rb:73:in `execute'
from /usr/bin/puppet:5:in `<main>'
{code}

Past Haus (JIRA)

unread,
Jan 30, 2018, 8:02:02 PM1/30/18
to puppe...@googlegroups.com
Past Haus updated an issue
When running {{puppet config print --all}} on the command line with {{environment_timeout}} set to {{unlimited}} in {{puppet.conf}}, the value for {{environment_timeout}} is listed as {{Infinity}}, which is not a valid setting (it can be an integer, 0 or {{unlimited}}). As a user if I saw this I would presume it was a valid setting.


When I try using {{Infinity}} as a setting value for {{environment_timeout}}, I get a not so helpful error message and stack trace.

{code}
puppet apply --environment_timeout=Infinity -e "notify{'foo':}"
/Users/matthaus/src/puppet/lib/puppet/settings/ttl_setting.rb:43:in `munge': Invalid 'time to live' format '"Infinity"' for parameter: environment_timeout (Puppet::Settings::ValidationError)
from /Users/matthaus/src/puppet/lib/puppet/settings/ttl_setting.rb:25:in `munge'
from /Users/matthaus/src/puppet/lib/puppet/settings.rb:1310:in `interpolate'
from /Users/matthaus/src/puppet/lib/puppet/settings.rb:1082:in `value_sym'
from /Users/matthaus/src/puppet/lib/puppet/settings.rb:1054:in `value'
from /Users/matthaus/src/puppet/lib/puppet/settings/environment_conf.rb:87:in `environment_timeout'
from /Users/matthaus/src/puppet/lib/puppet/environments.rb:414:in `entry'
from /Users/matthaus/src/puppet/lib/puppet/environments.rb:345:in `get'
from /Users/matthaus/src/puppet/lib/puppet/util/autoload.rb:131:in `module_directories'
from /Users/matthaus/src/puppet/lib/puppet/util/autoload.rb:166:in `search_directories'
from /Users/matthaus/src/puppet/lib/puppet/util/autoload.rb:100:in `files_to_load'
from /Users/matthaus/src/puppet/lib/puppet/util/autoload.rb:220:in `files_to_load'
from /Users/matthaus/src/puppet/lib/puppet/application.rb:212:in `available_application_names'
from /Users/matthaus/src/puppet/lib/puppet/util/command_line.rb:90:in `find_subcommand'
from /Users/matthaus/src/puppet/lib/puppet/util/command_line.rb:73:in `execute'
from /usr/bin/puppet:5:in `<main>'
{code}


The simple reproducer here is:

{code}
puppet config print --environment_timeout=unlimited environment_timeout
Infinity
{code}

Josh Cooper (JIRA)

unread,
Feb 3, 2018, 12:02:03 AM2/3/18
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Sprint: Platform Core Hopper
This message was sent by Atlassian JIRA (v7.5.1#75006-sha1:7df2574)
Atlassian logo

Kris Bosland (JIRA)

unread,
Feb 5, 2018, 12:56:02 PM2/5/18
to puppe...@googlegroups.com

Kris Bosland (JIRA)

unread,
Feb 5, 2018, 5:12:03 PM2/5/18
to puppe...@googlegroups.com

Kris Bosland (JIRA)

unread,
Feb 5, 2018, 6:53:02 PM2/5/18
to puppe...@googlegroups.com
Kris Bosland updated an issue
When running {{puppet config print --all}} on the command line with {{environment_timeout}} set to {{unlimited}} in {{puppet.conf}}, the value for {{environment_timeout}} is listed as {{Infinity}}, which is not a valid setting (it can be an a positive integer, 0 , or ` {{unlimited ` }}). As a user if I saw this I would presume it was a valid setting.

Josh Cooper (JIRA)

unread,
Feb 6, 2018, 2:27:02 AM2/6/18
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-8409
 
Re: Puppet config print lists invalid value for environment_timeout when set to unlimited

A similar issue is that puppet config print doesn't handle `array` setting types correctly. It outputs:

$ bundle exec puppet config print supported_checksum_types
bx puppet config print supported_checksum_types
md5
sha256
sha384
sha512
sha224
$ bundle exec puppet config print --all | grep supported_checksum_types
supported_checksum_types = ["md5", "sha256", "sha384", "sha512", "sha224"]

But none of those can be entered verbatim in puppet.conf as doing so results in:

$ bundle exec puppet config print --all | grep supported_checksum_types >> ~/.puppetlabs/etc/puppet/puppet.conf
$ cat ~/.puppetlabs/etc/puppet/puppet.conf
supported_checksum_types = ["md5", "sha256", "sha384", "sha512", "sha224"]
$ bundle exec puppet apply -e 'notify { $settings::supported_checksum_types: }'
Error: Could not initialize global default settings: Invalid value '["md5"' for parameter supported_checksum_types. Allowed values are 'md5', 'md5lite', 'sha256', 'sha256lite', 'sha384', 'sha512', 'sha224', 'sha1', 'sha1lite', 'mtime', 'ctime'

It seems like puppet config print should join array settings as a comma delimited list, without any quoting so that the following works.

$ cat ~/.puppetlabs/etc/puppet/puppet.conf
supported_checksum_types = md5, sha256, sha384, sha512, sha224
$ bundle exec puppet apply -e 'notify { $settings::supported_checksum_types: }'
Notice: Compiled catalog for XXX in environment production in 0.03 seconds
Notice: md5
Notice: /Stage[main]/Main/Notify[md5]/message: defined 'message' as 'md5'
Notice: sha256
Notice: /Stage[main]/Main/Notify[sha256]/message: defined 'message' as 'sha256'
Notice: sha384
Notice: /Stage[main]/Main/Notify[sha384]/message: defined 'message' as 'sha384'
Notice: sha512
Notice: /Stage[main]/Main/Notify[sha512]/message: defined 'message' as 'sha512'
Notice: sha224
Notice: /Stage[main]/Main/Notify[sha224]/message: defined 'message' as 'sha224'
Notice: Applied catalog in 0.02 seconds

Kenn Hussey (JIRA)

unread,
Feb 7, 2018, 3:33:04 PM2/7/18
to puppe...@googlegroups.com

Kenn Hussey (JIRA)

unread,
Feb 9, 2018, 1:23:04 PM2/9/18
to puppe...@googlegroups.com
Kenn Hussey commented on Bug PUP-8409
 
Re: Puppet config print lists invalid value for environment_timeout when set to unlimited

Kris Bosland are we still trying to get this into 5.3.5 / 5.4.0 or should it be retargeted at this point?

Kris Bosland (JIRA)

unread,
Feb 9, 2018, 1:45:03 PM2/9/18
to puppe...@googlegroups.com
Kris Bosland updated an issue
 
Change By: Kris Bosland
Fix Version/s: PUP 5.4.0
Fix Version/s: PUP 5.3.z

Kris Bosland (JIRA)

unread,
Feb 9, 2018, 1:47:03 PM2/9/18
to puppe...@googlegroups.com
Kris Bosland commented on Bug PUP-8409
 
Re: Puppet config print lists invalid value for environment_timeout when set to unlimited

Kenn Hussey, we have decided to retarget this, I'm not sure if the correct new version is available in JIRA yet.

Josh Cooper (JIRA)

unread,
Feb 9, 2018, 1:48:02 PM2/9/18
to puppe...@googlegroups.com
Josh Cooper updated an issue
 
Change By: Josh Cooper
Fix Version/s: PUP 5.3.z
Fix Version/s: PUP 5.4.z

Josh Cooper (JIRA)

unread,
Feb 12, 2018, 12:35:03 PM2/12/18
to puppe...@googlegroups.com

Kris Bosland (JIRA)

unread,
Feb 28, 2018, 6:55:02 PM2/28/18
to puppe...@googlegroups.com

Eric Delaney (JIRA)

unread,
Mar 7, 2018, 10:45:03 AM3/7/18
to puppe...@googlegroups.com
Eric Delaney commented on Bug PUP-8409

Kris Bosland can you add release notes

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

Kris Bosland (JIRA)

unread,
Mar 7, 2018, 2:18:03 PM3/7/18
to puppe...@googlegroups.com
Kris Bosland updated an issue
 
Change By: Kris Bosland
Release Notes Summary: The environment_timeout setting will print 'unlimited' when it is set to 'unlimited', and the environment_timeout from the config will be used when there is no environment to set this value.
Release Notes: Bug Fix

Eric Delaney (JIRA)

unread,
Mar 12, 2018, 5:10:04 PM3/12/18
to puppe...@googlegroups.com

Jorie Tappa (JIRA)

unread,
Mar 12, 2018, 5:16:04 PM3/12/18
to puppe...@googlegroups.com

John Duarte (JIRA)

unread,
Oct 21, 2019, 10:58:05 AM10/21/19
to puppe...@googlegroups.com
John Duarte updated an issue
Change By: John Duarte
QA Risk Assessment: Needs Assessment No Action
Reply all
Reply to author
Forward
0 new messages