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

Package with provider pip3 tries installing every run. #626

Closed
maltewhiite opened this issue Oct 18, 2021 · 2 comments
Closed

Package with provider pip3 tries installing every run. #626

maltewhiite opened this issue Oct 18, 2021 · 2 comments

Comments

@maltewhiite
Copy link

maltewhiite commented Oct 18, 2021

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 6.24.0
  • Ruby: 2.5.0

How to reproduce (e.g Puppet code you use)

package { ['regex', 'argparse', 'configparser', 'prometheus-client',]:
    ensure   => installed,
    provider => pip3,
  }

What are you seeing

Package[argparse]/ensure: created (corrective) on every run of puppet

What behaviour did you expect instead

That because the package is installed, it won't try to install it every time.

Any additional information you'd like to impart

Please make it so pip3 provider for packages, doesn't trigger a Package[argparse]/ensure: created (corrective) line every time.
It is bad for our foreman monitoring. The hosts never reach a stable state. They always have: Hosts that had performed modifications without error

If I run "pip3 install argparse" plainly, this is the result:

pip3 install argparse
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3 install --user` instead.
Requirement already satisfied: argparse in /usr/local/lib/python3.6/site-packages
@smortex
Copy link
Member

smortex commented Oct 19, 2021

argparse seems to support Python up to 3.4. Project was abandoned upstream, see:
https://github.com/ThomasWaldmann/argparse/

Conflict with argparse of stdlib?

@smortex smortex closed this as completed Oct 19, 2021
@maltewhiite
Copy link
Author

@smortex

Thanks. Resolved my issue by just doing like so:

  # PROMETHEUS
  package { ['regex', 'configparser', 'prometheus-client', ]:
    ensure          => installed,
    provider        => pip3,
    install_options => '-q',
  }

We are using Python 2.7.5, so Argparse was supported natively, as you said. I was not aware. Thanks.

glennmorris added a commit to lsst-it/lsst-control that referenced this issue Jul 31, 2024
It is only required on older OS. On rhel9+ it just creates noise via
pip mentioning that the requirements are already met.

Refs:
https://lsstc.slack.com/archives/C01270EHCQ3/p1722345845991169
voxpupuli/puppet-python#626
aio-libs/idna-ssl#8
glennmorris added a commit to lsst-it/lsst-control that referenced this issue Aug 1, 2024
It is only required on older OS. On rhel9+ it just creates noise via
pip mentioning that the requirements are already met.

Refs:
https://lsstc.slack.com/archives/C01270EHCQ3/p1722345845991169
voxpupuli/puppet-python#626
aio-libs/idna-ssl#8
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

No branches or pull requests

2 participants