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

"puppet module upgrade" ignores changes if a module is upgraded as dependency

    Details

    • Type: Bug
    • Status: Ready for Engineering
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: PUP 4.3.2
    • Fix Version/s: None
    • Component/s: PMT
    • Labels:
      None
    • Environment:

      Ubuntu Trusty
      package puppet-agent 1.3.5-1trusty
      package puppetserver 2.2.1-1puppetlabs1

    • Template:
    • Team:
      Puppet Developer Experience

      Description

      Hi,

      I have a personal module (installed from a personal forge) that I have changed locally directly in the puppetserver. So I have this:

      ~# puppet module changes /etc/puppetlabs/code/environments/production/modules/raid/
      Warning: 1 files modified
      manifests/init.pp
      

      In this case, the command puppet module upgrage flaf-raid fails and, personally, this behavior seems to be a very good thing:

      ~# puppet module upgrade flaf-raid
      Notice: Preparing to upgrade 'flaf-raid' ...
      Notice: Found 'flaf-raid' (v0.1.5) in /etc/puppetlabs/code/environments/production/modules ...
      Error: Could not upgrade module 'flaf-raid' (v0.1.5 -> latest)
        Installed module has had changes made locally
          Use `puppet module upgrade --ignore-changes` to upgrade this module anyway
      

      But the problem is when the module is upgraded by the play of module dependencies. For instance, I have a module flaf-role_generic (installed via my personal forge too) and the version 0.1.10 of this module, not yet installed in my puppetserver, needs the module flaf-raid version 0.1.6 exactly. The problem is: when I upgrade the module flaf-role_generic, the module flaf-raid is upgraded automatically without error:

      ~# puppet module upgrade flaf-role_generic
      Notice: Preparing to upgrade 'flaf-role_generic' ...
      Notice: Found 'flaf-role_generic' (v0.1.9) in /etc/puppetlabs/code/environments/production/modules ...
      Notice: Downloading from http://puppetforge.lss1.backbone.education:8080 ...
      Notice: Upgrading -- do not interrupt ...
      /etc/puppetlabs/code/environments/production/modules
      └─┬ flaf-role_generic (v0.1.9 -> v0.1.10)
        └── flaf-raid (v0.1.5 -> v0.1.6)
      

      If a "direct" upgrade is impossible when a module has had changes made locally, it seems that an upgrade "as dependency" should be impossible too.

      Regards.
      François Lafont

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                Unassigned
                Reporter:
                flaf Francois Lafont
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Zendesk Support