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

The module tool won't solve some dependencies without --force or --ignore-dependencies

    Details

    • Type: Bug
    • Status: Accepted
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: PUP 6.8.1
    • Fix Version/s: None
    • Component/s: PMT
    • Labels:
      None
    • Template:
      PUP Bug Template
    • Master OS:
      RHEL 7 (x86_64)
    • Team:
      Coremunity
    • Sprint:
      Coremunity Grooming
    • Method Found:
      Needs Assessment
    • QA Risk Assessment:
      Needs Assessment

      Description

      Puppet Version: 6.8.1
      Puppet Server Version: 6.5.0
      OS Name/Version: Red Hat Enterprise Linux Server 7.4

      The module tool refuses to perform valid module upgrades under some circumstances, unless the --force or --ignore-dependencies option is applied.  Even --ignore-dependencies does not suffice in some cases.  Specifically, it seems unwilling to perform an upgrade across a major version of the specified module if that requires an upgrade even of the minor version of one of that module's dependencies.  Alternatively, the tool's objection might be to performing a set of upgrades that are valid as a group, but which cannot be broken down into a sequence of separate, individually-valid upgrades.

      The particular case in which I experienced this can be reproduced like so:

      1. Start with a clean install of Puppet 6.8.1 and puppetserver 6.5.0 (I used the Puppet, Inc. RPMs, installed via yum).
      2. Install version 6.3.0 of puppetlabs-apt via the module tool
      3. Install version 2.1.2 of puppetlabs-puppet_agent via the module tool
      4. Attempt to upgrade puppetlabs-puppet_agent to version 2.2.0 via the module tool (fails on unresolvable dependencies)
      5. Attempt to upgrade puppetlabs-apt to version 7.1.0 via the module tool (fails on unresolvable dependencies)

      One should not need to use --force or --ignore-dependencies to upgrade from one set of module versions in which all dependencies are satisfied to another set of module versions in which all dependencies are satisfied.

      Desired Behavior:

      The module tool should be willing to perform upgrades such as those described without using --force or --ignore-dependencies.  In particular, it should be willing to perform any combination of minor-version upgrades in service to an upgrade of the module named on the command line, so long as it results in a final state in which all dependencies are satisfied.  Use of --force or --ignore-dependencies is not desirable here because it does not automatically solve dependencies, and it can (and often does) produce a situation in which dependencies indeed are not fully satisfied.

      It would be acceptable, albeit not ideal for this purpose, to require use of a new, different command-line argument.

      Actual Behavior:

      Here's an example of the observed behavior.  Specific module versions are expressed via --version options to ensure reproducibility.  The target versions for the upgrade commands reflect the latest versions of the modules involved as of the time of this report, and at this time, the upgrade failures can also be reproduced without specifying target module versions.

      Preparing the environment ...

      # puppet module list
      /etc/puppetlabs/code/environments/production/modules (no modules installed)
      /etc/puppetlabs/code/modules (no modules installed)
      /opt/puppetlabs/puppet/modules (no modules installed)

      # puppet module install puppetlabs-apt --version=6.3.0
      Notice: Preparing to install into /etc/puppetlabs/code/environments/production/modules ...
      Notice: Downloading from https://forgeapi.puppet.com ...
      Notice: Installing – do not interrupt ...
      /etc/puppetlabs/code/environments/production/modules
      └─┬ puppetlabs-apt (v6.3.0)
      ├── puppetlabs-stdlib (v5.2.0)
      └── puppetlabs-translate (v1.2.0)

      # puppet module install puppetlabs-puppet_agent --version=2.1.2
      Notice: Preparing to install into /etc/puppetlabs/code/environments/production/modules ...
      Notice: Downloading from https://forgeapi.puppet.com ...
      Notice: Installing – do not interrupt ...
      /etc/puppetlabs/code/environments/production/modules
      └─┬ puppetlabs-puppet_agent (v2.1.2)
      ├── puppetlabs-apt (v6.3.0)
      ├─┬ puppetlabs-inifile (v3.0.0)
      │ └── puppetlabs-translate (v1.2.0)
      └── puppetlabs-stdlib (v5.2.0)

      Reproducing the issue ...

      # puppet module upgrade puppetlabs-puppet_agent --version=2.2.0
      Notice: Preparing to upgrade 'puppetlabs-puppet_agent' ...
      Notice: Found 'puppetlabs-puppet_agent' (v2.1.2) in /etc/puppetlabs/code/environments/production/modules ...
      Notice: Downloading from https://forgeapi.puppet.com ...
      Error: Could not upgrade module 'puppetlabs-puppet_agent' (v2.1.2 -> v2.2.0)
      No version of 'puppetlabs-puppet_agent' can satisfy all dependencies
      Use `puppet module upgrade --ignore-dependencies` to upgrade only this module

      # puppet module upgrade puppetlabs-apt --version=7.1.0
      Notice: Preparing to upgrade 'puppetlabs-apt' ...
      Notice: Found 'puppetlabs-apt' (v6.3.0) in /etc/puppetlabs/code/environments/production/modules ...
      Notice: Downloading from https://forgeapi.puppet.com ...
      Error: Could not upgrade module 'puppetlabs-apt' (v6.3.0 -> v7.1.0)
      No version of 'puppetlabs-apt' can satisfy all dependencies
      Use `puppet module upgrade --ignore-dependencies` to upgrade only this module

      # puppet module upgrade puppetlabs-apt --version=7.1.0 --ignore-dependencies
      Notice: Preparing to upgrade 'puppetlabs-apt' ...
      Notice: Found 'puppetlabs-apt' (v6.3.0) in /etc/puppetlabs/code/environments/production/modules ...
      Notice: Downloading from https://forgeapi.puppet.com ...
      Error: Could not upgrade module 'puppetlabs-apt' (v6.3.0 -> v7.1.0)
      No version of 'puppetlabs-apt' can satisfy all dependencies
      Use `puppet module upgrade --ignore-dependencies` to upgrade only this module

       

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                Unassigned
                Reporter:
                jcbollinger John Bollinger
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Zendesk Support