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

Bug #14306

puppet module tool version comparison issues.

Added by Nan Liu over 2 years ago. Updated 10 months ago.

Status:InvestigatingStart date:05/03/2012
Priority:NormalDue date:
Assignee:Ryan Coleman% Done:

0%

Category:-Spent time:-
Target version:-
Keywords: Affected URL:
Branch:

We've Moved!

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

This ticket is now tracked at: https://tickets.puppetlabs.com/browse/FORGE-51


Description

Manually installation from tar.gz of module prerelease to forge shows it’s having odd problems with version comparison. 0.0.3 is not greater than 0.0.2.

$ puppet module install puppetlabs-apt-0.0.3.tar.gz  --verbose
Preparing to install into /Users/nan/.puppet/modules ...
Downloading from http://forge.puppetlabs.com ...
Error: Could not install module 'puppetlabs-apt' (v0.0.3)
  No version of 'puppetlabs-apt' will satisfy dependencies
    You specified 'puppetlabs-apt' (v0.0.3)
    'puppetlabs-mongrodb' (v0.0.1) requires 'puppetlabs-apt' (>= 0.0.2)
    Use `puppet module install --force` to install this module anyway

Related issues

Related to Puppet Forge - Bug #14359: Puppet Module Install fails to resolve dependencies liste... Accepted 05/08/2012
Related to Puppet Labs Modules - Bug #15415: puppetlabs-ruby must be manually installed before puppetl... Closed 07/07/2012

History

#1 Updated by Kelsey Hightower over 2 years ago

  • Status changed from Unreviewed to Needs More Information
  • Assignee set to Nan Liu

Nan,

Can you give me the steps that gave you this error?

With the 2.7.14 tag checked out, I the following works for me:

$ puppet module install puppetlabs-mongodb
Preparing to install into /Users/kelseyhightower/.puppet/modules ...
Downloading from http://forge.puppetlabs.com ...
Installing -- do not interrupt ...
/Users/kelseyhightower/.puppet/modules
└─┬ puppetlabs-mongodb (v0.0.1)
  └─┬ puppetlabs-apt (v0.0.3)
    └── puppetlabs-stdlib (v2.3.1)

Delete puppetlabs-apt

$ puppet module uninstall puppetlabs-apt --force
Preparing to uninstall 'puppetlabs-apt' ...
Removed 'puppetlabs-apt' (v0.0.3) from /Users/kelseyhightower/.puppet/modules

Use the local puppetlabs-apt package to install

$ puppet module install puppetlabs-apt-0.0.3.tar.gz 
Preparing to install into /Users/kelseyhightower/.puppet/modules ...
Downloading from http://forge.puppetlabs.com ...
Installing -- do not interrupt ...
/Users/kelseyhightower/.puppet/modules
└── puppetlabs-apt (v0.0.3)

#2 Updated by Nan Liu over 2 years ago

  • Status changed from Needs More Information to Unreviewed
  • Assignee changed from Nan Liu to Kelsey Hightower

The reason you can’t reproduce it is because we actually pushed apt version 0.0.3 to forge. If you bump to version 0.0.4 in the Modulefile and use puppet module tool to build a version that’s not on forge:

$ puppet module build ./
Building /Users/nan/src/nodejs/modules/apt for release
pkg/puppetlabs-apt-0.0.4.tar.gz
$ puppet module uninstall puppetlabs-apt -f
Preparing to uninstall 'puppetlabs-apt' ...
Removed 'puppetlabs-apt' (v0.0.3) from /Users/nan/.puppet/modules
$ puppet module install puppetlabs-apt-0.0.4.tar.gz 
Preparing to install into /Users/nan/.puppet/modules ...
Downloading from http://forge.puppetlabs.com ...
Error: Could not install module 'puppetlabs-apt' (v0.0.4)
  No version of 'puppetlabs-apt' will satisfy dependencies
    You specified 'puppetlabs-apt' (v0.0.4)
    'puppetlabs-mongrodb' (v0.0.1) requires 'puppetlabs-apt' (>= 0.0.2)
    Use `puppet module install --force` to install this module anyway

I suspect this is because we pull the metadata from forge no matter what. I tried to create the puppet module output for Razor for a blog post before I uploaded the razor module to forge and made it public:

$ puppet module install puppetlabs-razor-0.1.0.tar.gz
Preparing to install into /Users/nan/.puppet/modules ...
Downloading from http://forge.puppetlabs.com ...
Error: Could not find release information for this module (puppetlabs/razor) (HTTP 404)
Error: Try 'puppet help module install' for usage

#3 Updated by Anonymous over 2 years ago

  • Status changed from Unreviewed to Investigating

#4 Updated by Kelsey Hightower over 2 years ago

Ok, I’ve seen this issue before. Nan try cleaning your cache:

$ puppet module clean

Let me know if that woks.

#5 Updated by Nan Liu over 2 years ago

Which version of puppet was clean added to puppet module?

$ puppet module clean
err: 'module' has no 'clean' action.  See `puppet help module`.
$ puppet --version
2.7.14
$ puppet help module
USAGE: puppet module  

This subcommand can find, install, and manage modules from the Puppet Forge,
a repository of user-contributed Puppet code. It can also generate empty
modules, and prepare locally developed modules for release on the Forge.

OPTIONS:
  --mode MODE                    - The run mode to use (user, agent, or master).
  --render-as FORMAT             - The rendering format to use.
  --verbose                      - Whether to log verbosely.
  --debug                        - Whether to log debug information.

ACTIONS:
  build        Build a module release package.
  changes      Show modified files of an installed module.
  generate     Generate boilerplate for a new module.
  install      Install a module from a repository or release archive.
  list         List installed modules
  search       Search a repository for a module.
  uninstall    Uninstall a puppet module.
  upgrade      Upgrade a puppet module.

See 'puppet man module' or 'man puppet-module' for full help.

#6 Updated by Ken Barber over 2 years ago

  • Category changed from modules to module tool

#7 Updated by Nigel Kersten about 2 years ago

  • Project changed from Puppet to Puppet Forge
  • Category deleted (module tool)
  • Assignee changed from Kelsey Hightower to Ryan Coleman

#8 Updated by Mathieu Mitchell over 1 year ago

The problem’s scope is wider than what is described. I would change the title to “puppet module install fetches metadata from puppetforge even when installing from an archive”.

Easy steps to reproduce the problem:

$ puppet module generate newcompany-newmodule
Notice: Generating module at /Users/mmitchell/puppetlabs-issue-14306/newcompany-newmodule
newcompany-newmodule
newcompany-newmodule/tests
newcompany-newmodule/tests/init.pp
newcompany-newmodule/spec
newcompany-newmodule/spec/spec_helper.rb
newcompany-newmodule/README
newcompany-newmodule/Modulefile
newcompany-newmodule/manifests
newcompany-newmodule/manifests/init.pp

$ puppet module build newcompany-newmodule
Notice: Building /Users/mmitchell/puppetlabs-issue-14306/newcompany-newmodule for release
Module built: /Users/mmitchell/puppetlabs-issue-14306/newcompany-newmodule/pkg/newcompany-newmodule-0.0.1.tar.gz

$ puppet module install newcompany-newmodule/pkg/newcompany-newmodule-0.0.1.tar.gz 
Notice: Preparing to install into /Users/mmitchell/.puppet/modules ...
Notice: Downloading from https://forge.puppetlabs.com ...
Error: Could not find release information for this module (newcompany/newmodule) (HTTP 410)
Error: Try 'puppet help module install' for usage

And details about my install:

$ gem list puppet
*** LOCAL GEMS ***
puppet (3.1.0)
puppetlabs_spec_helper (0.3.0)

#9 Updated by Alex Cline over 1 year ago

I also ran into this problem with a module I’ve just created. I haven’t uploaded it to the forge yet (I wanted to do some testing) and I’m unable to install from the release archive file I copied to the system.

#10 Updated by Anonymous 10 months ago

Redmine Issue #14306 has been migrated to JIRA:

https://tickets.puppetlabs.com/browse/FORGE-51

Also available in: Atom PDF