Feature #11832

Puppet Module Tool (PMT) should have a upgrade command

Added by Kelsey Hightower 4 months ago. Updated about 1 month ago.

Status:Merged - Pending Release Start date:01/09/2012
Priority:Normal Due date:01/13/2012
Assignee:Kelsey Hightower % Done:

0%

Category:-
Target version:2.7.x
Affected Puppet version: Branch:https://github.com/kelseyhightower/puppet/tree/ticket/2.7.x/11832_PMT_should_have_an_upgrade_command
Keywords:geordi v1
Votes: 0

Description

The PMT should have an upgrade command that exhibits behavior as defined in the UX design doc located here: UX Design Doc


Related issues

related to Puppet - Feature #11805: Enhance Puppet Module Tool (PMT) install command Merged - Pending Release 01/31/2012
related to Puppet - Feature #11804: Enhance Puppet Module Tool (PMT) search command Closed 01/06/2012
related to Puppet - Feature #12253: Puppet module installs and upgrades should be atomic Accepted 01/27/2012

History

Updated by Kelsey Hightower 4 months ago

  • Branch set to https://github.com/kelseyhightower/puppet/tree/ticket/2.7.x/11832_PMT_should_have_an_upgrade_command

Updated by Kelsey Hightower 4 months ago

Pieter,

I ran into a couple of issues during the implementation of the PMT update command:

  • When upgrading modules with the command ‘puppet module update foo’, should we updated all versions of foo installed in all directories found in the module path?

yes

  • When upgrading modules with the command ‘puppet module update foo’, should we updated all modules with a subdirectory name ‘foo’ but no metadata under the modulepath?

No, we don’t do stuff with modules that don’t have metadata, but we should warn the user of what happened.

  • Module path ‘A’ could have foo install but the ‘forge name’ is puppetlabs-foo, Module path ‘B’ could have foo installed but the ‘forge name’ is kelseyhightower-foo.

    • Which one do we upgrade?
    • Which one do we request from the forge? kelseyhightower-foo or puppetlabs-foo? Currently you cannot request just request ‘foo’ from the forge.

      The upgrade command (and others) takes author-name (fully qualified), so this shouldn’t be an issue

  • When upgrading modules with the command ‘puppet module update foo’, should we install something even if nothing was there before? Can we upgrade something that is not installed?

No, error and tell them how they would run install

Updated by Matt Robinson 3 months ago

Here’s further clarification of upgrade. We should be able to reuse most of the install code, maybe just need to pass a few extra options to deal with —force behaving slightly differently between the two commands.

`puppet module upgrade`

The Story: "Upgrade lets me change the version of a module, without breaking the system."

Module not installed
  => Installed as if not installed
Module is installed
  Specified version installed
    No `--force` flag
      => Upgrade fails
    Provided `--force` flag
      => Upgraded as if older version
  Different version installed
    Installed module has no local changes
      Module has no dependencies
        => Installed module is overwritten by new module
      Module has dependencies
        Dependencies not installed
          => Installed module is overwritten by new module
          => All dependencies are installed alongside the module (same part of modulepath)
        Some dependencies installed (meeting requirements)
          => Installed module is overwritten by new module
          => Uninstalled dependencies are installed alongside the module
        Some dependencies installed (not meeting requirements)
          Dependency requirements overlap
            => Installed module is overwritten by new module
            => Uninstalled dependencies are installed alongside the module
            => Installed dependencies get upgraded
          Dependency requirements do not overlap
            => Upgrade fails
    Installed module has local changes
      No `--force` flag
        => Upgrade fails
      Provided `--force` flag
        => Upgraded as if no local changes

Other Nodes:

* Default version is `latest` / `best`.

Updated by Pieter van de Bruggen 2 months ago

  • Status changed from Accepted to In Topic Branch Pending Review

puppet module upgrade has been merged into the integration branch.

Updated by Pieter van de Bruggen 2 months ago

  • Keywords set to geordi v1

Updated by Kelsey Hightower about 1 month ago

  • Status changed from In Topic Branch Pending Review to Merged - Pending Release

Also available in: Atom PDF