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

Missing Python module in virtualenv, installation of module causes error #776

Open
vilhelmprytz opened this issue Feb 15, 2023 · 2 comments
Labels

Comments

@vilhelmprytz
Copy link
Contributor

vilhelmprytz commented Feb 15, 2023

Describe the bug

The module installs and configures Puppetboard fine, but when Apache2 tries to run Puppetboard, it complains that the puppetboard python module is missing.

If I manually installed the pip puppetboard module using like:

/srv/puppetboard/virtenv-puppetboard/bin/pip install puppetboard

... then I get the following error when running puppet agent -t:

Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns: WARNING: Ignoring invalid distribution -uppetboard (/srv/puppetboard/virtenv-puppetboard/lib/python3.7/site-packages)
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns: WARNING: Ignoring invalid distribution - (/srv/puppetboard/virtenv-puppetboard/lib/python3.7/site-packages)
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns: WARNING: Ignoring invalid distribution -uppetboard (/srv/puppetboard/virtenv-puppetboard/lib/python3.7/site-packages)
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns: WARNING: Ignoring invalid distribution - (/srv/puppetboard/virtenv-puppetboard/lib/python3.7/site-packages)
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns: Found existing installation: puppetboard 4.2.6
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns: Uninstalling puppetboard-4.2.6:
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns:   Would remove:
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns:     /srv/puppetboard/virtenv-puppetboard/lib/python3.7/site-packages/puppetboard-4.2.6.dist-info/*
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns:     /srv/puppetboard/virtenv-puppetboard/lib/python3.7/site-packages/puppetboard/*
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns:     /srv/puppetboard/virtenv-puppetboard/requirements_for_docker/requirements-docker.txt
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns:     /srv/puppetboard/virtenv-puppetboard/requirements_for_tests/requirements-test.txt
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns: Proceed (Y/n)?   Successfully uninstalled puppetboard-4.2.6
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns: ERROR: Exception:
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns: Traceback (most recent call last):
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns:   File "/srv/puppetboard/virtenv-puppetboard/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 160, in exc_logging_wrapper
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns:     status = run_func(*args)
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns:   File "/srv/puppetboard/virtenv-puppetboard/lib/python3.7/site-packages/pip/_internal/commands/uninstall.py", line 108, in run
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns:     uninstall_pathset.commit()
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns:   File "/srv/puppetboard/virtenv-puppetboard/lib/python3.7/site-packages/pip/_internal/req/req_uninstall.py", line 424, in commit
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns:     self._moved_paths.commit()
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns:   File "/srv/puppetboard/virtenv-puppetboard/lib/python3.7/site-packages/pip/_internal/req/req_uninstall.py", line 277, in commit
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns:     save_dir.cleanup()
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns:   File "/srv/puppetboard/virtenv-puppetboard/lib/python3.7/site-packages/pip/_internal/utils/temp_dir.py", line 173, in cleanup
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns:     rmtree(self._path)
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns:   File "/srv/puppetboard/virtenv-puppetboard/lib/python3.7/site-packages/pip/_vendor/tenacity/__init__.py", line 328, in wrapped_f
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns:     return self(f, *args, **kw)
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns:   File "/srv/puppetboard/virtenv-puppetboard/lib/python3.7/site-packages/pip/_vendor/tenacity/__init__.py", line 408, in __call__
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns:     do = self.iter(retry_state=retry_state)
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns:   File "/srv/puppetboard/virtenv-puppetboard/lib/python3.7/site-packages/pip/_vendor/tenacity/__init__.py", line 364, in iter
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns:     raise retry_exc.reraise()
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns:   File "/srv/puppetboard/virtenv-puppetboard/lib/python3.7/site-packages/pip/_vendor/tenacity/__init__.py", line 197, in reraise
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns:     raise self.last_attempt.result()
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns:   File "/usr/lib/python3.7/concurrent/futures/_base.py", line 425, in result
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns:     return self.__get_result()
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns:   File "/usr/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns:     raise self._exception
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns:   File "/srv/puppetboard/virtenv-puppetboard/lib/python3.7/site-packages/pip/_vendor/tenacity/__init__.py", line 411, in __call__
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns:     result = fn(*args, **kwargs)
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns:   File "/srv/puppetboard/virtenv-puppetboard/lib/python3.7/site-packages/pip/_internal/utils/misc.py", line 129, in rmtree
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns:     shutil.rmtree(dir, ignore_errors=ignore_errors, onerror=rmtree_errorhandler)
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns:   File "/usr/lib/python3.7/shutil.py", line 491, in rmtree
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns:     _rmtree_safe_fd(fd, path, onerror)
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns:   File "/usr/lib/python3.7/shutil.py", line 449, in _rmtree_safe_fd
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns:     onerror(os.unlink, fullname, sys.exc_info())
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns:   File "/usr/lib/python3.7/shutil.py", line 447, in _rmtree_safe_fd
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns:     os.unlink(entry.name, dir_fd=topfd)
Notice: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns: PermissionError: [Errno 13] Permission denied: 'INSTALLER'
Error: 'echo y | /srv/puppetboard/virtenv-puppetboard/bin/pip uninstall   puppetboard' returned 2 instead of one of [0]
Error: /Stage[main]/Puppetboard/Python::Pip[puppetboard]/Exec[pip_install_puppetboard]/returns: change from 'notrun' to ['0'] failed: 'echo y | /srv/puppetboard/virtenv-puppetboard/bin/pip uninstall   puppetboard' returned 2 instead of one of [0] (corrective)
Notice: Applied catalog in 10.46 seconds

Puppetboard version

Module version: 9.0.0
Puppetboard version: 4.2.6

Environment and installation method

Basically the configuration parameters I've used:

  class { 'puppetboard':
    manage_selinux      => false,
    default_environment => '*',
    reports_count       => 40,
    manage_git          => true,
    manage_virtualenv   => true,
    version             => 'v4.2.6',
    puppetdb_host       => localhost,
    puppetdb_port       => 8080,
    enable_catalog      => true,
  }

Also, I've used revision instead of version in module versions before v9.0.0, but when I upgraded to v9.0.0, I got an error message stating that version should be used over revision. Though it looks like version parameter isn't documented, only revision, so if I'm doing something wrong here please let me know.

@gdubicki
Copy link
Contributor

Hi @vilhelmprytz!

This seems to be more of a module issue rather than Puppetboard's, but let's try to fix it here.

If you upgraded to v9.0.0 of the module then I recommend you to delete the old puppetboard directory (/srv/puppetboard) completely and rerun puppet for a fresh install.

Let me know if that helped!

@vilhelmprytz
Copy link
Contributor Author

That is very correct, sorry for reporting it in the wrong repo.

Either way, deleting the old puppetboard directory does not help. When using revision, the module complains that you should be using version instead, but when using version, the error occurs. Which is the intended parameter, version or revision?

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

No branches or pull requests

2 participants