--ignore-dependencies and --version do not work together with puppet module install

425 views
Skip to first unread message

James Olin Oden

unread,
Apr 22, 2015, 2:25:58 PM4/22/15
to puppet...@googlegroups.com
I am using puppet version 3.7.5. I tried to run the following command:

[root@dvcm puppetmaster]# puppet module install
--ignore-dependencies stahnma-epel --version 1.0.2
Notice: Preparing to install into /etc/puppet/modules ...
Notice: Downloading from https://forgeapi.puppetlabs.com ...
Error: Could not install module 'stahnma-epel' (???)
No version of 'stahnma-epel' can satisfy all dependencies
Use `puppet module install --ignore-dependencies` to install
only this module

Which said to ignore dependencies and install a specific version.
However this failed saying I should use --ignore-dependencies if I
want this to work.

If however I run without the version:

[root@dvcm puppetmaster]# puppet module install
--ignore-dependencies stahnma-epel
Notice: Preparing to install into /etc/puppet/modules ...
Notice: Downloading from https://forgeapi.puppetlabs.com ...
Notice: Installing -- do not interrupt ...
/etc/puppet/modules
└── stahnma-epel (v0.0.3)

It succeeds but downloads the earlier version that another modules
says it requires (but it really works with the newer version). I
expect it to work like this in the second case however that leaves me
no option to get the newer version of the dependent module installed
(this newer version works with EL 7 but the older version does not).

Any thoughts on how I might work around this? It seems that something
is broken.

Best...James

jcbollinger

unread,
Apr 23, 2015, 10:45:59 AM4/23/15
to puppet...@googlegroups.com
It seems to me that the module tool is working as intended and documented.  Normally, if you ask it to install a module, then it will also install any other modules that the requested one depends on.  It is that behavior that is suppressed by the --ignore-dependencies option.  What the module tool is complaining to you about, however, is a different issue.  One or more of the modules you already have installed expresses a dependency on a range of versions of module stahnma-epel that does not include the version you are trying to install.  The module tool is protecting you from breakage of those already-installed modules.

You might be able to work around the issue by updating or removing the installed module(s) that depends on stahnma-epel.  Of course, that has implications on any uses of that module in your manifest set and/or other third-party modules.  If there is no more recent version of that module available, and if the existing version's requirements are indeed satisfied by the more recent stahnma-epel, then you could create a local version of that module that differs only in its dependency metadata, and update using that.


John

James Olin Oden

unread,
Apr 23, 2015, 11:26:18 AM4/23/15
to puppet...@googlegroups.com
Yes but I told it to ignore the dependencies and install a certain
version. I would expect it would do just that. Have to agree to
disagree here.

I already figured out a work around.

As it happens the module really doesn't require that exact version,
but sadly its project URL links to the dependent module 'epel' and not
to itself. So I can't submit a fix to it:

https://forge.puppetlabs.com/ckhall/remi

I just submitted an issue to the module owner:

https://github.com/ckhall/puppet-module-remi/issues/2

Best...James
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/b86b4e96-29b5-43ef-a48b-be5971b388e0%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Anderson Mills

unread,
Apr 23, 2015, 1:40:53 PM4/23/15
to puppet...@googlegroups.com

James,

I also think that the PMT is operating as expected, in that it is ignoring the dependencies of the module you are trying to install, stahnma-epel v1.0.2. --ignore-dependencies does not tell it to ignore dependencies of already installed modules.

I believe the behavior you're looking for is is in the --force flag, which will install the module, regardless of the dependencies of other modules. As you might guess, you should be careful with --force.

Anderson

James Olin Oden

unread,
Apr 23, 2015, 2:39:34 PM4/23/15
to puppet...@googlegroups.com
OK, I understand now. Yeah, I'm in a place where I feel caution is
warranted all around. Ideal solution is to get the remi module
stating sane version requirements. I created that issue so maybe the
maintainer will respond. I would fix it for them if I could. If we
had our own local puppet module repo I could go that route too...but
as it is n-levels deep in a forced conversion to a different OS as
puppetlabs just removed the Fedora 19 RPMS of theirs. For reasons I
can't go into we went RHEL 7 rather than Fedora 21, and so the road of
woe begins. Anyway, I've got it sorted out for now but at some point
I will seek a better solution.

Thanks...James
> https://groups.google.com/d/msgid/puppet-users/b0454753-87ce-460e-a186-13c90cd660e3%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages