Jira (PUP-11001) puppet module install shows invalid message if existing modules are broken

124 views
Skip to first unread message

Gabriel Nagy (Jira)

unread,
Mar 31, 2021, 11:03:03 AM3/31/21
to puppe...@googlegroups.com
Gabriel Nagy created an issue
 
Puppet / Bug PUP-11001
puppet module install shows invalid message if existing modules are broken
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2021/03/31 8:02 AM
Labels: community
Priority: Normal Normal
Reporter: Gabriel Nagy

Puppet Version: 7.3.0

In PUP-9176 we added included unmet dependencies in the output of puppet module install. We handled two cases:

  • when the new module depends on an already installed module and its version is not satisfiable
    e.g. puppetlabs-stdlib 6.6.0 is installed, and the user wants to install puppetlabs-puppet_authorization version 0.4.0, which depends on stdlib "< 5.0.0"
  • when the dependency graph is broken prior to installing the new module (we only handled this partially)
    e.g.

        1. Install a module with fixed upper dependencies:
        > puppet module install --target-dir tmpdir trepasi-debnet -v 1.5.1
        This version has puppetlabs-stdlib bound to `>= 3.2.0 < 5.0.0`
        
        2. Forcibly remove the `stdlib` module
        > rm -rf tmpdir/stdlib
        
        3. Attempt to install a version of stdlib that breaks the above-stated
           dependency
        > puppet module install --target-dir tmpdir puppetlabs-stdlib -v "> 5"
    

Turns out there's another case. Suppose puppet module list returns the following:

Warning: Module 'puppetlabs-stdlib' (v6.6.0) fails to meet some dependencies:
  'jaxxstorm-teleport' (v0.1.0) requires 'puppetlabs-stdlib' (>=3.2.0 <5.0.0)
/home/gabi/.puppetlabs/etc/code/environments/production/modules
├── jaxxstorm-teleport (v0.1.0)
└── puppetlabs-stdlib (v6.6.0)  invalid

Trying to install something like puppetlabs-concat version 7.0.1 would fail with the following:

Error: Could not install module 'puppetlabs-concat' (v7.0.1)
  The requested version cannot satisfy one or more of the following installed modules:
    puppetlabs-stdlib, installed: 6.6.0, expected: >= 4.13.1 < 8.0.0
 
  Use `puppet module install 'puppetlabs-concat' --ignore-dependencies` to install only this module

Note the wrong error message, since 6.6.0 does satisfy the >= 4.13.1 < 8.0.0 range.

We need to find a way to also handle this case. Maybe we can rely on how puppet module list generates the list of unmet dependencies.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Gabriel Nagy (Jira)

unread,
Mar 31, 2021, 11:06:03 AM3/31/21
to puppe...@googlegroups.com
Gabriel Nagy updated an issue
Change By: Gabriel Nagy
*Puppet Version:* 7.3.0

In PUP-9176 we
added included unmet dependencies in the output of {{puppet module install}}. We handled two cases:
- when the new module depends on an already installed module and its version is not satisfiable
e.g. puppetlabs-stdlib *6.6.0* is installed, and the user wants to install puppetlabs-puppet_authorization version *0.4.0*, which depends on stdlib *"< 5.0.0"*
- when the dependency graph is broken prior to installing the new module (we only handled this partially)
e.g.
  

{code}
    1. Install a module with fixed upper dependencies:
    > puppet module install --target-dir tmpdir trepasi-debnet -v 1.5.1
    This version has puppetlabs-stdlib bound to `>= 3.2.0 < 5.0.0`
    
    2. Forcibly remove the `stdlib` module
    > rm -rf tmpdir/stdlib
    
    3. Attempt to install a version of stdlib that breaks the above-stated
       dependency
    > puppet module install --target-dir tmpdir puppetlabs-stdlib -v "> 5"
{code}


Turns out there's another case. Suppose {{puppet module list}} returns the following:
{code}
Warning: Module 'puppetlabs-stdlib' (v6.6.0) fails to meet some dependencies:
  'jaxxstorm-teleport' (v0.1.0) requires 'puppetlabs-stdlib' (>=3.2.0 <5.0.0)
/home/gabi/.puppetlabs/etc/code/environments/production/modules
├── jaxxstorm-teleport (v0.1.0)
└── puppetlabs-stdlib (v6.6.0)  invalid
{code}

Trying to install something like puppetlabs-concat version 7.0.1 would fail with the following:
{code}
Error: Could not install module 'puppetlabs-concat' (v7.0.1)
  The requested version cannot satisfy one or more of the following installed modules:
    puppetlabs-stdlib, installed: 6.6.0, expected: >= 4.13.1 < 8.0.0

  Use `puppet module install 'puppetlabs-concat' --ignore-dependencies` to install only this module
{code}

Note the wrong error message, since 6.6.0 does satisfy the >= 4.13.1 < 8.0.0 range.

We need to find a way to also handle this case. Maybe we can rely on how {{puppet module list}} generates the list of unmet dependencies.

Mihai Buzgau (Jira)

unread,
Apr 1, 2021, 4:00:09 AM4/1/21
to puppe...@googlegroups.com

Gabriel Nagy (Jira)

unread,
Apr 8, 2021, 7:53:03 AM4/8/21
to puppe...@googlegroups.com
Gabriel Nagy commented on Improvement PUP-11001
 
Re: puppet module install shows invalid message if existing modules are broken

Need to also handle the case where the installed module depends on a module with versions that don't exist anymore, https://forge.puppet.com/modules/joshbeard/websphere which depends on  https://forge.puppet.com/modules/joshbeard/ibm_installation_manager

 

This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo

Mihai Buzgau (Jira)

unread,
Apr 13, 2021, 9:30:02 AM4/13/21
to puppe...@googlegroups.com

Ciprian Badescu (Jira)

unread,
Apr 14, 2021, 5:19:01 AM4/14/21
to puppe...@googlegroups.com

Ciprian Badescu (Jira)

unread,
Apr 14, 2021, 5:20:02 AM4/14/21
to puppe...@googlegroups.com

Trevor Vaughan (Jira)

unread,
Aug 4, 2021, 10:17:03 AM8/4/21
to puppe...@googlegroups.com
Trevor Vaughan updated an issue
Change By: Trevor Vaughan
Affects Version/s: PUP 7.3.0
Affects Version/s: PUP 6.23.0
Affects Version/s: PUP 7.8.0

Ciprian Badescu (Jira)

unread,
Aug 23, 2021, 8:27:03 AM8/23/21
to puppe...@googlegroups.com

Ciprian Badescu (Jira)

unread,
Sep 7, 2021, 3:48:03 AM9/7/21
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages