Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-8409

Puppet config print lists invalid value for environment_timeout when set to unlimited

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 5.5.0
    • Component/s: None
    • Labels:
      None
    • Release Notes:
      Bug Fix
    • 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.
    • QA Risk Assessment:
      Needs Assessment

      Description

      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 a positive 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.

      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>'
      

      The simple reproducer here is:

      puppet config print --environment_timeout=unlimited environment_timeout
      Infinity
      

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  jorie Jorie Tappa
                  Reporter:
                  matthaus Past Haus
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: