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

puppet module install should list unsatisfiable dependencies if installation fails

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: PUP 4.10.12, PUP 5.5.6, PUP 6.0.0
    • Fix Version/s: None
    • Component/s: PMT
    • Labels:
      None
    • Template:
    • Team:
      Puppet Developer Experience

      Description

      When puppet module install fails to find a module version for which dependencies can be satisfied, the operation fails with an error message. The message does not include any information about which dependency could not be satisfied which leaves no starting point for debugging and resolving the issue.

      Reproduction Case

      • Install Puppet 6 on CentOS 7:

      rpm -Uvh http://yum.puppetlabs.com/puppet6/puppet6-release-el-7.noarch.rpm
      yum install -y puppet-agent
      source /etc/profile.d/puppet-agent.sh
      

      • Install the latest version of puppetlabs-stdlib:

      puppet module install puppetlabs-stdlib
      

      • Attempt to install v0.4.0 of puppetlabs-puppet_authorization, which depends on stdlib "< 5.0.0":

      puppet module install puppetlabs-puppet_authorization --verson 0.4.0
      

      Outcome

      Installation fails with an error about unsatisfiable dependencies, but no information on which dependency could not be satisfied:

      # puppet module install puppetlabs-stdlib
      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-stdlib (v5.0.0)
       
      # puppet module install puppetlabs-puppet_authorization --version 0.4.0
      Notice: Preparing to install into /etc/puppetlabs/code/environments/production/modules ...
      Notice: Downloading from https://forgeapi.puppet.com ...
      Error: Could not install module 'puppetlabs-puppet_authorization' (???)
        No version of 'puppetlabs-puppet_authorization' can satisfy all dependencies
            Use `puppet module install --ignore-dependencies` to install only this module
      

      Expected Outcome

      The error message lists puppetlabs-stdlib, its version, and the unsatisfiable dependency "< 5.0.0" that caused installation to fail. The module where the unsatisfiable dependency occurred should also be listed as this error can arise from transitive dependencies. E.g. a dependency of a dependency of the module being installed cannot have its constraints satisfied.

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  chuck Charlie Sharpsteen
                • Votes:
                  2 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:

                    Zendesk Support