Bug #13512

If a module is installed with puppetversion different from the version of puppet used, puppet module commands don't work

Added by Matt Robinson about 1 year ago. Updated about 1 year ago.

Status:AcceptedStart date:03/29/2012
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Affected Puppet version: Branch:
Keywords:

Description

If you’re using Puppet version 2.7.12 and install a module that has in the metadata.json "puppetversion": 2.7.11, then puppet module commands blow up. This means you can’t use uninstall to get rid of it, list to show you the problem, or install any new modules. You can modify the metadata.json to either have the exact puppet version you’re using, or remove the puppetversion entry from the json file.

We should probably call out that the puppet version isn’t a match when we call puppet module list, but not raise an error and prevent anything else from happening.

% puppet module uninstall tdfischer-rsyslog
Preparing to uninstall 'tdfischer-rsyslog' ...
Error: Module rsyslog is only compatible with Puppet version 2.7.11, not 2.7.12
/Users/matthewrobinson/work/puppet/lib/puppet/module.rb:284:in `validate_puppet_version'
/Users/matthewrobinson/work/puppet/lib/puppet/module.rb:63:in `initialize'
/Users/matthewrobinson/work/puppet/lib/puppet/node/environment.rb:134:in `new'
/Users/matthewrobinson/work/puppet/lib/puppet/node/environment.rb:134:in `modules_by_path'
/Users/matthewrobinson/work/puppet/lib/puppet/node/environment.rb:133:in `map'
/Users/matthewrobinson/work/puppet/lib/puppet/node/environment.rb:133:in `modules_by_path'
/Users/matthewrobinson/work/puppet/lib/puppet/node/environment.rb:129:in `chdir'
/Users/matthewrobinson/work/puppet/lib/puppet/node/environment.rb:129:in `modules_by_path'
/Users/matthewrobinson/work/puppet/lib/puppet/node/environment.rb:128:in `each'
/Users/matthewrobinson/work/puppet/lib/puppet/node/environment.rb:128:in `modules_by_paialize'
/Users/matthewrobinson/work/puppet/lib/puppet/node/environment.rb:134:in `new'
/Users/matthewrobinson/work/puppet/lib/puppet/node/environment.rb:134:in `modules_by_path'
/Users/matthewrobinson/work/puppet/lib/puppet/node/environment.rb:133:in `map'
/Users/matthewrobinson/work/puppet/lib/puppet/node/environment.rb:133:in `moduson/work/puppet/lib/puppet/face/module/uninstall.rb:71:in `uninstall implementation, required on Ruby 1.8'
/Users/matthewrobinson/work/puppet/lib/puppet/interface/action.rb+eval[wrapper]:207:in `__send__'
/Users/matthewrobinson/work/puppet/lib/puppet/interface/action.rb+eval[wrapper]:207:in `uninstall'
/Users/matthewrobinson/work/puppet/lib/puppet/application/face_base.rb:242:in `send'
/Users/matthewrobinson/work/puppet/lib/puppet/application/face_base.rb:242:in `main'
/Users/matthewrobinson/work/puppet/lib/puppet/application.rb:317:in `run_command'
/Users/matthewrobinson/work/puppet/lib/puppet/application.rb:309:in `run'
/Users/matthewrobinson/work/puppet/lib/puppet/application.rb:416:in `hook'
/Users/matthewrobinson/work/puppet/lib/puppet/application.rb:309:in `run'
/Users/matthewrobinson/work/puppet/lib/puppet/application.rb:407:in `exit_on_fail'
/Users/matthewrobinson/work/puppet/lib/puppet/application.rb:309:in `run'
/Users/matthewrobinson/work/puppet/lib/puppet/util/command_line.rb:69:in `execute'
/Users/matthewrobinson/work/puppet/bin/puppet:4

Related issues

Related to Puppet - Bug #13513: If you have a module with metadata, but the metadata does... Accepted 03/29/2012

History

#1 Updated by Matt Robinson about 1 year ago

  • Description updated (diff)

Also available in: Atom PDF