The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using https://tickets.puppetlabs.com. See the following page for information on filing tickets with JIRA:

Bug #17492

The parse_global_options method in lib/puppet/settings.rb doesn't properly find the index position for the run_mode argument.

Added by Sam Kottler over 3 years ago. Updated over 3 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:settings
Target version:3.0.2
Affected Puppet version:3.0.0 Branch:https://github.com/puppetlabs/puppet/pull/1275
Keywords:foreman compatibility

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com


Description

Steps to reproduce

$ bin/puppet apply --run_mode=user -e ''
Error: Could not intialize global default settings: no implicit conversion from nil to integer

Results in:

/usr/lib/ruby/gems/1.8/gems/puppet-3.0.1/lib/puppet/settings.rb:180:in `delete_at': no implicit conversion from nil to integer (TypeError)
    from /usr/lib/ruby/gems/1.8/gems/puppet-3.0.1/lib/puppet/settings.rb:180:in `parse_global_options'
    from /usr/lib/ruby/gems/1.8/gems/puppet-3.0.1/lib/puppet/util/command_line/puppet_option_parser.rb:83:in `call'
    from /usr/lib/ruby/gems/1.8/gems/puppet-3.0.1/lib/puppet/util/command_line/puppet_option_parser.rb:83:in `pass_only_last_value_on_to'
    from /usr/lib/ruby/gems/1.8/gems/puppet-3.0.1/lib/puppet/util/command_line/trollop.rb:432:in `call'
    from /usr/lib/ruby/gems/1.8/gems/puppet-3.0.1/lib/puppet/util/command_line/trollop.rb:432:in `parse'
    from /usr/lib/ruby/gems/1.8/gems/puppet-3.0.1/lib/puppet/util/command_line/trollop.rb:393:in `each'
    from /usr/lib/ruby/gems/1.8/gems/puppet-3.0.1/lib/puppet/util/command_line/trollop.rb:393:in `parse'
    from /usr/lib/ruby/gems/1.8/gems/puppet-3.0.1/lib/puppet/util/command_line/puppet_option_parser.rb:76:in `parse'
    from /usr/lib/ruby/gems/1.8/gems/puppet-3.0.1/lib/puppet/settings.rb:183:in `parse_global_options'
    from /usr/lib/ruby/gems/1.8/gems/puppet-3.0.1/lib/puppet/settings.rb:146:in `initialize_global_settings'
    from /vagrant/foreman/lib/foreman/default_settings/loader.rb:25:in `load'
    from /vagrant/foreman/config/initializers/foreman.rb:4
    from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.17/lib/active_support/dependencies.rb:236:in `load'
    from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.17/lib/active_support/dependencies.rb:236:in `load'
    from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.17/lib/active_support/dependencies.rb:225:in `load_dependency'
    from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.17/lib/active_support/dependencies.rb:597:in `new_constants_in'
    from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.17/lib/active_support/dependencies.rb:225:in `load_dependency'
    from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.17/lib/active_support/dependencies.rb:236:in `load'
    from /usr/lib/ruby/gems/1.8/gems/railties-3.0.17/lib/rails/engine.rb:201
    from /usr/lib/ruby/gems/1.8/gems/railties-3.0.17/lib/rails/engine.rb:200:in `each'
    from /usr/lib/ruby/gems/1.8/gems/railties-3.0.17/lib/rails/engine.rb:200
    from /usr/lib/ruby/gems/1.8/gems/railties-3.0.17/lib/rails/initializable.rb:25:in `instance_exec'
    from /usr/lib/ruby/gems/1.8/gems/railties-3.0.17/lib/rails/initializable.rb:25:in `run'
    from /usr/lib/ruby/gems/1.8/gems/railties-3.0.17/lib/rails/initializable.rb:50:in `run_initializers'
    from /usr/lib/ruby/gems/1.8/gems/railties-3.0.17/lib/rails/initializable.rb:49:in `each'
    from /usr/lib/ruby/gems/1.8/gems/railties-3.0.17/lib/rails/initializable.rb:49:in `run_initializers'
    from /usr/lib/ruby/gems/1.8/gems/railties-3.0.17/lib/rails/application.rb:134:in `initialize!'
    from /usr/lib/ruby/gems/1.8/gems/railties-3.0.17/lib/rails/application.rb:77:in `send'
    from /usr/lib/ruby/gems/1.8/gems/railties-3.0.17/lib/rails/application.rb:77:in `method_missing'
    from /vagrant/foreman/config/environment.rb:5
    from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.17/lib/active_support/dependencies.rb:242:in `require'
    from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.17/lib/active_support/dependencies.rb:242:in `require'
    from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.17/lib/active_support/dependencies.rb:225:in `load_dependency'
    from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.17/lib/active_support/dependencies.rb:597:in `new_constants_in'
    from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.17/lib/active_support/dependencies.rb:225:in `load_dependency'
    from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.17/lib/active_support/dependencies.rb:242:in `require'
    from /vagrant/foreman/config.ru:3
    from /usr/lib/ruby/gems/1.8/gems/rack-1.2.5/lib/rack/builder.rb:46:in `instance_eval'
    from /usr/lib/ruby/gems/1.8/gems/rack-1.2.5/lib/rack/builder.rb:46:in `initialize'
    from /vagrant/foreman/config.ru:1:in `new'
    from /vagrant/foreman/config.ru:1

Rolling a patch for this now and will submit a PR.

Impact Data

This is a blocker for Puppet 3 support in The Foreman.


Related issues

Related to Puppet - Feature #2935: Settings should use 'agent' and 'server' in addition to e... Closed 12/15/2009

History

#1 Updated by Dominic Cleal over 3 years ago

  • Status changed from Unreviewed to In Topic Branch Pending Review
  • Assignee set to Dominic Cleal
  • Branch set to https://github.com/puppetlabs/puppet/pull/1275

#2 Updated by Dominic Cleal over 3 years ago

Simple reproducer (test also in PR):

$ bin/puppet apply --run_mode=user -e ''
Error: Could not intialize global default settings: no implicit conversion from nil to integer

#3 Updated by Anonymous over 3 years ago

  • Description updated (diff)
  • Category set to settings
  • Target version set to 3.0.x
  • Keywords set to foreman compatibility

#4 Updated by Anonymous over 3 years ago

  • Target version changed from 3.0.x to 3.0.2

#5 Updated by Anonymous over 3 years ago

  • Status changed from In Topic Branch Pending Review to Merged - Pending Release
  • Assignee deleted (Dominic Cleal)

Merged into 3.0.x and master

This will be released in Puppet 3.0.2 and later version. Thanks for the contribution @domcleal, keep up the great work!

Merged in as 612f53a after amending the commit message.

$ git branch --contains 612f53a
  3.0.x
  domcleal-tickets/3.0.x/17492-runmode
* master

-Jeff

#6 Updated by Matthaus Owens over 3 years ago

  • Status changed from Merged - Pending Release to Closed

Released in Puppet 3.0.2-rc1

Also available in: Atom PDF