Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

puppet module tool needs to use '--force' on PE >= 3.2.1 #203

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

curator
Copy link

@curator curator commented Apr 15, 2014

Per #190, in order to get around a 'supported modules' issue where the puppet module tool will fail install if you attempt to use a module 'supported' by that particular version of PE (such as using a newer stdlib, a common practice), the invocation needs to use '--force' instead of '--ignore-dependencies'.

@carlossg
Copy link
Collaborator

For what I see here http://docs.puppetlabs.com/references/3.4.3/man/module.html --ignore-dependencies is still needed as force will install the dependencies, isn't it?

@reidmv
Copy link

reidmv commented May 29, 2014

The --ignore-dependencies flag is insufficient to resolve this problem. One of either --force or --ignore-requirements needs to be specified to bypass the 'supported' check.

Note that the --ignore-requirements flag is an addition, and so won't work with older versions of Puppet.

The behavior is demonstrated below with each flag.

[root@master ~]# puppet --version
3.4.3 (Puppet Enterprise 3.2.3)
[root@master ~]# puppet module --modulepath /tmp install puppetlabs/firewall --version 1.0.0 --ignore-dependencies
Notice: Preparing to install into /tmp ...
Notice: Downloading from https://forgeapi.puppetlabs.com ...
Notice: Found at least one version of puppetlabs-firewall compatible with PE (3.2.3);
Notice: Skipping versions which don't express PE compatibility. To install
the most recent version of the module regardless of compatibility
with PE, use the '--ignore-requirements' flag.
Error: Could not install 'puppetlabs-firewall' (v1.0.0)
  No releases matching '1.0.0' are available from https://forgeapi.puppetlabs.com
[root@master ~]# puppet module --modulepath /tmp install puppetlabs/firewall --version 1.0.0 --ignore-requirements
Notice: Preparing to install into /tmp ...
Notice: Downloading from https://forgeapi.puppetlabs.com ...
Notice: Installing -- do not interrupt ...
/tmp
└── puppetlabs-firewall (v1.0.0)
[root@master ~]# puppet module --modulepath /tmp install puppetlabs/firewall --version 1.0.0 --force
Notice: Preparing to install into /tmp ...
Notice: Downloading from https://forgeapi.puppetlabs.com ...
Notice: Installing -- do not interrupt ...
/tmp
└── puppetlabs-firewall (v1.0.0)

@carlossg
Copy link
Collaborator

@reidmv yes, --ignore-dependencies is not enough, but is it still needed? firewall is not a good example as it does not have dependencies

Give it a try with the mysql module to see if dependency stdlib is installed (clean tmp between calls)

puppet module --modulepath /tmp install puppetlabs/mysql --version 2.2.3 --ignore-requirements
puppet module --modulepath /tmp install puppetlabs/mysql --version 2.2.3 --force
puppet module --modulepath /tmp install puppetlabs/mysql --version 2.2.3 --ignore-requirements --ignore-dependencies
puppet module --modulepath /tmp install puppetlabs/mysql --version 2.2.3 --force --ignore-dependencies

@curator
Copy link
Author

curator commented Oct 7, 2014

I have confirmed that this will definitely work with --force and co-exists with --ignore-dependencies and also replaces it (only the first of your four examples get stdlib installed, the rest successfully ignore all the things requested).

screen shot 2014-10-07 at 2 05 02 pm

I do, however, note that code paths have changed sufficiently to make my original pull request useless. Would you like me to kill and resubmit or is there enough data to move forward with the change yourself?

@carlossg
Copy link
Collaborator

carlossg commented Oct 8, 2014

Please rebase and you can update the branch with "git push -f" and will update the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants